You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rebuilds the search index for Redis Memory Server.
202
+
```bash
203
+
agent-memory rebuild_index
204
+
```
205
+
206
+
#### `migrate_memories`
207
+
Runs data migrations. Migrations are reentrant.
208
+
```bash
209
+
agent-memory migrate_memories
210
+
```
211
+
200
212
To see help for any command, you can use `--help`:
201
213
```bash
202
214
agent-memory --help
@@ -207,25 +219,39 @@ agent-memory mcp --help
207
219
208
220
## Getting Started
209
221
210
-
### Local Install
222
+
### Installation
211
223
212
224
First, you'll need to download this repository. After you've downloaded it, you can install and run the servers.
213
225
214
-
1. Install the package and required dependencies with pip, ideally into a virtual environment:
215
-
```bash
216
-
pip install -e .
217
-
```
218
-
219
-
**NOTE:** This project uses `uv` for dependency management, so if you have uv installed, you can run `uv sync` instead of `pip install ...` to install the project's dependencies.
226
+
This project uses [uv](https://github.com/astral-sh/uv) for dependency management.
220
227
221
-
2 (a). The easiest way to start the REST API server and MCP server in SSE mode is to use Docker Compose. See the Docker Compose section of this file for more details.
228
+
1. Install uv:
229
+
```bash
230
+
pip install uv
231
+
```
222
232
223
-
2 (b). You can also run the REST API and MCP servers directly, e.g.:
224
-
#### REST API (direct, without CLI)
233
+
2. Install the package and required dependencies:
225
234
```bash
226
-
python -m agent_memory_server.main
235
+
uv sync
227
236
```
228
237
238
+
2. Set up environment variables (see Configuration section)
239
+
240
+
### Running
241
+
242
+
The easiest way to start the REST and MCP servers is to use Docker Compose. See the Docker Compose section of this file for more details.
243
+
244
+
But you can also run these servers via the CLI commands. Here's how you
245
+
run the REST API server:
246
+
```bash
247
+
uv run agent-memory api
248
+
```
249
+
250
+
And the MCP server:
251
+
```
252
+
uv run agent-memory mcp --mode <stdio|sse>
253
+
```
254
+
229
255
**NOTE:** With uv, prefix the command with `uv`, e.g.: `uv run agent-memory --mode sse`. If you installed from source, you'll probably need to add `--directory` to tell uv where to find the code: `uv run --directory <path/to/checkout> run agent-memory --mode stdio`.
230
256
231
257
### Docker Compose
@@ -293,52 +319,12 @@ Cursor's MCP config is similar to Claude's, but it also supports SSE servers, so
293
319
294
320
## Configuration
295
321
296
-
You can configure the service using environment variables:
297
-
298
-
| Variable | Description | Default |
299
-
|----------|-------------|---------|
300
-
|`REDIS_URL`| URL for Redis connection |`redis://localhost:6379`|
|`ENABLE_NER`| Enable/disable named entity recognition |`True`|
312
-
|`MCP_PORT`| MCP server port |9000|
313
-
322
+
You can configure the MCP and REST servers and task worker using environment
323
+
variables. See the file `config.py` for all the available settings.
314
324
315
-
## Development
316
-
317
-
### Installation
318
-
319
-
This project uses [uv](https://github.com/astral-sh/uv) for dependency management.
320
-
321
-
1. Install dependencies:
322
-
```bash
323
-
uv sync --all-extras
324
-
```
325
-
326
-
2. Set up environment variables (see Configuration section)
327
-
328
-
3. Run the API server:
329
-
```bash
330
-
agent-memory api
331
-
```
332
-
333
-
4. In a separate terminal, run the MCP server (use either the "stdio" or "sse" options to set the running mode) if you want to test with tools like Cursor or Claude:
334
-
```bash
335
-
agent-memory mcp --mode <stdio|sse>
336
-
```
337
-
338
-
### Running Tests
339
-
```bash
340
-
python -m pytest
341
-
```
325
+
The names of the settings map directly to an environment variable, so for
326
+
example, you can set the `openai_api_key` setting with the `OPENAI_API_KEY`
0 commit comments