Metadata-Version: 2.4
Name: agentbay
Version: 1.8.1
Summary: Persistent memory for AI agents. Store, recall, and share knowledge across sessions.
Author-email: AgentBay <hello@aiagentsbay.com>
License-Expression: MIT
Project-URL: Homepage, https://www.aiagentsbay.com
Project-URL: Repository, https://github.com/thomasjumper/agentbay-python
Project-URL: Documentation, https://www.aiagentsbay.com/docs
Project-URL: Issues, https://github.com/thomasjumper/agentbay-python/issues
Keywords: ai,agents,memory,mcp,llm,claude,openai
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28
Requires-Dist: typing-extensions>=4.0
Requires-Dist: fastembed>=0.4
Provides-Extra: crewai
Requires-Dist: crewai>=0.50; extra == "crewai"
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.2; extra == "langchain"
Provides-Extra: autogen
Requires-Dist: autogen-agentchat>=0.2; extra == "autogen"
Provides-Extra: llamaindex
Requires-Dist: llama-index-core>=0.10; extra == "llamaindex"
Provides-Extra: langgraph
Requires-Dist: langgraph>=0.2; extra == "langgraph"
Provides-Extra: vercel
Provides-Extra: elevenlabs
Requires-Dist: elevenlabs>=1.0; extra == "elevenlabs"
Provides-Extra: pipecat
Requires-Dist: pipecat-ai>=0.1; extra == "pipecat"
Provides-Extra: mastra
Provides-Extra: agno
Provides-Extra: camel
Requires-Dist: camel-ai>=0.2; extra == "camel"
Provides-Extra: all
Requires-Dist: crewai>=0.50; extra == "all"
Requires-Dist: langchain-core>=0.2; extra == "all"
Requires-Dist: autogen-agentchat>=0.2; extra == "all"
Requires-Dist: llama-index-core>=0.10; extra == "all"
Requires-Dist: langgraph>=0.2; extra == "all"
Requires-Dist: elevenlabs>=1.0; extra == "all"
Requires-Dist: pipecat-ai>=0.1; extra == "all"
Requires-Dist: camel-ai>=0.2; extra == "all"

# AgentBay — Persistent memory for AI coding agents

[![PyPI](https://img.shields.io/pypi/v/agentbay.svg)](https://pypi.org/project/agentbay/)
[![Python](https://img.shields.io/pypi/pyversions/agentbay.svg)](https://pypi.org/project/agentbay/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

The memory OS for coding agents. Persistent memory, collaboration, and
governance for Claude Code, Codex, Cursor, OpenClaw, and any MCP client.

```bash
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

```python
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:

```bash
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:

```bash
agentbay status   # show local memory count + cloud connection state
agentbay sync     # push any new local memories to cloud (after login)
```

Equivalent in Python:

```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](https://www.npmjs.com/package/aiagentsbay-mcp).
- **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:

```python
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:

```json
{
  "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)

```bash
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](https://www.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.

## License

MIT. See [LICENSE](LICENSE).
