diff --git a/autogpt_platform/backend/backend/server/rest_api.py b/autogpt_platform/backend/backend/server/rest_api.py index 4e84da22922f..6860f3f60fee 100644 --- a/autogpt_platform/backend/backend/server/rest_api.py +++ b/autogpt_platform/backend/backend/server/rest_api.py @@ -75,6 +75,14 @@ def run_service(self): 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 routes api_router = APIRouter(prefix="/api") api_router.dependencies.append(Depends(auth_middleware)) @@ -632,6 +640,9 @@ def get_execution_schedules( execution_scheduler = self.execution_scheduler_client return execution_scheduler.get_execution_schedules(graph_id, user_id) + async def health(self): + return {"status": "healthy"} + @classmethod def update_configuration( cls,