Stop tuning your agent one failure, one prompt edit at a time.
Train the harness, not the model.
AgentGrad turns production failures into gradients across your prompts, tool definitions, few-shot examples, and sampling parameters, so the entire agent harness improves against the metric that matters, with guardrails that keep your production schemas intact.
Your model is fine. Your harness is what's failing.
Wiring an agent is easy now. Getting it reliably past demo quality is not. In production, every additional tool, step, and decision creates another way for a long-running task to fail. The model may be capable; the harness around it still falls below the accuracy the product needs.
Most teams respond one failure at a time: append another instruction, rewrite a tool definition, swap a few-shot example, try again. The system prompt becomes a patch log. Tool calls fail on plausible-looking arguments. A fix for today’s edge case quietly breaks behavior that worked yesterday. When the underlying model changes, the cycle starts again.
That is manual gradient descent without batching, attribution, or a reliable way to know whether the system is improving. AgentGrad replaces the patching ritual with a measured optimization loop across the entire harness, so failures improve the prompts, tools, examples, and parameters actually responsible.
The loop: your failures in, a better pipeline out.
forward · the pipeline runs
Find rulings against Acme Corp from the last three years.
“date: when to search” is ambiguous, so the model guesses natural language.
Improvements you can measure, ship, and keep.
Optimize the harness, not one prompt.
AgentGrad treats the whole agent runtime as one computation graph. Prompts, tool definitions, few-shot examples, and sampling parameters all become learnable, and feedback reaches the component actually responsible, instead of appending line 1,001 to the system prompt.
Train on simulations, not production bleeding.
Waiting for production failures is the expensive way to find edge cases. AgentGrad generates simulated traffic that explores the branching space your demo never covered, and trains the harness against it before customers see the gap. The legal result below was reached this way: simulated calls across every tool, not just replayed logs.
Learn from patterns, not individual mistakes.
The optimizer accumulates evidence across many failures before touching a parameter, extracts the common failure mode, and discards one-off noise, the same reason large-batch SGD beats noisy updates. No more appending another brittle exception to the prompt.
Decoupled tool calling, discovered by optimization.
Our own harness element for tool-heavy agents: per-tool argument builders the optimizer can train independently. Vendor-neutral by design, no proprietary tool-search API, and it took one legal client’s argument accuracy from 62% to 91%.
Catch regressions before your customers do.
Providers update models silently. AgentGrad tracks harness health on simulated data, catches the drop before production traffic hits it, and re-optimizes to bridge the gap, usually within a day.
Swap models without starting over.
Every vendor now ships its own prompting style guide, which is the real reason teams stay put. Projected gradient descent re-shapes your learned prompts onto the target family’s guidelines, XML for one, markdown for another, so a provider swap is a re-projection, not a rewrite.
Your agent is a program. Train it like one.
AgentGrad treats the entire agent harness as an implicit computation graph. Prompts, tool definitions, few-shot examples, and sampling settings become learnable parameters, and your end-to-end KPI becomes the loss. When a run fails, backward() traces the failure through the harness and sends targeted feedback to the components responsible. The optimizer learns from patterns across failures, proposes updates, and keeps them only when held-out and regression performance improves.
The API deliberately mirrors PyTorch: Module, Parameter, backward(), and optimizer.step(). ML engineers get a familiar training loop without having to rewrite their agent around a new framework. Branching pipelines, tool loops, and multi-step workflows remain ordinary application code. To learn more about why we built AgentGrad and how its training model works, read the technical overview.
Proven in real optimization work.
AgentGrad is not a research prototype. It is the optimization engine behind our client engagements and our competition and benchmark work: every result shown against the baseline it had to beat.
vs one-shot
Meta-prompting is not optimization. The client’s hand-written tool definitions reached 62%. Asking an LLM to rewrite those definitions in one shot (the usual first fix) moved it 3 points, to 65%.
AgentGrad’s decoupled tool calling trains each tool’s definition separately against labeled production failures. It reached 91%, a 26-point jump over the one-shot baseline, and updates were kept only when held-out accuracy improved.
vs GEPA
Same task, same student model, two optimizers. From a 48% baseline on AIME 2025, DSPy’s GEPA, the reference point for prompt optimization, took GPT-4.1 mini to 57%. Optimizing the same single system prompt, AgentGrad edged past it at 59%.
Then the lever GEPA does not have: skill-file discovery. GPT-5, as the teacher, diagnosed the reasoning gaps the student kept hitting, and the optimizer wrote a specialized skill file for each mode one prompt could not cover: 64%. The student assembled its own skill library. Full methodology writeup on the way.
3× faster
Diffusion speed, autoregressive accuracy. DiffusionGemma 26B decodes about 3× faster than its autoregressive twin, and paid for it in accuracy: 70.8% vs 75.0% avg@4 on AIME 2026.
AgentGrad optimized the diffusion model’s system prompt against the AR twin’s reasoning traces, 20 training samples, no weight updates: 75.2%. The gap closed; the speed advantage stayed.
If it's a parameter, it's trainable.
These are the jobs teams bring us first, all of them shipped and in use.
Built for teams shipping agents to production.
Verticals
- Teams shipping agents where accuracy is a customer-facing KPI
- Tool-heavy agent products: support, ops, coding, data agents
- Cost-sensitive deployments that need small models at frontier quality
- Domains with hard output contracts: legal, finance, healthcare
Roles
- CTOs and technical founders whose agent quality is the product
- Heads of AI accountable for an agent accuracy metric
- ML/agents engineers tired of hand-tuning prompts without measurement
Available to enterprise customers.
AgentGrad powers our optimization engagements today. Bring us one failing agent metric; we'll spend a 30-minute call scoping whether it's a one-week optimization or something deeper, and leave you with a concrete next step either way. Want the library itself? Ask about early access.
The deep dives behind AgentGrad.
From the Optimizing Agents series and the field.
The library behind our engagements, out of stealth: a PyTorch-shaped training loop for agent runtimes.
The engagement behind the 62% → 91% result: per-tool argument builders optimized against labeled failures.
The anchor essay: why assembled stacks stall, and the end-to-end loop that fixes them.