{
  "markdown": "# Central Intelligence\n\n**Agents forget. CI remembers.**\n\nPersistent memory for AI agents. Store, recall, and share information across sessions. Works with Claude Code, Cursor, LangChain, CrewAI, and any agent that supports MCP.\n\n**CI never rewrites your memories.** Facts are extracted for search, but your content is always returned verbatim. No junk memories, no hallucinated rewrites, no data loss.\n\n[![npm](https://img.shields.io/npm/v/central-intelligence-mcp)](https://www.npmjs.com/package/central-intelligence-mcp)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n\n\n[![Central Intelligence MCP server](https://glama.ai/mcp/servers/AlekseiMarchenko/central-intelligence/badges/card.svg)](https://glama.ai/mcp/servers/AlekseiMarchenko/central-intelligence)\n\n[![LifeBench 52.2%](https://img.shields.io/badge/LifeBench_(2026)-52.2%25-6d5aff?style=for-the-badge)](https://arxiv.org/abs/2603.03781)\n[![LongMemEval 75.0%](https://img.shields.io/badge/LongMemEval-75.0%25-6d5aff?style=for-the-badge)](https://arxiv.org/abs/2410.10813)\n[![AMB 90/100](https://img.shields.io/badge/AMB_Score-90%2F100_(A%2B)-22c55e?style=for-the-badge)](https://github.com/AlekseiMarchenko/agent-memory-benchmark)\n\n## Quick Start (30 seconds)\n\n```bash\n# One command — gets API key + auto-configures your AI tools\nnpx central-intelligence-local signup\n\n# Done. Your agent now has persistent memory.\n# Restart Claude Code / Cursor / Windsurf to activate.\n```\n\nOr run locally with no cloud:\n\n```bash\nnpm i -g central-intelligence-local && ci dashboard\n# Installs and opens the dashboard at localhost:3141\n```\n\n## When to Use Central Intelligence\n\n> **Heuristic:** If you would write it in a note to your future self, store it in Central Intelligence.\n\n| Scenario | What to do |\n|----------|-----------|\n| Starting a new session, need context from before | `recall` or `context` |\n| Discovered something important (architecture, preferences, fixes) | `remember` |\n| Multiple agents working on the same project | `share` with user/org scope |\n| You keep re-learning the same things each session | `remember` once, `recall` forever |\n| Handing off a task to another agent or session | `remember` key decisions, next agent calls `context` |\n| User tells you the same preferences repeatedly | `remember` them, check with `recall` next time |\n\n**Don't store:** secrets, passwords, API keys, PII, large binary files, or ephemeral scratch data.\n\n## The Problem\n\nEvery AI agent session starts from zero. Your agent learns your preferences, understands your codebase, figures out your architecture — then the session ends and it forgets everything. Next session? Same questions. Same mistakes. Same context-building from scratch.\n\nCentral Intelligence fixes this.\n\n## What It Does\n\nFive MCP tools give your agent a long-term memory:\n\n| Tool | Description | Example |\n|------|-------------|---------|\n| **`remember`** | Store information for later | \"User prefers TypeScript and deploys to Fly.io\" |\n| **`recall`** | Semantic search across past memories | \"What does the user prefer?\" |\n| **`context`** | Auto-load relevant memories for the current task | \"Working on the auth system refactor\" |\n| **`forget`** | Delete outdated or incorrect memories | `forget(\"memory_abc123\")` |\n| **`share`** | Make memories available to other agents | scope: \"agent\" → \"org\" |\n\n## Benchmarks\n\n### LifeBench (2026) — Long-Term Multi-Source Memory\n\nCI scores **52.2%** on [LifeBench](https://arxiv.org/abs/2603.03781), the hardest published memory benchmark (2,003 questions across 10 users, 51K real-world events including messages, calendar, health records, notes, and calls).\n\n| Overall | Info Extraction | Multi-hop | Temporal | Nondeclarative |\n|---------|-----------------|-----------|----------|----------------|\n| **52.2%** | **47.2%** | **52.9%** | **46.4%** | **64.1%** |\n\nAnswer model: `gpt-5.4-mini`. Judge: `gpt-4.1-mini`. Evaluation harness: [lifebench-eval](https://github.com/AlekseiMarchenko/lifebench-eval).\n\n### LongMemEval (ICLR 2025) — Conversational Memory\n\nCI scores **75.0%** on [LongMemEval](https://arxiv.org/abs/2410.10813), testing conversational memory across 500 questions spanning single-session recall, multi-session reasoning, temporal reasoning, knowledge updates, and preference tracking.\n\n| Overall | Single-session | Multi-session | Temporal | Preference |\n|---------|----------------|---------------|----------|------------|\n| **75.0%** | **91.9%** | **66.2%** | **69.9%** | **76.7%** |\n\nAnswer model: `gpt-5.4-mini`. Judge: `gpt-4o`. Evaluation harness: [lifebench-eval](https://github.com/AlekseiMarchenko/lifebench-eval).\n\n### Agent Memory Benchmark (AMB) — Infrastructure Testing\n\nTest CI against other providers using the open-source [Agent Memory Benchmark](https://github.com/AlekseiMarchenko/agent-memory-benchmark):\n\n```bash\nnpx agent-memory-benchmark --provider central-intelligence --api-key $CI_API_KEY\n```\n\n> **Note:** AMB is maintained by the same author as Central Intelligence. Run it yourself and verify the results. PRs with new provider adapters are welcome.\n\n## Roadmap\n\nAdvanced retrieval — fact extraction, entity graph, multi-hop reasoning, temporal inference, explainability traces — is prototyped in the codebase and coming to Enterprise. Architecture details: [v1.0.0 prototype release](https://github.com/AlekseiMarchenko/central-intelligence/releases/tag/v1.0.0). Commercial availability: [pricing](https://centralintelligence.online/#pricing).\n\n## Cross-Tool Memory\n\nCI Local reads config files from **5 AI coding platforms** and makes them searchable alongside your stored memories:\n\n| Platform | Config file | How it's parsed |\n|----------|------------|-----------------|\n| Claude Code | `CLAUDE.md` | Section-based (## headings) |\n| Cursor | `.cursor/rules` | Paragraph-based |\n| Windsurf | `.windsurf/rules` | Paragraph-based |\n| Codex | `codex.md` | Section-based |\n| GitHub Copilot | `.github/copilot-instructions.md` | Section-based |\n\nMemories stored via Claude Code are discoverable when using Cursor, and vice versa. Your AI memory works everywhere, not just in one tool.\n\nRecall responses now include `source` (which tool the memory came from), `freshness_score` (how recent), and `duplicate_group` (near-duplicate detection across tools).\n\n## How It Works\n\n```\nAgent (Claude, Cursor, Windsurf, Copilot, Codex)\n    ↓ MCP protocol\nCentral Intelligence MCP Server (local, thin client)\n    ↓\nSQLite + vector embeddings + config file parsing\n    ↓\nHybrid search: vector + FTS5 + fuzzy + temporal decay\n    ↓\nCentral Intelligence API (hosted)\n    ↓\nPostgreSQL + pgvector + fact decomposition + entity graph\n    ↓\n4-way retrieval: vector + BM25 + graph traversal + temporal\n    ↓\nLocal ONNX cross-encoder reranker (zero API cost)\n```\n\nEvery memory is decomposed into structured facts with entities, temporal info, and causal relations. Recall runs a dual-path architecture: both fact-based 4-way search (vector, BM25, graph traversal, temporal) and memory-based 2-way search run in parallel. A query type classifier routes each question to the best retrieval path, and results are fused with Reciprocal Rank Fusion and reranked with a local cross-encoder model. Config files from all supported platforms are parsed, embedded, and cached locally.\n\n## Memory Scopes\n\n| Scope | Visible to | Use case |\n|-------|-----------|----------|\n| `agent` | Only the agent that stored it | Personal context, session continuity |\n| `user` | All agents serving the same user | User preferences, cross-tool context |\n| `org` | All agents in the organization | Shared knowledge, team decisions |\n\n## MCP Server Setup\n\n### Claude Code\n\nAdd to `~/.claude/settings.json` under `mcpServers`:\n\n```json\n{\n  \"central-intelligence\": {\n    \"command\": \"npx\",\n    \"args\": [\"-y\", \"central-intelligence-mcp\"],\n    \"env\": {\n      \"CI_API_KEY\": \"your-api-key\"\n    }\n  }\n}\n```\n\n### Cursor\n\nAdd to `~/.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"central-intelligence\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"central-intelligence-mcp\"],\n      \"env\": {\n        \"CI_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\n### Any MCP-Compatible Client\n\nThe MCP server is published as [`central-intelligence-mcp`](https://www.npmjs.com/package/central-intelligence-mcp) on npm. Point your MCP client to it with the `CI_API_KEY` environment variable set.\n\n## CLI Usage\n\n```bash\n# Install globally\nnpm install -g central-intelligence-local\n\n# Get API key + auto-configure AI tools\nci signup\n\n# Open local memory dashboard\nci dashboard\n\n# Sync local memories to cloud\nci sync\n\n# Audit memory health (duplicates, staleness, health score)\nci audit\n\n# Import from ChatGPT data export\nci chatgpt-import conversations.json\n\n# Export/import memory bundles\nci export -o memories.json\nci import memories.json\n```\n\n## REST API\n\nBase URL: `https://central-intelligence-api.fly.dev`\n\nAll endpoints require `Authorization: Bearer <api-key>` header.\n\n### Create API Key\n\n```bash\ncurl -X POST https://central-intelligence-api.fly.dev/keys \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"name\": \"my-key\"}'\n```\n\n### POST /memories/remember\n\n```json\n{\n  \"agent_id\": \"my-agent\",\n  \"content\": \"User prefers TypeScript over Python\",\n  \"tags\": [\"preference\", \"language\"],\n  \"scope\": \"agent\"\n}\n```\n\n### POST /memories/recall\n\n```json\n{\n  \"agent_id\": \"my-agent\",\n  \"query\": \"what programming language does the user prefer?\",\n  \"limit\": 5\n}\n```\n\nResponse:\n\n```json\n{\n  \"memories\": [\n    {\n      \"id\": \"uuid\",\n      \"content\": \"User prefers TypeScript over Python\",\n      \"relevance_score\": 0.434,\n      \"tags\": [\"preference\", \"language\"],\n      \"scope\": \"agent\",\n      \"created_at\": \"2026-03-22T21:42:34.590Z\"\n    }\n  ]\n}\n```\n\n### POST /memories/context\n\n```json\n{\n  \"agent_id\": \"my-agent\",\n  \"current_context\": \"Setting up a new web project for the user\",\n  \"max_memories\": 5\n}\n```\n\n### DELETE /memories/:id\n\n### POST /memories/:id/share\n\n```json\n{\n  \"target_scope\": \"org\"\n}\n```\n\n### GET /usage\n\nReturns memory counts, usage events, and active agents for the authenticated API key.\n\n## Self-Hosting\n\n```bash\n# Clone and install\ngit clone https://github.com/AlekseiMarchenko/central-intelligence.git\ncd central-intelligence\nnpm install\n\n# Set up PostgreSQL\ncreatedb central_intelligence\npsql -d central_intelligence -f packages/api/src/db/schema.sql\n\n# Configure\ncp .env.example .env\n# Edit .env: set DATABASE_URL and OPENAI_API_KEY\n\n# Run\nnpm run dev:api\n```\n\n### Deploy to Fly.io\n\n```bash\nfly apps create my-ci-api\nfly postgres create --name my-ci-db\nfly postgres attach my-ci-db\nfly secrets set OPENAI_API_KEY=sk-...\nfly deploy\n```\n\nThen point the MCP server to your instance:\n\n```json\n{\n  \"env\": {\n    \"CI_API_KEY\": \"your-key\",\n    \"CI_API_URL\": \"https://your-app.fly.dev\"\n  }\n}\n```\n\n## Architecture\n\n```\ncentral-intelligence/\n├── packages/\n│   ├── api/            # Backend API (Hono + PostgreSQL + pgvector)\n│   │   ├── src/\n│   │   │   ├── db/           # Schema, migrations (facts, entities, pgvector, hybrid)\n│   │   │   ├── middleware/   # Auth, rate limiting, billing, x402 payments\n│   │   │   ├── routes/       # REST endpoints, dashboard, docs, demo\n│   │   │   └── services/     # Core logic:\n│   │   │       ├── memories.ts          # Store + v2 hybrid recall (pgvector + BM25 + RRF + reranker)\n│   │   │       ├── rerank.ts            # bge-reranker-v2-m3 (local ONNX), Cohere API fallback\n│   │   │       ├── embeddings.ts        # OpenAI text-embedding-3-small\n│   │   │       ├── encryption.ts        # AES-256-GCM at rest\n│   │   │       ├── date-parser.ts       # Temporal extraction from memory content\n│   │   │       ├── auth.ts              # API key validation\n│   │   │       ├── fact-extraction.ts   # [Enterprise] Structured fact decomposition via GPT-4o-mini\n│   │   │       ├── entity-resolution.ts # [Enterprise] Trigram + co-occurrence entity merging\n│   │   │       ├── observations.ts      # [Enterprise] Auto-synthesized higher-level facts\n│   │   │       └── query-decompose.ts   # [Enterprise] Query expansion via GPT-4o-mini\n│   │   └── tests/        # Vitest\n│   ├── mcp-server/     # MCP server (npm: central-intelligence-mcp)\n│   ├── cli/            # Cloud CLI (npm: central-intelligence-cli, legacy)\n│   ├── local/          # Local memory with cross-tool config parsing\n│   ├── node-sdk/       # Node.js/TypeScript SDK (npm: central-intelligence-sdk)\n│   ├── python-sdk/     # Python SDK (PyPI: central-intelligence)\n│   └── openclaw-skill/ # OpenClaw skill file\n├── .github/workflows/  # CI (typecheck + test) + Deploy (Fly.io)\n├── benchmark/          # LifeBench VM (self-contained Fly machine)\n├── db/                 # Custom Postgres image with pgvector baked in\n├── landing/            # Landing page\n├── Dockerfile          # API container (non-root, ONNX model pre-cached)\n├── fly.toml            # Fly.io config (iad region, health checks)\n└── README.md\n```\n\n## Pricing\n\n| Tier | Price | Memories | Agents |\n|------|-------|----------|--------|\n| Free | $0 | 500 | Unlimited |\n| Pro | $29/mo | 50,000 | Unlimited |\n| Team | $99/mo | 500,000 | Unlimited |\n\nSee [centralintelligence.online/#pricing](https://centralintelligence.online/#pricing) for the latest.\n\n## Contributing\n\nContributions welcome. Open an issue or PR.\n\n## License\n\n[Apache 2.0](LICENSE)",
  "bytes": 13361,
  "sha": "dc3479a5d05268506b913d92bcc79907abda42fd4ed70741d5b991938cc7377f",
  "repo_slug": "alekseimarchenko/central-intelligence",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_alekseimarchenko_central_intel_d7e777b2/readme"
}