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.
What it does
- You give it one task — "Build a REST API with auth"
- It decomposes into subtasks and executes them in a loop — no prompting between steps
- It writes knowledge to disk as a connected graph — decisions, lessons, patterns, all linked
- It resumes perfectly after any interruption — reads its own state and picks up exactly where it stopped
The graph brain
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 │
└────────┘ └────────┘
Live viewer
Real-time cyberpunk visualization that shows the brain growing as the AI works:
- Neon glowing nodes with particle trails along edges
- Unlimited zoom/pan — scroll to zoom, drag to navigate
- Sound effects when new nodes appear
- Runs on localhost:3333
Zero dependencies, ~38KB
No vector DB. No cloud. No API keys. Pure Node.js, filesystem only. Works offline.
Works with everything
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.
It's always-on
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.
Links
- GitHub: github.com/justnishh/long-horizon
-
Install:
npx long-horizon init - License: MIT
Would love feedback. What would make this more useful for your workflow?
Top comments (0)