AgentBay — Persistent memory for AI coding agents
The memory OS for coding agents. Persistent memory, collaboration, and governance for Claude Code, Codex, Cursor, OpenClaw, and any MCP client.
pip install agentbay
Works locally with zero config. No signup, no API key, no credit card. When you want shared memory across machines or teammates, sign in and the same brain syncs to the cloud.
Quick start
from agentbay import AgentBay
brain = AgentBay() # local, zero config
brain.store("User prefers dark mode") # remember a fact
results = brain.recall("preferences") # search by meaning
That's it. Memory persists across sessions. Search is hybrid (alias + full-text + vector + RRF fusion) so you don't have to think about how the agent will phrase the recall.
Sync to the cloud — one command
When you want the same brain on your other machines, across agents, or shared with a teammate, run:
agentbay login
This opens your browser, you sign up (free, 30 seconds, no card), and the CLI pushes every local memory to your cloud account in one pass. Future stores and recalls flow to the cloud automatically. Your local SQLite stays intact as an offline cache.
What you unlock:
- Same brain everywhere — same memories on your laptop, server, CI
- Team memory — invite teammates, share project knowledge
- Vector search at scale — 1024-dim embeddings via Voyage AI
- Multi-agent handoffs — Claude Code, Codex, Cursor all reading and writing the same brain
Other useful CLI commands:
agentbay init # guided setup: cloud account (recommended) or local only
agentbay status # show local memory count + cloud connection state
agentbay sync # push any new local memories to cloud (after login)
Equivalent in Python:
brain = AgentBay() # local mode
brain.store("…") # accumulate locally
brain = brain.login() # browser opens, migrates, returns cloud brain
Why this exists
Coding agents forget everything between sessions. The architecture decisions, the bugs you debugged together, the conventions in your codebase — gone the moment the context window closes. AgentBay gives your agent a brain that compounds across sessions.
- Local-first install.
pip install agentbayand you're done. No account creation or SaaS lock-in. Local mode runs from SQLite after setup; the first store/recall that needs vectors quietly downloads the FastEmbed model (no progress bars, no warnings) unless it is already cached — and falls back to full-text search if the download fails, so everything keeps working offline. - MCP-native. Drops into Claude Code, Cursor, Codex, OpenClaw, and any other MCP client with one line of config. See the MCP server package.
- Clean upgrade path. Local for solo. Cloud for sync across machines. Teams for collaboration. Projects for multi-agent handoff. Governance for the enterprise stack. Each tier adds value rather than gating the previous one.
Wrap your LLM
If your agent uses an OpenAI-compatible chat completion, AgentBay can wrap it so memory is recalled and stored automatically:
from agentbay import AgentBay
from openai import OpenAI
brain = AgentBay()
client = OpenAI()
response = brain.chat(
client,
model="gpt-4o",
messages=[
{"role": "user", "content": "what did we decide about the auth flow?"}
],
)
The wrapper recalls relevant memories, injects them into the prompt, and stores anything the assistant learned. No manual store/recall needed.
MCP integration (Claude Code, Cursor, Codex)
Add this to your MCP client config:
{
"mcpServers": {
"agentbay": {
"command": "npx",
"args": ["-y", "aiagentsbay-mcp"]
}
}
}
That's the entire setup. Your agent now has access to 76 memory and collaboration tools.
Sign in for cloud sync (optional)
agentbay login
The same brain that lived in ~/.agentbay/ now syncs to the cloud
under your account. Memories follow you across machines. Teams and
projects unlock for collaboration. Sign-up takes 60 seconds at
aiagentsbay.com.
Documentation + links
- Full docs — https://www.aiagentsbay.com/docs
- MCP server (npm) — https://www.npmjs.com/package/aiagentsbay-mcp
- Landing page — https://www.aiagentsbay.com
- Issue tracker — https://github.com/thomasjumper/agentbay-python/issues
- PyPI — https://pypi.org/project/agentbay/
Memory model
AgentBay uses four memory tiers with confidence decay:
| Tier | TTL | Use case |
|---|---|---|
| Working | 24h | Session-local notes, in-flight task context |
| Episodic | 30d | Recent task and conversation context |
| Semantic | 90d | Reusable patterns, architecture facts |
| Procedural | 365d | Long-lived how-to memory |
Memories cap at 10K per project on the free tier. Confidence scores decay per tier so older memories down-rank without being deleted — your agent's recall stays sharp without you pruning by hand.
Anonymous usage telemetry
The SDK sends anonymous, counts-only usage telemetry so we can measure retention. It is opt-out and disclosed on first run.
What is sent — exactly these fields, nothing else:
| Field | Example | Notes |
|---|---|---|
event |
heartbeat |
first_init, heartbeat, or login |
anonId |
random hex | Random per-install id, not a user id |
sdk |
agentbay-python |
SDK distribution name |
version |
1.8.1 |
SDK version |
os |
Darwin |
Coarse OS family only |
count |
50 |
Coarse, bucketed count (optional) |
What is never sent — memory content, queries, titles, tags, file paths, API keys, emails, or IP addresses.
Turn it off — either of:
export AGENTBAY_TELEMETRY=0 # environment variable
brain = AgentBay(telemetry=False) # constructor option
AGENTBAY_QUIET=1 also disables it. The anonId lives in
~/.agentbay/config.json — delete that file to reset it.
License
MIT. See LICENSE.
Metadata
Release files for agentbay 1.9.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentbay-1.9.2.tar.gz | 105.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentbay-1.9.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 211.6 kB
Release files / agentbay-1.9.2.tar.gz
| Download URL | agentbay-1.9.2.tar.gz |
|---|---|
| Size | 105.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bccae07dcfa76555d2d46865f9bec2acd97dfaae562c45e09f45794a2a93364b
|
|
BLAKE2b-256 checksum How to use checksums |
5f6c2b78dcf67e00c937050f964fd68b1f5c37dfba713aa397ac3ddc6e4a3061
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.
Transparency logRelease files / agentbay-1.9.2-py3-none-any.whl
| Download URL | agentbay-1.9.2-py3-none-any.whl |
|---|---|
| Size | 106.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b83366b76a9be82a5c2ec22652753f95a62fa7c7957d4e775bf9f09c239def48
|
|
BLAKE2b-256 checksum How to use checksums |
4d8fcd31e2f2d0c72dd14fc2b0dd85623eb82e082e2e8be5c3269e1c376f8ec0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.
Transparency log