{"slug": "cortex-local-context-retrieval-for-ai-coding-agents", "title": "Cortex – Local context retrieval for AI coding agents", "summary": "Cortex, a new open-source tool by Daniel Blomma, provides local context retrieval for AI coding agents by indexing code, symbols, and relationships into a searchable map. It requires Node.js 20.9+ and Git, and can be installed via npm. The tool aims to improve coding agent accuracy by enabling them to search and understand repository context without reading the entire codebase.", "body_md": "**Give AI coding agents the right context from your repository.**\n\nCortex builds a local map of your code, symbols, relationships, and project rules. Coding agents query that map through the CLI instead of guessing or reading the whole repository.\n\nYour code stays on your machine. MCP is not required.\n\nRequires Node.js 20.9+ and Git.\n\n```\nnpm install --global @danielblomma/cortex-mcp\ncd your-project\ncortex init --bootstrap\n```\n\nThis indexes the repository, adds Cortex instructions to `AGENTS.md`\n\n, installs\nGit hooks, and starts the background watcher.\n\nCheck the setup:\n\n```\ncortex doctor\n# Find relevant code.\ncortex search \"where is authentication handled?\" --json\n\n# Follow relationships from a search result.\ncortex related <entity-id> --json\n\n# See what a change may affect.\ncortex impact \"authentication\" --json\n\n# Read repository rules.\ncortex rules --json\n\n# Compare a changed file with nearby patterns.\ncortex pattern-evidence src/auth.ts --json\n```\n\nAgents can run these commands directly. `cortex init`\n\nadds instructions that\ntell them to search before answering and check impact before refactoring.\n\nGit hooks and the watcher normally update Cortex automatically.\n\n```\ncortex status\ncortex watch status\ncortex update\n```\n\nRun `cortex update`\n\nmanually after a large change or when results look stale.\n\nMake lexical and graph search available first while semantic indexing continues in the background:\n\n```\ncortex bootstrap --background --profile interactive\ncortex indexing status --json\n```\n\nThis mode supports macOS, Linux, and WSL. Native Windows should use normal foreground bootstrap.\n\n```\nnpm install --global @danielblomma/cortex-mcp@latest\ncortex init --force\ncortex bootstrap\ncortex update\n```\n\nProject configuration and rules are preserved. See\n[CHANGELOG.md](/DanielBlomma/cortex/blob/main/CHANGELOG.md) for version-specific notes.\n\nThe normal Cortex workflow uses the CLI. If a client explicitly requires MCP,\nrun `cortex connect`\n\n.\n\nMIT", "url": "https://wpnews.pro/news/cortex-local-context-retrieval-for-ai-coding-agents", "canonical_source": "https://github.com/DanielBlomma/cortex", "published_at": "2026-08-25 10:45:53+00:00", "updated_at": "2026-08-25 11:16:07.512866+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-agents"], "entities": ["Cortex", "Daniel Blomma", "Node.js", "Git", "npm"], "alternates": {"html": "https://wpnews.pro/news/cortex-local-context-retrieval-for-ai-coding-agents", "markdown": "https://wpnews.pro/news/cortex-local-context-retrieval-for-ai-coding-agents.md", "text": "https://wpnews.pro/news/cortex-local-context-retrieval-for-ai-coding-agents.txt", "jsonld": "https://wpnews.pro/news/cortex-local-context-retrieval-for-ai-coding-agents.jsonld"}}