AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
security(platform/backend): Add health endpoint (#8341)
Aarushi2d0e51fe28df
diff --git a/autogpt_platform/backend/backend/server/rest_api.py b/autogpt_platform/backend/backend/server/rest_api.pyindex 4e84da2292..6860f3f60f 100644--- a/autogpt_platform/backend/backend/server/rest_api.py+++ b/autogpt_platform/backend/backend/server/rest_api.py@@ -75,6 +75,14 @@ class AgentServer(AppService):allow_headers=["*"], # Allows all headers)+ health_router = APIRouter()+ health_router.add_api_route(+ path="/health",+ endpoint=self.health,+ methods=["GET"],+ tags=["health"],+ )+# Define the API routesapi_router = APIRouter(prefix="/api")api_router.dependencies.append(Depends(auth_middleware))@@ -632,6 +640,9 @@ class AgentServer(AppService):execution_scheduler = self.execution_scheduler_clientreturn execution_scheduler.get_execution_schedules(graph_id, user_id)+ async def health(self):+ return {"status": "healthy"}+@classmethoddef update_configuration(cls,