Agent Integration Guide
This guide is for AI agents and developers building agents that need long-term memory. Bossa gives your agents a persistent filesystem to store and retrieve context across sessions—as simple as files, as powerful as Postgres. Use the managed service so your agents get persistent, searchable storage without running infrastructure. Base URL:https://bossamemory.comMCP endpoint:
https://bossamemory.com/mcp
Quick Start for Agents
-
Get an API key — Install the CLI (
pip install bossa-memory), sign up, create a workspace, create a key. See Getting Started. -
Add Bossa to your agent config — Run
bossa initto add Bossa usage instructions to AGENTS.md or CLAUDE.md. Your agent will know the commands, flags, and exit codes. Usebossa init --path ./AGENTS.md --yesfor non-interactive setup. -
Choose your interface:
- CLI — If your agent runs tools as subprocesses (CLI-based harnesses, beads), use
bossa files ls,read,write,grep,glob,edit,delete. SetBOSSA_CLI_JSON=1for JSON output. - MCP — If your harness supports MCP (LangChain, Claude, Cursor), connect to
https://bossamemory.com/mcpwith headersAuthorization: Bearer YOUR_API_KEYorX-API-Key: YOUR_API_KEY.
- CLI — If your agent runs tools as subprocesses (CLI-based harnesses, beads), use
-
Use the tools — Both interfaces expose the same operations:
ls,read/read_file,write/write_file,grep,glob/glob_search,edit/edit_file,delete/delete_file.
CLI Example (agent subprocess)
When your agent executes tools as subprocesses:LangChain Example (MCP)
Tool Usage Patterns
These patterns apply to both MCP tools and CLI commands. MCP usesread_file; CLI uses bossa files read. They are examples of dynamic context discovery—pulling only the context you need, when you need it.
Explore Before Reading
Usels to discover structure, then read/read_file only for relevant files:
Search Without Reading Everything
Usegrep with output_mode="files_with_matches" to find files, then read only matches:
Batch Operations (CLI)
For agents doing many ops, usebossa files batch to reduce round-trips:
Save Agent Output
Usewrite_file (MCP) or bossa files write (CLI) to persist summaries, analyses, or memory:
Edit In Place
Useedit_file (MCP) or bossa files edit (CLI) for targeted changes instead of read → modify → write:
Environment Variables for Examples
| Variable | Description |
|---|---|
BOSSA_API_URL | https://bossamemory.com (managed service) |
BOSSA_API_KEY | Your workspace API key |
OPENAI_API_KEY | For LangChain/OpenAI agents |
—safe Flag for Harnesses
Read-only commands (ls, read, grep, glob, stat, tree, du) support --safe. Use it when your agent harness gates tool execution: --safe signals that the operation is read-only and can be auto-approved.