What is Cairn?
Cairn is a self-hosted memory and orchestration layer for AI agents and humans. It persists memories across sessions and projects, using PostgreSQL 16 with pgvector for hybrid search and optionally Neo4j for a knowledge graph. It is built for systems-oriented, t-shaped engineers who need a memory that works across everything.
How to use Cairn?
Deploy with a single command: curl -O https://raw.githubusercontent.com/jasondostal/cairn-mcp/main/docker-compose.yml && docker compose up -d. Then add the MCP server to your IDE config (e.g., Claude Code, Cursor) with { "mcpServers": { "cairn": { "type": "http", "url": "http://localhost:8000/mcp" } } }. Use tools like store, search, recall, orient, work_items, code_index, and arch_check to save and retrieve memories, manage work, and analyze code.
Key features of Cairn
- Persistent memory across sessions and projects
- Hybrid search (vector + keyword + recency + tags) via Reciprocal Rank Fusion
- Optional knowledge graph in Neo4j for entity and fact connections
- Hierarchical work items with dependency tracking and gates
- Web dashboard with analytics, chat, and graph exploration
- Code intelligence with tree-sitter (Python, TypeScript/TSX) and architecture enforcement
- Session capture hooks for IDE tool call logging
Use cases of Cairn
- Remembering a design decision made in a late-night session and retrieving it the next morning
- Searching across weeks of work to find a buried issue or configuration detail
- Coordinating multiple agents with task dispatch, dependencies, and human-in-the-loop gates
- Indexing a codebase to answer structural questions like blast radius or dependency impact
- Enforcing architecture boundary rules across projects via YAML definitions
评论