A 3B support agent that fixes its own mistakes
A 3.35B Tiny Aya support agent that heals itself: one command runs a whole round with no person in the loop for about $4, and it refused to ship itself 11 times until the fix was measured. Its first unattended promotion made its tool calls 7× more reliable (errors 44% → 6%), lifted tickets resolved from 10% to 15%, cut wasted tool calls from 69% to 21%, and serves retail tickets for $0.015 each, 2.5× less than the teacher API it learned from.
Watch the demo (3 minutes)
Why the smallest model. We chose Tiny Aya on purpose: it fits the budget, serves on a $1.50-an-hour A10G, and is the model where self-healing matters most, because it fails most. Its 8,192-token window is the limit our gate kept catching, and Aya Expanse 32B is the first thing we would run with more credit.
Three models
| Role | Model | Tickets solved |
|---|---|---|
| Base | Tiny Aya Global 3.35B, unchanged | 10% |
| Student, what the loop deploys | Tiny Aya + a LoRA adapter (under 1% of the model) | 15% |
| Teacher, never deployed | DeepSeek V4.1 Flash (API) | 32% |
The benchmark is tau2-bench retail: a simulated customer, 16 shop tools, a written policy, and a grader that checks whether the shop database ends up right, not whether the reply sounded right.
The loop
- Run the student on training tasks; every turn's raw output is logged.
- Detect failures with tau2's grader and AgentTune's
FailureDetector. - Classify and route with AgentTune's
FailureClassifier: tool fault → tool fix, model fault → weight fix, environment fault → no fix, never trained on. - Correct: at every turn where the student went wrong, the teacher answers from the student's exact context.
- Train a fresh adapter with AgentTune's
create_distill_trainer. - Gate on 8 checks: AuditKIT pass^1 and pass^k, targeted failures down, no new failure kind, BFCL (no forgetting) and AgentTune's
DeploymentGate. - Promote or keep the old one, recorded in a ledger with rollback.
A gate that can say no
It refused 11 times before it said yes, each time for a reason we could trace: forgetting general tool use, new failure kinds, conversations overflowing the 8K window. AgentTune's own DeploymentGate would have approved ten of the eleven candidates ours refused.
What the student stopped doing
| Per 60 conversations | Base | Self-healed |
|---|---|---|
| Invented an order or item id | 40 | 0 |
| Handed off to a human too early | 11 | 0 |
| Made up an answer | 8 | 0 |
| Tool-call error rate | 44% | 6% |
| BFCL, general tool calling | 45 | 73 |
Update, 25 Nov: rounds 17 to 19
Three more unattended rounds, each gated on the same 20 held-out tasks × 3 against the deployed adapter. The new ingredient: verified synthetic training tasks built from the train tasks and the retail database, each replayed on the database before it is kept, with a tested guard that drops anything naming a held-out or hidden customer, order or item.
| Round | What changed | pass^1 vs deployed | Tool-call errors | Decision |
|---|---|---|---|---|
| 17 | a 4th on-policy correction round | 11.7% vs 18.3% | 5.2% vs 4.0% | refused |
| 18 | + 341 synthetic tasks | 10.0% vs 10.0% | 33.8% vs 6.3% | refused |
| 19 | synthetic tasks fixed (orders described, not given by id) | 13.3% vs 10.0% | 7.9% vs 6.3% | promoted |
- Round 18's lesson: 548 of 600 synthetic tasks handed the agent the order id (8 of 74 real ones do), so it learned to guess ids; errors rose to 34%. Describing orders the way customers do fixed it.
- A revised gate: the targeted-labels and pass^1 checks are now advisory (the same adapter scored 18.3% and 10.0% in two gates), and a new check blocks any rise in tool-call errors above 5 points. AgentTune's gate, pass^k, BFCL and the rest still block.
- Caveat: +2 passing runs of 60 is not significant alone, round 19 was promoted under the revised rule, and it has not been run on the hidden split.
Round 16's biggest jump: it uses tools like the teacher
Pass rates on 20 tasks are noisy, so we also measure how the agent works. tau2 stores the calls an expert makes for every task; we compare each conversation with that path and count the wasted calls (repeats with nothing changed in between, calls the shop rejected, calls our guards had to block) and the expert's steps the agent also took.
- The base wastes most of what it does: 69% of its tool calls, mostly calls the shop rejects, and it takes only 8% of the expert's steps. It looks frugal only because it gives up early.
- Round 16 behaves like the teacher: rejected calls 6% (teacher 4.5%), exact repeats 0.3% (teacher 0.4%), expert steps taken 47% (teacher 52%). All four changes from the base hold under a task bootstrap.
- AuditKIT agrees: the exact-repeat numbers are its own
RedundantToolCalls, not our code. - Why: round 16 trained on the teacher's fix for exactly the turns where the student went wrong, including every call our guards had blocked.
- Not yet: a fifth of its calls are still wasted (teacher 5%), and its conversations run about twice as long as the teacher's. That is the next target.
Across every round, from the base model to round 16, wasted calls fell from 69% to 21% (the teacher wastes 5%):
For a business
Running the self-healed student instead of the teacher's API costs about $22 instead of $117 per 10,000 conversations, with every conversation on hardware the shop controls. It resolves 15% of tickets end to end against the teacher's 32%, so today it is a first-line agent that never invents an order id and hands the rest to people. Each unattended healing round costs about $4.
Honest limits
- Three more passes in 60 conversations is not significant on its own. Pooled over three gates the round 7 adapter solved 17.2% vs 10% (13 paired wins, 0 losses), and 10% vs 0% on 20 hidden tasks opened once.
- Tasks that need two or more changes stay unsolved; the 8K window is the wall.
- A student that acts more errs more: 13% of its conversations made a wrong change, against 3% for the base, which mostly gives up, and 10% for the teacher.
Links
- Models: the adapter per round;
round-19is deployed (since 25 Nov);round-16was the first promoted. - Datasets: training data, and every gate's traces and decision.
- Code on GitHub, with the full write-up in
submission/WRITEUP.md. - Demo video (3 min), also embedded above.