azappnew/onebrain-python
Official OneBrain Python SDK — persistent AI memory layer
Platform-specific configuration:
{
"mcpServers": {
"onebrain-python": {
"command": "npx",
"args": [
"-y",
"onebrain-python"
]
}
}
}Add the config above to .claude/settings.json under the mcpServers key.
[](https://pypi.org/project/onebrain-sdk/) [](https://pypi.org/project/onebrain-sdk/) [](https://opensource.org/licenses/MIT) [](https://mypy-lang.org/)
The official Python SDK for OneBrain — a persistent AI memory layer for humans and agents. Store, search, and connect memories across every AI tool you use.
---
pip install onebrain-sdkRequires Python 3.9+. The only runtime dependency is httpx.
---
import onebrain
client = onebrain.OneBrain(api_key="ob_xxx:secret")
# Store a memory
memory = client.memory.create(content="The user prefers dark mode.")
# Search memories
results = client.memory.search(query="user preferences", limit=5)
# Get brain context for an AI prompt
context = client.brain.context(scope="preferences")
client.close()---
Every request requires an API key. You can provide it in two ways:
client = onebrain.OneBrain(api_key="ob_xxx:secret")export ONEBRAIN_API_KEY="ob_xxx:secret"client = onebrain.OneBrain() # reads ONEBRAIN_API_KEY automaticallyob_prefix:secret).---
All methods return type
Loading reviews...