Skip to content

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.

fix(backend): expose websocket health route at /health (#13053)

Zamil Majdy28ccb534db0e
diff --git a/autogpt_platform/backend/backend/api/ws_api.py b/autogpt_platform/backend/backend/api/ws_api.py
index 196b021d27..e5e3267c11 100644
--- a/autogpt_platform/backend/backend/api/ws_api.py
+++ b/autogpt_platform/backend/backend/api/ws_api.py
@@ -333,6 +333,7 @@ async def websocket_router(
@app.get("/")
async def health():
return {"status": "healthy"}
diff --git a/autogpt_platform/backend/backend/api/ws_api_test.py b/autogpt_platform/backend/backend/api/ws_api_test.py
index ccfa76088c..6ef694d1fd 100644
--- a/autogpt_platform/backend/backend/api/ws_api_test.py
+++ b/autogpt_platform/backend/backend/api/ws_api_test.py
@@ -520,7 +520,7 @@ def test_health_endpoint_returns_ok() -> None:
ws_api.app.router.lifespan_context = _noop_lifespan
try:
with TestClient(ws_api.app) as client:
- r = client.get("/")
+ r = client.get("/health")
assert r.status_code == 200
assert r.json() == {"status": "healthy"}
finally: