← TinyGPT · docs · devlog · roadmap · speedup
source: docs/prds/self-improving-agents.md · view on GitHub ↗

Self-improving agents — the closed loop

A self-improving agent is just a closed loop: act in an environment → score the result with a verifiable reward → learn from the good experience → choose what to practice next → repeat. We ran every step of this by hand in the tool-calling work (tool-calling-frontier-parity.md §8.1-8.3). “Self- improving” = closing the loop and removing the human from it. This PRD is the method; the game-RL PoC and arena are specific environments to run the loop in.

Why now / why us

The pieces we already have (don’t rebuild)

Loop stepExisting artifact
Act / roll outscripts/bfcl_multiturn_eval.py (native tool-calling, MAX_STEPS agentic loop)
Verifiable rewardBFCL multi_turn_checker (end-state) — already the reward in every gate
Keep good experiencerejection sampling (the RFT filter) — bfcl_multiturn_*.py --dump / gold_to_sft_traj.py
Learnscripts/distill_multiturn.sh (render → LoRA SFT → fuse) and the GRPO loop (§5)
Choose what’s nextthe cliff-finding methodology (easy→hard→veryhard→breadth) — to be automated
Keep the reward honestfrontier-ceiling gate + free bfcl_multiturn_codex.py (gpt-5.5)

The smallest proof (PoC) — a teacher-free ReST loop

Prove the loop closes: a model improves on the env using its own experience, no teacher, no gold-cloning. (STaR, Zelikman 2022; ReST / ReST-EM, Gulcehre 2023 / Singh 2024.)

  1. Sample K trajectories per task (temperature > 0 for diversity) from the current model on a training split — bfcl_multiturn_eval.py with a sampler tweak + a --dump-rollouts.
  2. Score each with the checker (the verifiable reward).
  3. Keep the wins (checker == pass). These are the model’s own correct trajectories — not a teacher’s, not the gold.
  4. SFT on the wins (distill_multiturn.sh), fuse.
  5. Re-eval on the held-out gate; if improved, repeat with the new model.

Success criterion: held-out pass-rate rises across ≥2 rounds with no teacher/gold. That is self-improvement, demonstrated, on a Mac. (We already have the degenerate t=0 / gold-cloned version working — §8; this swaps the teacher for the model’s own filtered rollouts.)

The compounding engine — automatic curriculum

A fixed task set saturates (we watched the 4B saturate file-ops). The loop only compounds if something keeps proposing tasks at the edge of the agent’s ability:

The discipline — the reward is the whole ballgame

Levers / variants (compose as needed)

Acceptance criteria

Risks / notes

Relationship to other PRDs