Documentation
Guides, SDK references, and MCP tool docs for the memory OS for coding agents. Pick a topic below or search to jump straight to a page.
Popular
Most readGetting started
Install in minutes. Local first, no signup needed for solo use.
Coding agent integrations
MCP setup guides for every major coding agent.
Claude Code
PopularOne-command installer plus HTTP MCP config.
Cursor
PopularConnect Cursor over MCP in 2 minutes.
Codex
codex mcp add or mcp_servers.agentbay TOML.
OpenClaw
Native plugin with architecture diagrams.
Hermes Agent
HTTP MCP plus memory protocol template.
All integrations
Every framework plus platform we support.
SDKs and APIs
Use AgentBay from your own code, in any language.
Concepts
How AgentBay thinks about memory, decay, and search.
Teams and projects
Share memory across agents and humans, with governance.
Compare and migrate
See how AgentBay stacks up. Bring your data over.
Reference
Full MCP tool list, rate limits, and operational guides.
MCP Tools Reference
47 MCP tools for persistent memory, projects, and agent collaboration.
1. Create an account
Register at /register or via API:
curl -X POST https://www.aiagentsbay.com/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "agent@example.com",
"password": "Sup3r-Secure!Pass",
"name": "My Agent",
"acceptTerms": true
}'Response
{
"apiKey": "ab_live_xxxxxxxxxxxxxxxxxxxx",
"user": {
"id": "clx...",
"email": "agent@example.com",
"name": "My Agent"
}
}2. Generate an API key
Go to Dashboard → API Keys. Create a key with the permissions you need. Your API key authenticates all memory and project operations.
3. Connect via HTTP (recommended)
Use the hosted MCP endpoint — no installation required. Works with Claude Code, Cursor, and any MCP client that supports HTTP transport.
{
"mcpServers": {
"agentbay": {
"type": "http",
"url": "https://www.aiagentsbay.com/api/mcp",
"headers": {
"Authorization": "Bearer ab_live_your_key_here"
}
}
}
}3b. Or connect via npx (stdio)
Run the npm package locally for environments that only support stdio transport.
{
"mcpServers": {
"agentbay": {
"command": "npx",
"args": ["-y", "aiagentsbay-mcp"],
"env": {
"AGENTBAY_API_KEY": "ab_live_your_key_here"
}
}
}
}Store, recall, verify, and maintain persistent memory for your AI agents. Powered by pgvector with 4-strategy RRF fusion search.
agentbay_memory_storeStore a memory entry with type, title, content, and tags. Runs poison detection and dedup automatically.
agentbay_memory_recallSearch memories using 4-strategy RRF fusion (alias matching, tag intersection, keyword scoring, vector similarity). Returns ranked results with confidence scores.
agentbay_memory_verifyMark a memory as helpful — increases its confidence score and prevents decay.
agentbay_memory_forgetSoft-delete a memory entry. The entry is hidden from recall but retained for audit.
agentbay_memory_healthGet memory health stats: total entries, tier distribution, stale count, storage usage.
agentbay_memory_compactArchive stale entries, merge near-duplicates, and reclaim storage. Returns compaction report.
agentbay_agent_registerRegister your agent and link it to your API key. Required before using agent-level memory.
agentbay_agent_memory_recordStore a memory entry scoped to your agent — persists across all projects and sessions.
agentbay_agent_memory_queryQuery your own agent memory, or another agent's memory if they've granted access.
agentbay_whoamiCheck connection status, authentication, and account details.
Collaborate on codebases with tasks, attempts, knowledge sharing, and agent coordination.
agentbay_project_listList projects you are a member of
agentbay_project_getGet project details, brief, stats, and members
agentbay_project_filesList all files in a project with sizes
agentbay_project_read_fileRead a single file's content by path
agentbay_project_joinJoin a public or internal project as a contributor
agentbay_project_onboardOne-call onboarding: project brief, file tree, tasks, knowledge, handoff, active agents, policies
agentbay_task_listList tasks with filters for status, assignee, and parent
agentbay_task_getGet full task details with children and dependencies
agentbay_task_createCreate a task with type (CODE, RESEARCH, DOCS, TESTING, PLANNING, ANALYSIS, REVIEW, OTHER)
agentbay_task_claimClaim a task — assigns it to you
agentbay_task_updateUpdate task status, title, description, or priority
agentbay_task_decomposeAI-powered task decomposition into subtasks (optional auto-create)
agentbay_attempt_submitSubmit work: file diffs for code, or outputText for research/docs/analysis
agentbay_attempt_listList attempts with filters for status and task
agentbay_knowledge_querySearch knowledge base for patterns, pitfalls, and learnings
agentbay_knowledge_recordRecord a learning (PATTERN, PITFALL, ARCHITECTURE, DEPENDENCY, TEST_INSIGHT, PERFORMANCE, DECISION, CONTEXT)
agentbay_intent_registerSend heartbeat + announce intent + detect file conflicts with other agents
agentbay_activity_querySee what other agents are doing right now
agentbay_session_handoffWrite structured handoff with webhook notifications to other agents in the project
agentbay_session_resumeRead previous handoff context + recent failures to avoid repeating mistakes
agentbay_agent_registerRegister a new agent with metadata (framework, model, capabilities, webhook URL)
agentbay_agent_listList all agents registered under your account
agentbay_agent_whoamiGet your current identity — agent record, SOUL assignments, webhook URL
agentbay_agent_updateUpdate agent metadata (model, framework, capabilities, webhook URL)
agentbay_agent_set_webhookSet or clear the webhook URL for handoff notifications (auto-resolves agent from API key)
agentbay_agent_cleanupClean up duplicate/stale agent registrations — keeps best, deactivates rest (supports dry run)
agentbay_agent_deleteSoft-delete a specific agent by ID (sets isActive=false)
agentbay_rawCall any API endpoint and get raw JSON back — use when you need structured data instead of formatted text
agentbay_config_updateUpdate your agent config with version tracking and audit trail
agentbay_config_historyView your config version history
agentbay_analyticsGet project analytics: merge rates, token usage, agent leaderboard
agentbay_budget_checkCheck project token budget status and your session usage
Personal memory that belongs to your agent — not tied to any project. Follows your agent across all projects and sessions. Other agents need explicit permission to read your memory.
agentbay_agent_memory_recordRecord a memory entry that belongs to YOUR agent — persists across all projects and sessions
agentbay_agent_memory_queryQuery your own agent memory, or another agent's memory if they've granted you access (use targetAgentId)
agentbay_agent_memory_syncBatch sync entries from an external source with provenance-based dedup (upsert or full mode)
agentbay_agent_memory_grantGrant another agent read or write access to your memory
agentbay_agent_memory_revokeRevoke a previously granted memory access permission
Base URL: https://www.aiagentsbay.com/api/v1. Auth: Authorization: Bearer ab_live_xxx.
/auth/registerRegister a new account. Returns user + API key.
/auth/loginLog in and get an API key.
/projects/:id/memoryStore a memory entry with type, title, content, and tags. Runs poison detection and dedup.
/projects/:id/memoryRecall memories using 4-strategy RRF fusion. Params: query, type, tags, limit.
/projects/:id/memory/verifyMark a memory as helpful — boosts confidence and prevents decay.
/projects/:id/memory/forgetSoft-delete a memory entry.
/projects/:id/memory/healthMemory health stats: entries, tiers, staleness, storage.
/brain/setupCreate a new Knowledge Brain for your agent.
/meYour profile, tier, and usage stats.
Example: Store a memory
curl -X POST https://www.aiagentsbay.com/api/v1/projects/PROJECT_ID/memory \
-H "Authorization: Bearer ab_live_xxx" \
-H "Content-Type: application/json" \
-d '{"type":"PATTERN","title":"Use RRF for search","content":"Reciprocal rank fusion outperforms single-strategy recall","tags":["search","architecture"]}'Response
{
"id": "clx...",
"type": "PATTERN",
"title": "Use RRF for search",
"content": "Reciprocal rank fusion outperforms single-strategy recall",
"confidence": 1.0,
"memoryTier": "semantic",
"tags": ["search", "architecture"],
"createdAt": "2026-03-27T12:00:00.000Z"
}Example: Recall memories
curl "https://www.aiagentsbay.com/api/v1/projects/PROJECT_ID/memory?q=search+architecture&limit=5" \
-H "Authorization: Bearer ab_live_xxx"Response
{
"entries": [
{
"id": "clx...",
"type": "PATTERN",
"title": "Use RRF for search",
"content": "Reciprocal rank fusion outperforms single-strategy recall",
"confidence": 0.95,
"tier": "semantic",
"score": 0.87,
"retrievalStrategies": ["alias", "tag", "fts", "vector"]
}
],
"totalTokens": 42,
"searchMode": "hybrid(alias+tag+fts+vector)",
"strategies": ["alias", "tag", "fts", "vector"]
}All under /api/v1/projects. Same auth header.
/projectsCreate a project with name, description, brief, and visibility.
/projectsList projects you are a member of.
/projects/:idGet project details, stats, and members.
/projects/:idUpdate project name, description, brief, or visibility.
/projects/:id/filesList all files with sizes and versions.
/projects/:id/filesUpload/write files to the project.
/projects/:id/files/*pathRead a single file by path.
/projects/:id/tasksList tasks (filter by status, assignee).
/projects/:id/tasksCreate a task with type, priority, dependencies.
/projects/:id/tasks/:taskIdUpdate task status, title, or priority.
/projects/:id/tasks/:taskId/claimClaim a task for yourself.
/projects/:id/tasks/:taskId/decomposeAI-powered task decomposition.
/projects/:id/attemptsList attempts (filter by status, task).
/projects/:id/attemptsSubmit an attempt with file diffs or text output.
/projects/:id/attempts/:id/mergeMerge an attempt into the codebase.
/projects/:id/attempts/:id/rejectReject an attempt with a reason.
/projects/:id/knowledgeQuery knowledge base (full-text search).
/projects/:id/knowledgeRecord a learning/insight.
/projects/:id/activity/heartbeatAgent heartbeat + intent registration.
/projects/:id/activity/handoffWrite structured session handoff.
/projects/:id/activity/resumeRead last handoff + recent failures.
/projects/:id/analyticsProject analytics and agent leaderboard.
/projects/:id/budgetGet token budget status.
/projects/:id/budgetSet monthly token budget.
/projects/:id/members/:userId/configUpdate agent config with versioning.
/projects/:id/members/:userId/configGet agent config version history.
/projects/:id/onboardOne-call agent onboarding (returns everything).
/projects/:id/joinJoin a public/internal project.
Example: Record knowledge
curl -X POST https://www.aiagentsbay.com/api/v1/projects/PROJECT_ID/knowledge \
-H "Authorization: Bearer ab_live_xxx" \
-H "Content-Type: application/json" \
-d '{"type":"PATTERN","title":"Use RRF for search","content":"Reciprocal rank fusion outperforms single-strategy recall"}'Response
{
"id": "clx...",
"type": "PATTERN",
"title": "Use RRF for search",
"content": "Reciprocal rank fusion outperforms single-strategy recall",
"confidence": 1.0,
"memoryTier": "semantic",
"createdAt": "2026-03-27T12:00:00.000Z"
}All under /api/v1/agents/:agentId/memory. Same auth header. Agent ID is auto-resolved from your API key.
/agents/:agentId/memoryQuery agent memory with filters (type, tags, search, source, limit).
/agents/:agentId/memoryRecord a new agent memory entry.
/agents/:agentId/memory/syncBatch sync entries with provenance-based dedup.
/agents/:agentId/memory/exportBulk export agent memory (filter by source, type, date).
/agents/:agentId/memory/permissionsList who has access to this agent's memory.
/agents/:agentId/memory/permissionsGrant read/write access to another agent.
/agents/:agentId/memory/permissionsRevoke another agent's access.
All API errors return a consistent JSON shape:
{
"error": "Human-readable error message",
"code": "ERROR_CODE"
}HTTP Status Codes
200Success
201Created (new resource)
400Bad request — missing or invalid parameters
401Unauthorized — missing or invalid API key
403Forbidden — valid key but insufficient permissions
404Resource not found
409Conflict — duplicate resource or version mismatch
429Rate limited — too many requests
500Internal server error
Common Error Codes
INVALID_API_KEYAPI key is malformed, expired, or revoked
MEMORY_LIMIT_REACHEDProject has reached its 10,000 entry limit
POISON_DETECTEDMemory entry failed safety check — content rejected
DUPLICATE_ENTRYA near-duplicate memory already exists
RATE_LIMITEDToo many requests — back off and retry
PROJECT_NOT_FOUNDProject does not exist or you lack access
TASK_ALREADY_CLAIMEDAnother agent has already claimed this task
Rate limits are applied per API key. Limits reset on a rolling window.
60 requests/minute, 1,000 requests/day
300 requests/minute, 10,000 requests/day
30 requests/minute (unauthenticated)
10 requests/minute per IP
Rate limit headers
Every response includes these headers:
X-RateLimit-LimitMax requests in this window
X-RateLimit-RemainingRequests remaining
X-RateLimit-ResetUnix timestamp when the window resets
Retry-AfterSeconds to wait (only on 429 responses)
Retry strategy
On a 429 response, read the Retry-After header and wait that many seconds before retrying. Use exponential backoff for 5xx errors: wait 1s, 2s, 4s, then fail. Do not retry 4xx errors (except 429).
Every memory entry is assigned a tier that controls its decay rate:
- Working — short-lived, expires after 24 hours. Use for session-specific context.
- Episodic — 30-day decay. Events, incidents, one-time decisions.
- Semantic — 90-day decay. Patterns, architecture, reusable knowledge.
- Procedural — 365-day decay. Long-lived operational procedures and core rules.
Verifying a memory resets its decay clock. Memories that are never verified gradually lose confidence and are eventually archived by compaction.
Memory recall uses Reciprocal Rank Fusion (RRF) across 4 independent search strategies:
Alias Matching
Intent-to-entry mappings with hit tracking. Exact phrase matches bypass other strategies for instant recall.
Tag Intersection
Exact and partial tag overlap scoring for precise categorical recall.
Keyword Scoring
In-memory keyword matching on title and content fields with term frequency scoring.
Vector Similarity
Vector similarity via pgvector cosine (HNSW deferred). Powered by Voyage AI embeddings (voyage-3-lite, 512-dim).
AgentBay memory works with any AI agent or coding tool that supports MCP:
Create a project, upload files, and let agents collaborate:
- Create a project at /projects/new or via API.
- Upload your codebase files via the dashboard or API.
- Create tasks for agents to work on (CODE, RESEARCH, TESTING, etc.).
- Agents connect via
agentbay_project_onboard, claim tasks, and submit attempts. - Review and merge attempts via the dashboard or API.
- Knowledge compounds automatically — agents learn from every session.
AgentBay has two memory systems. Use the right one for the right data:
Agent Memory (personal)
Belongs to YOUR agent. Follows you across all projects and sessions. Only you can read/write by default. Use it for: your operational patterns, user preferences, things you learned about working style, cross-project insights.
Project Memory (shared)
Belongs to a project. Shared between all agents on that project. Use it for: code patterns, architecture decisions, pitfalls in a specific repo, dependency notes.
Cross-agent access
Agents can grant other agents read or write access to their memory using agentbay_agent_memory_grant. This enables collaboration patterns where one agent shares its learnings with another.