agentleFS
vpeetla-aivpeetla-ai/vpeetla-ai-skills/skills/agents-that-run-for-days/SKILL.md

agents-that-run-for-days

Skill2 starsChanged 4 months agoMITView on GitHub

Karpathy field notes — agents that run for days: program.md control layer, constrained edit surface, fixed eval harness, keep/discard loops, overnight autonomy. Use when designing LoopForge overnight runs, autoresearch-style harnesses, or LOOPS.md field notes in any vpeetla-ai repo.

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Create docs/LOOPS.md or LOOPS.md at repo root when an agent should run overnight:

    line 36
  2. Very specific:

    Skills: when same reminder twice → SKILL.md or LOOPS.md, not chat

    line 98

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Agents That Run for Days (LOOPS.md field notes)

Inspired by Andrej Karpathy's autoresearch and the shift from prompt engineering → loop engineering — agents that hypothesize, execute, measure, and iterate while you sleep.

North star

Remove yourself as the bottleneck on the inner loop. Stay the engineer on the outer loop (strategy, metrics, constraints, review).

The three-file contract (Karpathy pattern)

FileWho ownsRole
program.md / LOOPS.mdHumanStrategy — goals, constraints, loop protocol, what to never touch
train.py / one mutable surfaceAgentTactics — the only file (or tool scope) the agent may edit per round
prepare.py / locked evalHumanMeasurement — scoring harness the agent cannot modify (prevents metric cheating)

In vpeetla-ai repos, map this to:

KarpathyLoopForgeContent FactoryEnterprise RAG
program.mdloops/*.yaml + harness configAGENTS.md + pipeline specgolden queries + eval gates
mutable filetrain.py → repo patches / RAG configdraft nodesretrieval strategy params
locked evalpytest + review scoreHITL + gatewayeval/metrics.py

LOOPS.md template (field notes)

Create docs/LOOPS.md or LOOPS.md at repo root when an agent should run overnight:

# LOOPS — [Project name]

## Who this loop serves
- **User:** [role — e.g. platform engineer, content editor]
- **Job:** [one sentence outcome]

## Metric (one number)
- **Optimize:** [e.g. pytest pass rate, recall@5, review score]
- **Direction:** lower / higher is better
- **Floor:** never ship below [X]

## Mutable surface (agent MAY edit)
- [single file or bounded tool list]

## Locked (agent MUST NOT edit)
- eval harness, prepare.py, gateway rules, CI workflows

## Time budget per iteration
- [e.g. 5 min train, 3 min pytest, max 12 iter/hour]

## Loop protocol
1. Read state + memory hints
2. Hypothesize change
3. Apply to mutable surface only
4. Run locked eval
5. If improved → commit + lesson; else → revert
6. Repeat until budget exhausted or metric plateaus

## Stop conditions
- max iterations, cost cap, no improvement for N rounds, gateway block

## Learnings log
Append after each round: what worked, what failed, next hypothesis.

Design rules (from field notes)

  1. One metric — one comparable number per iteration; fixed time budget makes runs comparable
  2. Constraint is the feature — narrow action space beats unlimited agent scope
  3. Markdown as programming — program.md / LOOPS.md is the control plane, not comments in code
  4. Keep or discard — git commit on win, git reset on loss (LoopForge: branch + PR, never main)
  5. Babysit vs overnight — interactive tmux sessions for learning; unattended only with recovery + logs
  6. Gateway on side effects — publish, push, deploy still require AegisAI even in long loops

Map to vpeetla-ai stack

LOOPS.md (strategy)  →  Harness (scheduler, budget)  →  Agent (inner loop)
                              ↓
                         Evaluate (pytest, golden, eval gates)
                              ↓
                         Memory (lessons, RAG version tree)
                              ↓
                         Observability (trace, Langfuse, OTLP)
  • LoopForge: ODAEU harness + repo-fix graph — closest to autoresearch in org
  • Content Factory: HITL breaks unattended publish — by design
  • Enterprise RAG: golden query regression = locked eval
  • Skills: when same reminder twice → SKILL.md or LOOPS.md, not chat

Anti-patterns

  • Agent edits eval metric or prepare.py equivalent
  • Unbounded scope ("improve the whole repo")
  • Overnight run without trace export or iteration log
  • Side effects without gateway in unattended mode

References

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.