# I built a "brain" for AI coding agents — it never forgets and never stops

> Source: <https://dev.to/justnishh/i-built-a-brain-for-ai-coding-agents-it-never-forgets-and-never-stops-5b54>
> Published: 2026-05-21 11:39:36+00:00

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
babysitting it more than coding yourself.
So I built Long-Horizon — a skill that turns any AI coding tool into an autonomous agent with a persistent graph memory.
Every 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
of project knowledge it can traverse for context.
┌─────────┐
┌────│ ROOT │────┐
│ │(project)│ │
▼ └─────────┘ ▼
┌────────┐ ┌────────┐
│decision│─leads─▶ │ task │
│"Use JWT"│ │"Build │
└───┬────┘ │ API" │
│ └───┬────┘
▼ ▼
┌────────┐ ┌────────┐
│ lesson │◀─related─│pattern │
└────────┘ └────────┘
Real-time cyberpunk visualization that shows the brain growing as the AI works:
No vector DB. No cloud. No API keys. Pure Node.js, filesystem only. Works offline.
One command installs for your tool:
npx long-horizon init
npx long-horizon adapt cursor # or: windsurf, claude, aider, codex, all
Also ships an MCP server with 11 tools for direct AI integration.
Once 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
talk normally:
Build a user dashboard with charts and dark mode.
The AI loops until done.
npx long-horizon init
Would love feedback. What would make this more useful for your workflow?
