{"slug": "i-built-a-brain-for-ai-coding-agents-it-never-forgets-and-never-stops", "title": "I built a \"brain\" for AI coding agents — it never forgets and never stops", "summary": "Long-Horizon, a new tool that creates a persistent graph memory for AI coding agents, allowing them to remember past decisions, lessons, and patterns without relying on cloud services or vector databases. It installs via a single command and works offline, enabling the AI to autonomously complete complex tasks without requiring constant re-explanation or manual prompting from the user. The system uses typed connections between nodes (such as \"leads_to\" and \"learned_from\") to build a web of project knowledge that the AI can traverse for context.", "body_md": "I got tired of re-explaining context to my AI every single prompt. It forgets what it did 5 minutes ago. It stops after one step and waits. You end up\nbabysitting it more than coding yourself.\nSo I built Long-Horizon — a skill that turns any AI coding tool into an autonomous agent with a persistent graph memory.\nEvery decision, lesson, and pattern becomes a node. Nodes connect via typed edges (leads_to, caused_by, learned_from). Over time, the AI builds a web\nof project knowledge it can traverse for context.\n┌─────────┐\n┌────│ ROOT │────┐\n│ │(project)│ │\n▼ └─────────┘ ▼\n┌────────┐ ┌────────┐\n│decision│─leads─▶ │ task │\n│\"Use JWT\"│ │\"Build │\n└───┬────┘ │ API\" │\n│ └───┬────┘\n▼ ▼\n┌────────┐ ┌────────┐\n│ lesson │◀─related─│pattern │\n└────────┘ └────────┘\nReal-time cyberpunk visualization that shows the brain growing as the AI works:\nNo vector DB. No cloud. No API keys. Pure Node.js, filesystem only. Works offline.\nOne command installs for your tool:\nnpx long-horizon init\nnpx long-horizon adapt cursor # or: windsurf, claude, aider, codex, all\nAlso ships an MCP server with 11 tools for direct AI integration.\nOnce installed, you don't need to say \"use Long-Horizon\" or prefix your prompts. The AI reads the skill file and operates autonomously by default. Just\ntalk normally:\nBuild a user dashboard with charts and dark mode.\nThe AI loops until done.\nnpx long-horizon init\nWould love feedback. What would make this more useful for your workflow?", "url": "https://wpnews.pro/news/i-built-a-brain-for-ai-coding-agents-it-never-forgets-and-never-stops", "canonical_source": "https://dev.to/justnishh/i-built-a-brain-for-ai-coding-agents-it-never-forgets-and-never-stops-5b54", "published_at": "2026-05-21 11:39:36+00:00", "updated_at": "2026-05-21 12:02:39.753750+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence", "open-source", "products"], "entities": ["Long-Horizon", "JWT", "Node.js", "Cursor", "Windsurf", "Claude", "Aider", "Codex"], "alternates": {"html": "https://wpnews.pro/news/i-built-a-brain-for-ai-coding-agents-it-never-forgets-and-never-stops", "markdown": "https://wpnews.pro/news/i-built-a-brain-for-ai-coding-agents-it-never-forgets-and-never-stops.md", "text": "https://wpnews.pro/news/i-built-a-brain-for-ai-coding-agents-it-never-forgets-and-never-stops.txt", "jsonld": "https://wpnews.pro/news/i-built-a-brain-for-ai-coding-agents-it-never-forgets-and-never-stops.jsonld"}}