agent-memory
Syncs stored memories to an Obsidian vault using a configurable vault path and sync folder, optionally through the Obsidian Agent Memory plugin.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Agent Memory
Persistent memory system for AI agents. Store, search, and consolidate knowledge across sessions via an MCP server.
Works with any MCP-compatible client: Claude Code, Cursor, Windsurf, Cline, or custom agents.
pip install agent-memory-serverQuick Start
For Claude Code Users
# 1. Add the MCP server
claude mcp add --transport stdio agent-memory -- uvx agent-memory-server
# 2. Install the agent skill (teaches Claude when to use memory)
npx skills add khanglvm/agent-memory -gFor Other Clients
Configure in your client's MCP settings:
{
"mcpServers": {
"agent-memory": {
"type": "stdio",
"command": "uvx",
"args": ["agent-memory-server"]
}
}
}Related MCP server: Kirok
Features
9 Tools for memory management:
store_memory— Save facts, preferences, procedures, episodessearch_memory— Semantic search across memoriesupdate_memory— Modify existing memoriesdelete_memory— Remove outdated memorieslist_memories— Browse memories by namespaceget_memory_stats— View statisticsconsolidate_memories— Find patterns and insightsingest_text— Ingest raw textingest_file— Ingest files (within allowed paths)
4 Resources for read-only access:
memory://stats— Global statisticsmemory://recent/{namespace}— Last 10 memoriesmemory://namespaces— All namespacesmemory://consolidations/{namespace}— Recent insights
Organize memories by namespace (e.g., global, project:myapp) and category (fact, preference, procedure, episode).
Installation
Via pip:
pip install agent-memory-serverFrom source:
git clone https://github.com/khanglvm/agent-memory.git
cd agent-memory
pip install -e ".[dev]"With custom config:
agent-memory-server --config ~/.agent-memory/config.yamlConfiguration
Zero-config default: SQLite at ~/.agent-memory/memory.db with recency search.
Enable semantic search with embedding provider:
embedding:
provider: openai
api_key: ${OPENAI_API_KEY}
model: text-embedding-3-small
consolidation:
provider: openai
api_key: ${OPENAI_API_KEY}
model: gpt-4o-miniAlternatives: Ollama (local, no API key) or disable embeddings entirely.
Environment variables override config with AGENT_MEMORY_ prefix:
export AGENT_MEMORY_EMBEDDING__PROVIDER=ollama
export AGENT_MEMORY_SERVER__TRANSPORT=httpTransport
Default: stdio (used by MCP clients).
HTTP mode for remote agents:
agent-memory-server --transport http --host 0.0.0.0 --port 8888Requires bearer token for non-localhost:
AGENT_MEMORY_AUTH_TOKEN=secret agent-memory-server --transport http --host 0.0.0.0Multi-Device Setup (Hub-Spoke via Tailscale)
For multi-device setups where a central Mac Mini serves as the memory hub:
On the hub (Mac Mini):
# Start with HTTP transport, vault sync, and auth
AGENT_MEMORY_AUTH_TOKEN=your-secret agent-memory-server \
--transport http --host 0.0.0.0 --port 8888Configure config.yaml:
server:
transport: http
http_host: 0.0.0.0
http_port: 8888
auth_token: ${AGENT_MEMORY_AUTH_TOKEN}
tls_cert: /path/to/cert.pem # Optional: Tailscale HTTPS
tls_key: /path/to/key.pem
vault:
enabled: true
vault_path: ~/Vault
sync_folder: memory-vault
write_on_store: true
api_port: 8889On dev Macs (spokes):
# Quick setup via script
./scripts/setup-client.sh https://macmini.tail:8888
# Or manually add to Claude Code MCP config:
# ~/.claude/settings.json or .mcp.json{
"mcpServers": {
"agent-memory": {
"type": "http",
"url": "https://macmini.tail:8888/mcp",
"headers": {
"Authorization": "Bearer ${AGENT_MEMORY_AUTH_TOKEN}"
}
}
}
}Requirements:
Tailscale installed on all devices (free personal plan)
Same tailnet for hub and spokes
AGENT_MEMORY_AUTH_TOKENenv var set on all devices
See Obsidian Agent Memory Plugin for Obsidian vault sync.
Architecture
Three layers:
API Layer: 9 MCP tools + 4 resources via stdio or HTTP
Processing: Pluggable embedding providers (OpenAI/Ollama/None) and consolidation LLMs
Storage: SQLite + sqlite-vec for vector search, automatic fallback to recency search
Development
pip install -e ".[dev]"
pytest tests/ -v # Run tests
ruff check src/ tests/ # Lint
python -m agent_memory # Run serverDocumentation
Project Overview & PDR — Vision, features, metrics
System Architecture — Design, data flow, security
Code Standards — Style, patterns, testing
Deployment Guide — Installation, config, troubleshooting
Codebase Summary — Module reference
Roadmap — Status and future direction
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory for AI agents. Search and store durable facts, preferences and decisions.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Universal persistent memory and knowledge retrieval layer for AI agents and LLMs.
Persistent memory for AI agents. Search, store, and recall across sessions.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides persistent key-value storage with full-text search, tags, and namespaces for AI agents to maintain context across sessions.7MIT
- AlicenseAqualityCmaintenanceProvides persistent, searchable memory for AI agents, enabling them to retain, recall, and reflect on information across conversations.191MIT
- FlicenseNot gradedqualityDmaintenanceProvides AI agents with persistent, searchable long-term memory across sessions, enabling storage, full-text retrieval, updates, GDPR-compliant deletion, session summaries, and cross-referencing with per-namespace isolation.-
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to capture, classify, synthesize, and retrieve persistent knowledge through MCP and REST APIs, so multiple agents can share memory and improve across sessions. It provides full-text, semantic, and hybrid search with token-optimized context retrieval from sources like Obsidian, code, transcripts, and terminal sessions.10 npmMIT