> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bsyncs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Health

> Liveness probe — check Neo4j, Redis, Qdrant, and model status.

<Info>
  This endpoint requires **no authentication**. Use it for uptime monitoring,
  load balancer health checks, and cold start detection.
</Info>

***

### Response

<ResponseField name="ready" type="boolean">
  `true` when all downstream services are connected and models are loaded.\
  Use this as your single "is Atlas usable?" signal.
</ResponseField>

<ResponseField name="models_loaded" type="boolean">
  `true` when Qwen 0.5B (fact extraction) and MiniLM (embedder) are loaded.\
  `false` for 60–120 seconds after cold start. All brain endpoints return
  `503` while this is `false`.
</ResponseField>

<ResponseField name="neo4j" type="string">
  `"connected"` or `"error: <reason>"`.\
  Neo4j stores the semantic knowledge graph.
</ResponseField>

<ResponseField name="redis" type="string">
  `"connected"` or `"error: <reason>"`.\
  Redis stores working memory and the entity canonicalisation cache.
</ResponseField>

<ResponseField name="qdrant" type="string">
  `"connected"` or `"error: <reason>"`.\
  Qdrant stores episodic memory vector embeddings.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.bsyncs.com/brain/health
  ```

  ```bash Shell — Wait for ready theme={null}
  until curl -sf https://api.bsyncs.com/brain/health \
    | grep -q '"ready":true'; do
    echo "Waiting for Atlas..."
    sleep 5
  done
  echo "Atlas is ready."
  ```

  ```python Python SDK theme={null}
  from atlas_memory import CognitiveBrain

  brain = CognitiveBrain(api_key="atlas_your_key_here", user_id="user-123")
  health = brain.health()

  if not health["models_loaded"]:
      print("Models loading — retry in 60s")
  elif health["neo4j"] != "connected":
      print(f"Neo4j error: {health['neo4j']}")
  else:
      print("All systems operational")
  ```

  ```python Poll until ready theme={null}
  import time, requests

  def wait_until_ready(base_url="https://api.bsyncs.com", timeout=120):
      for _ in range(timeout // 5):
          try:
              r = requests.get(f"{base_url}/brain/health", timeout=5).json()
              if r.get("ready") and r.get("models_loaded"):
                  print("Atlas is ready.")
                  return True
          except Exception:
              pass
          print("Waiting for models to load...")
          time.sleep(5)
      raise TimeoutError("Atlas did not become ready in time")

  wait_until_ready()
  ```

  ```javascript Node.js theme={null}
  const res = await fetch("https://api.bsyncs.com/brain/health");
  const health = await res.json();

  if (!health.ready) {
    console.log("Atlas not ready yet");
  } else {
    console.log("All systems operational");
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 — All systems ready theme={null}
  {
    "ready": true,
    "models_loaded": true,
    "neo4j": "connected",
    "redis": "connected",
    "qdrant": "connected"
  }
  ```

  ```json 200 — Cold start (models loading) theme={null}
  {
    "ready": false,
    "models_loaded": false,
    "neo4j": "connected",
    "redis": "connected",
    "qdrant": "connected"
  }
  ```

  ```json 200 — Service degraded theme={null}
  {
    "ready": false,
    "models_loaded": true,
    "neo4j": "error: connection refused",
    "redis": "connected",
    "qdrant": "connected"
  }
  ```
</ResponseExample>
