bossa-memory 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,234 @@
1
+ Metadata-Version: 2.4
2
+ Name: bossa-memory
3
+ Version: 0.1.0
4
+ Summary: Virtual filesystem for AI agents, backed by Postgres
5
+ Author: Vinicius
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://bossa.mintlify.app
8
+ Project-URL: Documentation, https://bossa.mintlify.app
9
+ Project-URL: Repository, https://github.com/vinny380/bossa
10
+ Keywords: filesystem,agents,mcp,ai,memory,postgres
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Software Development :: Libraries
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: fastmcp
21
+ Requires-Dist: fastapi
22
+ Requires-Dist: uvicorn[standard]
23
+ Requires-Dist: asyncpg
24
+ Requires-Dist: pydantic
25
+ Requires-Dist: pydantic-settings
26
+ Requires-Dist: python-dotenv
27
+ Requires-Dist: pyjwt
28
+ Requires-Dist: cryptography
29
+ Requires-Dist: typer
30
+ Requires-Dist: rich
31
+ Requires-Dist: supabase
32
+ Requires-Dist: httpx
33
+
34
+ <p align="center">
35
+ <h1 align="center">Bossa</h1>
36
+ <p align="center">
37
+ <strong>The Memory Layer of Your Agents</strong>
38
+ </p>
39
+ <p align="center">
40
+ Persistent, searchable memory — backed by Postgres, exposed as a filesystem. Give your agents <code>ls</code>, <code>read</code>, <code>write</code>, <code>grep</code>, and <code>glob</code> to store and recall knowledge across sessions.
41
+ </p>
42
+ <p align="center">
43
+ <a href="#get-started">Get Started</a> &middot;
44
+ <a href="#dynamic-context-discovery">Dynamic Context Discovery</a> &middot;
45
+ <a href="#cli">CLI</a> &middot;
46
+ <a href="#mcp-tools">MCP</a> &middot;
47
+ <a href="#rest-api">REST API</a> &middot;
48
+ <a href="#examples">Examples</a> &middot;
49
+ <a href="docs/README.md">Docs</a>
50
+ </p>
51
+ </p>
52
+
53
+ ---
54
+
55
+ ## Why Bossa?
56
+
57
+ Agents need memory that persists across sessions and scales with search. Bossa is that memory layer — a **Postgres-backed virtual filesystem** exposed through **CLI**, **MCP** (Model Context Protocol), and **REST**. Your agents use familiar operations — `ls`, `read`, `grep`, `write` — while Bossa translates them to SQL with trigram indexes, full-text search, and workspace-scoped access control.
58
+
59
+ ```
60
+ Agent ──CLI──▶ Bossa ──SQL──▶ Postgres
61
+ ──MCP──▶ (pg_trgm, tsvector, JSONB)
62
+ ──REST─▶
63
+ ```
64
+
65
+ **What you get:**
66
+
67
+ - **Memory as filesystem** — Agents already understand files; no new abstractions. Use `ls`, `read`, `write`, `grep`, `glob`, `edit`, `delete`.
68
+ - **Dynamic context discovery** — Search and explore at runtime instead of packing static prompts. Find what matters without reading everything.
69
+ - **Workspace isolation** — Each agent or tenant gets its own memory space, scoped by API key.
70
+ - **Fast search** — `grep` with boolean logic (`all_of`, `any_of`, `none_of`), regex, pagination, and context lines.
71
+ - **CLI + MCP + REST** — Use the CLI when your agent runs subprocesses; use MCP when your harness supports it (LangChain, Claude, Cursor); use REST for scripts and custom integrations.
72
+
73
+ ---
74
+
75
+ ## Dynamic Context Discovery
76
+
77
+ Traditional **context engineering** means manually assembling prompts with the right docs, examples, and rules. It works, but it's brittle and doesn't scale — you have to guess what context matters upfront.
78
+
79
+ **Dynamic context discovery** flips that: agents discover what they need at runtime. They `ls` to explore structure, `grep` to find relevant files, `read_file` only what matters. Bossa provides the searchable, persistent memory layer that makes this possible.
80
+
81
+ ```mermaid
82
+ flowchart LR
83
+ Agent --> Discover[ls / grep / glob]
84
+ Discover --> Load[read_file]
85
+ Load --> Respond[Respond]
86
+ ```
87
+
88
+ Instead of packing static prompts, let your agents discover context dynamically.
89
+
90
+ ---
91
+
92
+ ## Get Started
93
+
94
+ **Use the managed service** — no infrastructure to run. Give your agents a memory layer and dynamic context discovery in minutes.
95
+
96
+ | Step | Action |
97
+ |------|--------|
98
+ | 1 | [Sign up](docs/GETTING_STARTED.md#2-sign-up--log-in) via the CLI |
99
+ | 2 | [Create a workspace & API key](docs/GETTING_STARTED.md#3-create-a-workspace--api-key) |
100
+ | 3 | [Connect your agent](docs/GETTING_STARTED.md#4-make-your-first-request) via MCP or REST |
101
+
102
+ **Base URL:** `https://filesystem-fawn.vercel.app`
103
+ **MCP endpoint:** `https://filesystem-fawn.vercel.app/mcp`
104
+
105
+ ### Documentation
106
+
107
+ | Doc | Description |
108
+ |-----|-------------|
109
+ | [Getting Started](docs/GETTING_STARTED.md) | Sign up, API key, memory layer setup |
110
+ | [CLI Reference](docs/CLI.md) | Full CLI command reference |
111
+ | [MCP Integration](docs/MCP.md) | Claude, Cursor, LangChain setup |
112
+ | [REST API](docs/REST_API.md) | Full API reference |
113
+ | [Agent Integration](docs/AGENT_INTEGRATION.md) | LangChain examples, tool patterns |
114
+ | [Self-Hosting](docs/SELF_HOSTING.md) | Run Bossa on your own infrastructure |
115
+
116
+ ---
117
+
118
+ ## CLI
119
+
120
+ The Bossa CLI is a first-class interface for agents. When your harness runs tools as subprocesses (e.g. CLI-based agents, beads), use `bossa files` for full filesystem parity with MCP: `ls`, `read`, `write`, `grep`, `glob`, `edit`, `delete`. The CLI also manages accounts, workspaces, and API keys. It defaults to the managed service — no config needed.
121
+
122
+ ```bash
123
+ pip install -r requirements.txt
124
+ # Or: pip install -e .
125
+ ```
126
+
127
+ ```bash
128
+ bossa signup # Create account
129
+ bossa login # Log in
130
+ bossa workspaces create my-app
131
+ bossa keys create my-app # Copy the key — shown once
132
+
133
+ bossa files ls / # List directory
134
+ bossa files read /docs/x.md # Read file
135
+ bossa files put ./doc.txt --target /docs
136
+ bossa files upload ./my-docs --target /docs
137
+ ```
138
+
139
+ **Agent mode:** Use `--json` for machine-readable output, or set `BOSSA_CLI_JSON=1` to get JSON from all commands. Exit codes: 0 success, 1 error, 2 auth failure.
140
+
141
+ See [CLI Reference](docs/CLI.md) for full command reference.
142
+
143
+ ---
144
+
145
+ ## MCP Tools
146
+
147
+ When your agent harness supports MCP (Claude Desktop, Cursor, LangChain), connect to `https://filesystem-fawn.vercel.app/mcp`. Agents use these tools to discover and use context dynamically — list, search, read, and write memory as files. Bossa exposes **7 tools** via MCP.
148
+
149
+ | Tool | What it does |
150
+ |------|--------------|
151
+ | **`ls`** | List files and directories at a path. Directories end with `/`. |
152
+ | **`read_file`** | Return file contents with numbered lines (`1: line text`). |
153
+ | **`write_file`** | Create or overwrite a file. |
154
+ | **`edit_file`** | Replace the first occurrence of a substring in a file. |
155
+ | **`grep`** | Search file contents with literal/regex patterns, boolean filters, pagination. |
156
+ | **`glob_search`** | Find files by glob pattern (e.g. `**/*.py`). |
157
+ | **`delete_file`** | Permanently delete a file. |
158
+
159
+ Pass your API key in headers: `Authorization: Bearer YOUR_API_KEY` or `X-API-Key: YOUR_API_KEY`.
160
+
161
+ ---
162
+
163
+ ## REST API
164
+
165
+ All endpoints under `/api/v1`. Base URL: `https://filesystem-fawn.vercel.app`.
166
+
167
+ | Method | Endpoint | Description |
168
+ |--------|----------|-------------|
169
+ | `POST` | `/api/v1/files` | Create or overwrite a file |
170
+ | `POST` | `/api/v1/files/bulk` | Bulk create/overwrite files |
171
+ | `GET` | `/api/v1/files?path=...` | Read a file |
172
+ | `GET` | `/api/v1/files/list?path=...` | List directory contents |
173
+ | `POST` | `/api/v1/files/search` | Grep search |
174
+ | `GET` | `/api/v1/files/glob?pattern=...&path=...` | Glob search |
175
+ | `PATCH` | `/api/v1/files` | Edit file (replace substring) |
176
+ | `DELETE` | `/api/v1/files?path=...` | Delete a file |
177
+
178
+ Full reference: [docs/REST_API.md](docs/REST_API.md).
179
+
180
+ ---
181
+
182
+ ## Examples
183
+
184
+ ### CLI (agent subprocess)
185
+
186
+ ```bash
187
+ export BOSSA_API_KEY=your-api-key
188
+ export BOSSA_CLI_JSON=1 # JSON output for agents
189
+ bossa files ls /
190
+ bossa files read /memory/summary.md
191
+ echo "New content" | bossa files write /memory/note.txt
192
+ ```
193
+
194
+ ### Interactive chat (MCP, discover context dynamically)
195
+
196
+ ```bash
197
+ export BOSSA_API_URL=https://filesystem-fawn.vercel.app
198
+ export BOSSA_API_KEY=your-api-key
199
+ export OPENAI_API_KEY=sk-...
200
+ python examples/chat.py
201
+ ```
202
+
203
+ ### Scripted agent (LangChain + MCP)
204
+
205
+ ```python
206
+ from langchain_mcp_adapters.client import MultiServerMCPClient
207
+ from langchain.agents import create_agent
208
+
209
+ client = MultiServerMCPClient({
210
+ "bossa": {
211
+ "url": "https://filesystem-fawn.vercel.app/mcp",
212
+ "transport": "streamable_http",
213
+ "headers": {
214
+ "Authorization": "Bearer YOUR_API_KEY",
215
+ "X-API-Key": "YOUR_API_KEY"
216
+ }
217
+ }
218
+ })
219
+ tools = await client.get_tools()
220
+ agent = create_agent("openai:gpt-4o", tools)
221
+ # Use agent.ainvoke(...)
222
+ ```
223
+
224
+ ---
225
+
226
+ ## Self-Hosting
227
+
228
+ Want to run Bossa on your own infrastructure? See [docs/SELF_HOSTING.md](docs/SELF_HOSTING.md) for local Docker setup and Supabase + Vercel deployment.
229
+
230
+ ---
231
+
232
+ ## License
233
+
234
+ MIT
@@ -0,0 +1,201 @@
1
+ <p align="center">
2
+ <h1 align="center">Bossa</h1>
3
+ <p align="center">
4
+ <strong>The Memory Layer of Your Agents</strong>
5
+ </p>
6
+ <p align="center">
7
+ Persistent, searchable memory — backed by Postgres, exposed as a filesystem. Give your agents <code>ls</code>, <code>read</code>, <code>write</code>, <code>grep</code>, and <code>glob</code> to store and recall knowledge across sessions.
8
+ </p>
9
+ <p align="center">
10
+ <a href="#get-started">Get Started</a> &middot;
11
+ <a href="#dynamic-context-discovery">Dynamic Context Discovery</a> &middot;
12
+ <a href="#cli">CLI</a> &middot;
13
+ <a href="#mcp-tools">MCP</a> &middot;
14
+ <a href="#rest-api">REST API</a> &middot;
15
+ <a href="#examples">Examples</a> &middot;
16
+ <a href="docs/README.md">Docs</a>
17
+ </p>
18
+ </p>
19
+
20
+ ---
21
+
22
+ ## Why Bossa?
23
+
24
+ Agents need memory that persists across sessions and scales with search. Bossa is that memory layer — a **Postgres-backed virtual filesystem** exposed through **CLI**, **MCP** (Model Context Protocol), and **REST**. Your agents use familiar operations — `ls`, `read`, `grep`, `write` — while Bossa translates them to SQL with trigram indexes, full-text search, and workspace-scoped access control.
25
+
26
+ ```
27
+ Agent ──CLI──▶ Bossa ──SQL──▶ Postgres
28
+ ──MCP──▶ (pg_trgm, tsvector, JSONB)
29
+ ──REST─▶
30
+ ```
31
+
32
+ **What you get:**
33
+
34
+ - **Memory as filesystem** — Agents already understand files; no new abstractions. Use `ls`, `read`, `write`, `grep`, `glob`, `edit`, `delete`.
35
+ - **Dynamic context discovery** — Search and explore at runtime instead of packing static prompts. Find what matters without reading everything.
36
+ - **Workspace isolation** — Each agent or tenant gets its own memory space, scoped by API key.
37
+ - **Fast search** — `grep` with boolean logic (`all_of`, `any_of`, `none_of`), regex, pagination, and context lines.
38
+ - **CLI + MCP + REST** — Use the CLI when your agent runs subprocesses; use MCP when your harness supports it (LangChain, Claude, Cursor); use REST for scripts and custom integrations.
39
+
40
+ ---
41
+
42
+ ## Dynamic Context Discovery
43
+
44
+ Traditional **context engineering** means manually assembling prompts with the right docs, examples, and rules. It works, but it's brittle and doesn't scale — you have to guess what context matters upfront.
45
+
46
+ **Dynamic context discovery** flips that: agents discover what they need at runtime. They `ls` to explore structure, `grep` to find relevant files, `read_file` only what matters. Bossa provides the searchable, persistent memory layer that makes this possible.
47
+
48
+ ```mermaid
49
+ flowchart LR
50
+ Agent --> Discover[ls / grep / glob]
51
+ Discover --> Load[read_file]
52
+ Load --> Respond[Respond]
53
+ ```
54
+
55
+ Instead of packing static prompts, let your agents discover context dynamically.
56
+
57
+ ---
58
+
59
+ ## Get Started
60
+
61
+ **Use the managed service** — no infrastructure to run. Give your agents a memory layer and dynamic context discovery in minutes.
62
+
63
+ | Step | Action |
64
+ |------|--------|
65
+ | 1 | [Sign up](docs/GETTING_STARTED.md#2-sign-up--log-in) via the CLI |
66
+ | 2 | [Create a workspace & API key](docs/GETTING_STARTED.md#3-create-a-workspace--api-key) |
67
+ | 3 | [Connect your agent](docs/GETTING_STARTED.md#4-make-your-first-request) via MCP or REST |
68
+
69
+ **Base URL:** `https://filesystem-fawn.vercel.app`
70
+ **MCP endpoint:** `https://filesystem-fawn.vercel.app/mcp`
71
+
72
+ ### Documentation
73
+
74
+ | Doc | Description |
75
+ |-----|-------------|
76
+ | [Getting Started](docs/GETTING_STARTED.md) | Sign up, API key, memory layer setup |
77
+ | [CLI Reference](docs/CLI.md) | Full CLI command reference |
78
+ | [MCP Integration](docs/MCP.md) | Claude, Cursor, LangChain setup |
79
+ | [REST API](docs/REST_API.md) | Full API reference |
80
+ | [Agent Integration](docs/AGENT_INTEGRATION.md) | LangChain examples, tool patterns |
81
+ | [Self-Hosting](docs/SELF_HOSTING.md) | Run Bossa on your own infrastructure |
82
+
83
+ ---
84
+
85
+ ## CLI
86
+
87
+ The Bossa CLI is a first-class interface for agents. When your harness runs tools as subprocesses (e.g. CLI-based agents, beads), use `bossa files` for full filesystem parity with MCP: `ls`, `read`, `write`, `grep`, `glob`, `edit`, `delete`. The CLI also manages accounts, workspaces, and API keys. It defaults to the managed service — no config needed.
88
+
89
+ ```bash
90
+ pip install -r requirements.txt
91
+ # Or: pip install -e .
92
+ ```
93
+
94
+ ```bash
95
+ bossa signup # Create account
96
+ bossa login # Log in
97
+ bossa workspaces create my-app
98
+ bossa keys create my-app # Copy the key — shown once
99
+
100
+ bossa files ls / # List directory
101
+ bossa files read /docs/x.md # Read file
102
+ bossa files put ./doc.txt --target /docs
103
+ bossa files upload ./my-docs --target /docs
104
+ ```
105
+
106
+ **Agent mode:** Use `--json` for machine-readable output, or set `BOSSA_CLI_JSON=1` to get JSON from all commands. Exit codes: 0 success, 1 error, 2 auth failure.
107
+
108
+ See [CLI Reference](docs/CLI.md) for full command reference.
109
+
110
+ ---
111
+
112
+ ## MCP Tools
113
+
114
+ When your agent harness supports MCP (Claude Desktop, Cursor, LangChain), connect to `https://filesystem-fawn.vercel.app/mcp`. Agents use these tools to discover and use context dynamically — list, search, read, and write memory as files. Bossa exposes **7 tools** via MCP.
115
+
116
+ | Tool | What it does |
117
+ |------|--------------|
118
+ | **`ls`** | List files and directories at a path. Directories end with `/`. |
119
+ | **`read_file`** | Return file contents with numbered lines (`1: line text`). |
120
+ | **`write_file`** | Create or overwrite a file. |
121
+ | **`edit_file`** | Replace the first occurrence of a substring in a file. |
122
+ | **`grep`** | Search file contents with literal/regex patterns, boolean filters, pagination. |
123
+ | **`glob_search`** | Find files by glob pattern (e.g. `**/*.py`). |
124
+ | **`delete_file`** | Permanently delete a file. |
125
+
126
+ Pass your API key in headers: `Authorization: Bearer YOUR_API_KEY` or `X-API-Key: YOUR_API_KEY`.
127
+
128
+ ---
129
+
130
+ ## REST API
131
+
132
+ All endpoints under `/api/v1`. Base URL: `https://filesystem-fawn.vercel.app`.
133
+
134
+ | Method | Endpoint | Description |
135
+ |--------|----------|-------------|
136
+ | `POST` | `/api/v1/files` | Create or overwrite a file |
137
+ | `POST` | `/api/v1/files/bulk` | Bulk create/overwrite files |
138
+ | `GET` | `/api/v1/files?path=...` | Read a file |
139
+ | `GET` | `/api/v1/files/list?path=...` | List directory contents |
140
+ | `POST` | `/api/v1/files/search` | Grep search |
141
+ | `GET` | `/api/v1/files/glob?pattern=...&path=...` | Glob search |
142
+ | `PATCH` | `/api/v1/files` | Edit file (replace substring) |
143
+ | `DELETE` | `/api/v1/files?path=...` | Delete a file |
144
+
145
+ Full reference: [docs/REST_API.md](docs/REST_API.md).
146
+
147
+ ---
148
+
149
+ ## Examples
150
+
151
+ ### CLI (agent subprocess)
152
+
153
+ ```bash
154
+ export BOSSA_API_KEY=your-api-key
155
+ export BOSSA_CLI_JSON=1 # JSON output for agents
156
+ bossa files ls /
157
+ bossa files read /memory/summary.md
158
+ echo "New content" | bossa files write /memory/note.txt
159
+ ```
160
+
161
+ ### Interactive chat (MCP, discover context dynamically)
162
+
163
+ ```bash
164
+ export BOSSA_API_URL=https://filesystem-fawn.vercel.app
165
+ export BOSSA_API_KEY=your-api-key
166
+ export OPENAI_API_KEY=sk-...
167
+ python examples/chat.py
168
+ ```
169
+
170
+ ### Scripted agent (LangChain + MCP)
171
+
172
+ ```python
173
+ from langchain_mcp_adapters.client import MultiServerMCPClient
174
+ from langchain.agents import create_agent
175
+
176
+ client = MultiServerMCPClient({
177
+ "bossa": {
178
+ "url": "https://filesystem-fawn.vercel.app/mcp",
179
+ "transport": "streamable_http",
180
+ "headers": {
181
+ "Authorization": "Bearer YOUR_API_KEY",
182
+ "X-API-Key": "YOUR_API_KEY"
183
+ }
184
+ }
185
+ })
186
+ tools = await client.get_tools()
187
+ agent = create_agent("openai:gpt-4o", tools)
188
+ # Use agent.ainvoke(...)
189
+ ```
190
+
191
+ ---
192
+
193
+ ## Self-Hosting
194
+
195
+ Want to run Bossa on your own infrastructure? See [docs/SELF_HOSTING.md](docs/SELF_HOSTING.md) for local Docker setup and Supabase + Vercel deployment.
196
+
197
+ ---
198
+
199
+ ## License
200
+
201
+ MIT
@@ -0,0 +1,234 @@
1
+ Metadata-Version: 2.4
2
+ Name: bossa-memory
3
+ Version: 0.1.0
4
+ Summary: Virtual filesystem for AI agents, backed by Postgres
5
+ Author: Vinicius
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://bossa.mintlify.app
8
+ Project-URL: Documentation, https://bossa.mintlify.app
9
+ Project-URL: Repository, https://github.com/vinny380/bossa
10
+ Keywords: filesystem,agents,mcp,ai,memory,postgres
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Topic :: Software Development :: Libraries
18
+ Requires-Python: >=3.10
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: fastmcp
21
+ Requires-Dist: fastapi
22
+ Requires-Dist: uvicorn[standard]
23
+ Requires-Dist: asyncpg
24
+ Requires-Dist: pydantic
25
+ Requires-Dist: pydantic-settings
26
+ Requires-Dist: python-dotenv
27
+ Requires-Dist: pyjwt
28
+ Requires-Dist: cryptography
29
+ Requires-Dist: typer
30
+ Requires-Dist: rich
31
+ Requires-Dist: supabase
32
+ Requires-Dist: httpx
33
+
34
+ <p align="center">
35
+ <h1 align="center">Bossa</h1>
36
+ <p align="center">
37
+ <strong>The Memory Layer of Your Agents</strong>
38
+ </p>
39
+ <p align="center">
40
+ Persistent, searchable memory — backed by Postgres, exposed as a filesystem. Give your agents <code>ls</code>, <code>read</code>, <code>write</code>, <code>grep</code>, and <code>glob</code> to store and recall knowledge across sessions.
41
+ </p>
42
+ <p align="center">
43
+ <a href="#get-started">Get Started</a> &middot;
44
+ <a href="#dynamic-context-discovery">Dynamic Context Discovery</a> &middot;
45
+ <a href="#cli">CLI</a> &middot;
46
+ <a href="#mcp-tools">MCP</a> &middot;
47
+ <a href="#rest-api">REST API</a> &middot;
48
+ <a href="#examples">Examples</a> &middot;
49
+ <a href="docs/README.md">Docs</a>
50
+ </p>
51
+ </p>
52
+
53
+ ---
54
+
55
+ ## Why Bossa?
56
+
57
+ Agents need memory that persists across sessions and scales with search. Bossa is that memory layer — a **Postgres-backed virtual filesystem** exposed through **CLI**, **MCP** (Model Context Protocol), and **REST**. Your agents use familiar operations — `ls`, `read`, `grep`, `write` — while Bossa translates them to SQL with trigram indexes, full-text search, and workspace-scoped access control.
58
+
59
+ ```
60
+ Agent ──CLI──▶ Bossa ──SQL──▶ Postgres
61
+ ──MCP──▶ (pg_trgm, tsvector, JSONB)
62
+ ──REST─▶
63
+ ```
64
+
65
+ **What you get:**
66
+
67
+ - **Memory as filesystem** — Agents already understand files; no new abstractions. Use `ls`, `read`, `write`, `grep`, `glob`, `edit`, `delete`.
68
+ - **Dynamic context discovery** — Search and explore at runtime instead of packing static prompts. Find what matters without reading everything.
69
+ - **Workspace isolation** — Each agent or tenant gets its own memory space, scoped by API key.
70
+ - **Fast search** — `grep` with boolean logic (`all_of`, `any_of`, `none_of`), regex, pagination, and context lines.
71
+ - **CLI + MCP + REST** — Use the CLI when your agent runs subprocesses; use MCP when your harness supports it (LangChain, Claude, Cursor); use REST for scripts and custom integrations.
72
+
73
+ ---
74
+
75
+ ## Dynamic Context Discovery
76
+
77
+ Traditional **context engineering** means manually assembling prompts with the right docs, examples, and rules. It works, but it's brittle and doesn't scale — you have to guess what context matters upfront.
78
+
79
+ **Dynamic context discovery** flips that: agents discover what they need at runtime. They `ls` to explore structure, `grep` to find relevant files, `read_file` only what matters. Bossa provides the searchable, persistent memory layer that makes this possible.
80
+
81
+ ```mermaid
82
+ flowchart LR
83
+ Agent --> Discover[ls / grep / glob]
84
+ Discover --> Load[read_file]
85
+ Load --> Respond[Respond]
86
+ ```
87
+
88
+ Instead of packing static prompts, let your agents discover context dynamically.
89
+
90
+ ---
91
+
92
+ ## Get Started
93
+
94
+ **Use the managed service** — no infrastructure to run. Give your agents a memory layer and dynamic context discovery in minutes.
95
+
96
+ | Step | Action |
97
+ |------|--------|
98
+ | 1 | [Sign up](docs/GETTING_STARTED.md#2-sign-up--log-in) via the CLI |
99
+ | 2 | [Create a workspace & API key](docs/GETTING_STARTED.md#3-create-a-workspace--api-key) |
100
+ | 3 | [Connect your agent](docs/GETTING_STARTED.md#4-make-your-first-request) via MCP or REST |
101
+
102
+ **Base URL:** `https://filesystem-fawn.vercel.app`
103
+ **MCP endpoint:** `https://filesystem-fawn.vercel.app/mcp`
104
+
105
+ ### Documentation
106
+
107
+ | Doc | Description |
108
+ |-----|-------------|
109
+ | [Getting Started](docs/GETTING_STARTED.md) | Sign up, API key, memory layer setup |
110
+ | [CLI Reference](docs/CLI.md) | Full CLI command reference |
111
+ | [MCP Integration](docs/MCP.md) | Claude, Cursor, LangChain setup |
112
+ | [REST API](docs/REST_API.md) | Full API reference |
113
+ | [Agent Integration](docs/AGENT_INTEGRATION.md) | LangChain examples, tool patterns |
114
+ | [Self-Hosting](docs/SELF_HOSTING.md) | Run Bossa on your own infrastructure |
115
+
116
+ ---
117
+
118
+ ## CLI
119
+
120
+ The Bossa CLI is a first-class interface for agents. When your harness runs tools as subprocesses (e.g. CLI-based agents, beads), use `bossa files` for full filesystem parity with MCP: `ls`, `read`, `write`, `grep`, `glob`, `edit`, `delete`. The CLI also manages accounts, workspaces, and API keys. It defaults to the managed service — no config needed.
121
+
122
+ ```bash
123
+ pip install -r requirements.txt
124
+ # Or: pip install -e .
125
+ ```
126
+
127
+ ```bash
128
+ bossa signup # Create account
129
+ bossa login # Log in
130
+ bossa workspaces create my-app
131
+ bossa keys create my-app # Copy the key — shown once
132
+
133
+ bossa files ls / # List directory
134
+ bossa files read /docs/x.md # Read file
135
+ bossa files put ./doc.txt --target /docs
136
+ bossa files upload ./my-docs --target /docs
137
+ ```
138
+
139
+ **Agent mode:** Use `--json` for machine-readable output, or set `BOSSA_CLI_JSON=1` to get JSON from all commands. Exit codes: 0 success, 1 error, 2 auth failure.
140
+
141
+ See [CLI Reference](docs/CLI.md) for full command reference.
142
+
143
+ ---
144
+
145
+ ## MCP Tools
146
+
147
+ When your agent harness supports MCP (Claude Desktop, Cursor, LangChain), connect to `https://filesystem-fawn.vercel.app/mcp`. Agents use these tools to discover and use context dynamically — list, search, read, and write memory as files. Bossa exposes **7 tools** via MCP.
148
+
149
+ | Tool | What it does |
150
+ |------|--------------|
151
+ | **`ls`** | List files and directories at a path. Directories end with `/`. |
152
+ | **`read_file`** | Return file contents with numbered lines (`1: line text`). |
153
+ | **`write_file`** | Create or overwrite a file. |
154
+ | **`edit_file`** | Replace the first occurrence of a substring in a file. |
155
+ | **`grep`** | Search file contents with literal/regex patterns, boolean filters, pagination. |
156
+ | **`glob_search`** | Find files by glob pattern (e.g. `**/*.py`). |
157
+ | **`delete_file`** | Permanently delete a file. |
158
+
159
+ Pass your API key in headers: `Authorization: Bearer YOUR_API_KEY` or `X-API-Key: YOUR_API_KEY`.
160
+
161
+ ---
162
+
163
+ ## REST API
164
+
165
+ All endpoints under `/api/v1`. Base URL: `https://filesystem-fawn.vercel.app`.
166
+
167
+ | Method | Endpoint | Description |
168
+ |--------|----------|-------------|
169
+ | `POST` | `/api/v1/files` | Create or overwrite a file |
170
+ | `POST` | `/api/v1/files/bulk` | Bulk create/overwrite files |
171
+ | `GET` | `/api/v1/files?path=...` | Read a file |
172
+ | `GET` | `/api/v1/files/list?path=...` | List directory contents |
173
+ | `POST` | `/api/v1/files/search` | Grep search |
174
+ | `GET` | `/api/v1/files/glob?pattern=...&path=...` | Glob search |
175
+ | `PATCH` | `/api/v1/files` | Edit file (replace substring) |
176
+ | `DELETE` | `/api/v1/files?path=...` | Delete a file |
177
+
178
+ Full reference: [docs/REST_API.md](docs/REST_API.md).
179
+
180
+ ---
181
+
182
+ ## Examples
183
+
184
+ ### CLI (agent subprocess)
185
+
186
+ ```bash
187
+ export BOSSA_API_KEY=your-api-key
188
+ export BOSSA_CLI_JSON=1 # JSON output for agents
189
+ bossa files ls /
190
+ bossa files read /memory/summary.md
191
+ echo "New content" | bossa files write /memory/note.txt
192
+ ```
193
+
194
+ ### Interactive chat (MCP, discover context dynamically)
195
+
196
+ ```bash
197
+ export BOSSA_API_URL=https://filesystem-fawn.vercel.app
198
+ export BOSSA_API_KEY=your-api-key
199
+ export OPENAI_API_KEY=sk-...
200
+ python examples/chat.py
201
+ ```
202
+
203
+ ### Scripted agent (LangChain + MCP)
204
+
205
+ ```python
206
+ from langchain_mcp_adapters.client import MultiServerMCPClient
207
+ from langchain.agents import create_agent
208
+
209
+ client = MultiServerMCPClient({
210
+ "bossa": {
211
+ "url": "https://filesystem-fawn.vercel.app/mcp",
212
+ "transport": "streamable_http",
213
+ "headers": {
214
+ "Authorization": "Bearer YOUR_API_KEY",
215
+ "X-API-Key": "YOUR_API_KEY"
216
+ }
217
+ }
218
+ })
219
+ tools = await client.get_tools()
220
+ agent = create_agent("openai:gpt-4o", tools)
221
+ # Use agent.ainvoke(...)
222
+ ```
223
+
224
+ ---
225
+
226
+ ## Self-Hosting
227
+
228
+ Want to run Bossa on your own infrastructure? See [docs/SELF_HOSTING.md](docs/SELF_HOSTING.md) for local Docker setup and Supabase + Vercel deployment.
229
+
230
+ ---
231
+
232
+ ## License
233
+
234
+ MIT
@@ -0,0 +1,24 @@
1
+ README.md
2
+ pyproject.toml
3
+ bossa_memory.egg-info/PKG-INFO
4
+ bossa_memory.egg-info/SOURCES.txt
5
+ bossa_memory.egg-info/dependency_links.txt
6
+ bossa_memory.egg-info/entry_points.txt
7
+ bossa_memory.egg-info/requires.txt
8
+ bossa_memory.egg-info/top_level.txt
9
+ cli/__init__.py
10
+ cli/__main__.py
11
+ cli/auth.py
12
+ cli/auth_commands.py
13
+ cli/config.py
14
+ cli/files.py
15
+ cli/keys.py
16
+ cli/main.py
17
+ cli/workspaces.py
18
+ tests/test_api.py
19
+ tests/test_auth.py
20
+ tests/test_cli.py
21
+ tests/test_db.py
22
+ tests/test_filesystem.py
23
+ tests/test_integration.py
24
+ tests/test_mcp_tools.py