Warning — database and Docker: With Docker Compose (
cd agent-memory && docker compose up --build), Postgres and Redis are included and the API’sDATABASE_URLis wired in compose — you do not need to set DB URLs in.envfor that default run. If you run the API without Docker, you must provide PostgreSQL (pgvector) + Redis and correctDATABASE_URL/REDIS_URLinagent-memory/.env. The live server always needs a real database; skipping that is only possible if you only point MCP or other clients at someone else’s hosted API. Details:docs/DEPLOYMENT.md.
MCP package on PyPI: agent-memory-mcp
Monorepo for agent-memory: a FastAPI service with PostgreSQL (pgvector), Redis, a trust-decay engine, policy rules, optional React dashboard, and an MCP package for tool integrations. Design rationale, problem framing, and related work: docs/RESEARCH.md.
git clone https://github.com/OWNER/REPO.git
cd REPO/agent-memory
docker compose up --buildIn another terminal (with the API up):
cd agent-memory
PYTHONPATH=. python backend/demo_simulation.pyOn Windows PowerShell use $env:PYTHONPATH = "$PWD" instead of PYTHONPATH=..
+---------------------+
| Browser (:3000) |
| Vite + nginx |
+----------+----------+
| HTTP
v
+------------+ cache +---------------------------+
| Redis |<-----------| FastAPI (:8000) |
| trust/keys | | agents · memories · stats |
+------------+ | graph · admin · rules |
^ +-------------+-------------+
| |
| async SQLAlchemy v
| +---------------------------+
+-------------------| PostgreSQL + pgvector |
| memories · provenance · |
| trust_metric_snapshots |
+---------------------------+
Background tasks periodically recompute trust scores and may flag anomalies. See agent-memory/CONTRIBUTING.md for the data-model diagram in more detail.
| Topic | Location |
|---|---|
Docker vs local DB, .env, MCP without hosting DB |
docs/DEPLOYMENT.md |
| Research background (design rationale, related work) | docs/RESEARCH.md |
| Rules reference & how to add a rule | agent-memory/backend/rules/README.md |
| Contributing (tests, Docker, model overview) | agent-memory/CONTRIBUTING.md |
| Service README (ports, API highlights, dev, MCP) | agent-memory/README.md |
The agent-memory-mcp package exposes the HTTP API as MCP tools. Install and configure the stdio server as described in agent-memory/README.md (MCP section) and in agent_memory_mcp/config.py (AGENT_MEMORY_API_URL, AGENT_MEMORY_API_PREFIX).
Example Claude Desktop snippet:
{
"mcpServers": {
"agent-memory": {
"command": "python",
"args": ["-m", "agent_memory_mcp.server"],
"env": {
"AGENT_MEMORY_API_URL": "http://localhost:8000",
"AGENT_MEMORY_API_PREFIX": ""
}
}
}
}Replace OWNER/REPO in the Quick start git clone URL with your GitHub org and repository name after publishing.
License: MIT. For the full legal text plus non-binding author requests (citation when you share work publicly, and a quick heads-up for commercial use), see LICENSE.