Skip to main content

Persistent memory for AI agents. Store, recall, and share knowledge across sessions.

Project description

AgentBay — Persistent memory for AI coding agents

PyPI Python License: MIT

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 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 agentbay and you're done. No account creation or SaaS lock-in. Local mode runs from SQLite after setup; the first vector recall may download the FastEmbed model from Hugging Face unless it is already cached on the machine.
  • 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

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.

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentbay-1.8.1.tar.gz (88.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentbay-1.8.1-py3-none-any.whl (97.5 kB view details)

Uploaded Python 3

File details

Details for the file agentbay-1.8.1.tar.gz.

File metadata

  • Download URL: agentbay-1.8.1.tar.gz
  • Upload date:
  • Size: 88.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentbay-1.8.1.tar.gz
Algorithm Hash digest
SHA256 8e3d373d9a32b17043583aa7d5c20fe2e3aacfec97ef8cabce19faf70122010f
MD5 31fea3091c0c305259900e90867271fb
BLAKE2b-256 f690cc20bafdd11d56911b66396613325b3bd0f50ab66cd269c024d02f6866ed

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentbay-1.8.1.tar.gz:

Publisher: publish-python-sdk.yml on thomasjumper/agentbay-app

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentbay-1.8.1-py3-none-any.whl.

File metadata

  • Download URL: agentbay-1.8.1-py3-none-any.whl
  • Upload date:
  • Size: 97.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentbay-1.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f0130b22580668f5a5dd83b31aca629e5c86781acaddd99877b734058e1d7926
MD5 1d4a29aade5ada38789d7ab4f15d2d3f
BLAKE2b-256 7ac225ddb0c6688480d6b857bb0c0ca51ee4c554047ef7555335fb974a662a06

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentbay-1.8.1-py3-none-any.whl:

Publisher: publish-python-sdk.yml on thomasjumper/agentbay-app

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page