{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreif45yctqynf25dqjo77pchlceyviywrlylxfztg53mscavb6fb2ye",
    "uri": "at://did:plc:25rdn5elo5izoxrmtis34zuk/app.bsky.feed.post/3mogxql54fia2"
  },
  "coverImage": {
    "$type": "blob",
    "ref": {
      "$link": "bafkreigjqsrbc2pmtevnyif5zz7642lmf52qx6p32zsjeq6gltrllpthhi"
    },
    "mimeType": "image/webp",
    "size": 64864
  },
  "path": "/aubakirovarman/im-building-cortexdb-an-agent-native-context-database-for-ai-agents-59fe",
  "publishedAt": "2026-06-16T23:02:22.000Z",
  "site": "https://dev.to",
  "tags": [
    "rag",
    "agents",
    "rust",
    "database",
    "https://github.com/AubakirovArman/CortexDB"
  ],
  "textContent": "#  I'm building CortexDB — an agent-native context database for AI agents\n\nMost modern RAG systems work like this:\n\n  1. Split documents into chunks\n  2. Generate embeddings\n  3. Store them in a vector database\n  4. Retrieve top-k similar chunks on query\n  5. Send them to an LLM\n\n\n\nIt works for simple use cases. But as AI agents become more autonomous and complex, a clear problem appears:\n\n> Agents don’t just need similar text chunks.\n>\n>  They need **bounded, permission-safe, evidence-aware, and verifiable context**.\n\nThis is why I started building **CortexDB**.\n\n**GitHub:** https://github.com/AubakirovArman/CortexDB\n\n##  What is CortexDB?\n\n**CortexDB** is a single-node, agent-native context database. Its main goal is to compile **ContextPacks** — structured, citation-rich, token-budgeted bundles of context for AI agents.\n\nInstead of returning raw chunks, it returns a ready-to-use package that includes:\n\n  * Source citations\n  * Explanation of why each piece was selected\n  * Token usage information\n  * Anomaly and conflict detection\n  * Permission and scope awareness\n\n\n\n##  Key Features\n\n  * **ContextPack** — structured output format with citations and token control\n  * **VERIFY FACT** — deterministic fact verification (including numerical conflicts)\n  * **AQL** — custom declarative query language designed for agents\n  * **Tool Registry** + **Typed Knowledge Graph**\n  * Durable single-node storage (WAL + MVCC)\n  * Published SDKs for **Python** , **TypeScript** , and **Rust**\n\n\n\n##  Example: ContextPack\n\n\n    json\n    {\n      \"token_budget_tokens\": 4000,\n      \"estimated_tokens\": 2500,\n      \"truncated\": false,\n      \"citations_required\": true,\n      \"cells\": [...],\n      \"anomalies\": [...]\n    }\n",
  "title": "I'm building CortexDB — an agent-native context database for AI agents"
}