A small HTTP API, usable from anywhere today
There is no SecondBrainDB-specific SDK yet — and you don't need one to try the API. Every endpoint is plain HTTP + JSON, callable from a script, a ChatGPT custom-GPT Action, a Claude MCP tool, or a local Ollama-backed agent.
Endpoints built
GET /health
POST /v1/memories { workspace_id, kind, body, visibility? }
GET /v1/memories/{id}
GET /v1/memories/search?q=...
POST /v1/memories/{id}/share { grantee_agent_id }
POST /v1/workspaces { slug, display_name }
Every endpoint except /health requires
Authorization: Bearer <api_key>. A missing, invalid, or
revoked key returns 401 before touching any data; a valid
key missing the required scope returns 403.
Example: write a private memory, then share it
curl -X POST http://127.0.0.1:8088/v1/memories \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"workspace_id": 1, "kind": "note",
"body": "the customer prefers async updates",
"visibility": "private"}'
# → {"id": 42}
curl -X POST http://127.0.0.1:8088/v1/memories/42/share \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"grantee_agent_id": 7}'
# → {"shared": true}
This is a local
development server example (127.0.0.1:8088), not a live,
publicly reachable endpoint.
Connector direction documented only
Planned: an OpenAPI Action schema wrapping the endpoints above. Not built.
Planned: an MCP server exposing the same operations as tools. Not built.
Planned: a thin Python client library. Not built — the raw HTTP API already works today without one.
Planned direction only; no agent-specific connector exists yet.
Every adapter above is designed to be a convenience wrapper around the existing fail-closed authorization model — never a separate, more permissive path into the data.