
The problem
For an agent to learn to use tools, it has to practice on many tasks with very different tools, across the whole post-training pipeline. But in open source, environments with thousands of tools are scarce.
The article's answer is to turn task creation into a two-player game:
- The synthesizer designs a new task following a fixed schema, with several mechanisms to make sure it is solvable, diverse and hard.
- The solver tries to solve it many times.
Only tasks whose pass rate lands in a calibrated difficulty band are accepted. And the hardest ones seed the next wave, so the corpus gets harder over time. Every task works on a stateful database and is checked semantically, not by matching the text of the answer.
Anatomy of a task
Every task has the same four pieces: a database, a set of tools that change it, an instruction, and a gold solution with its verification function.
The database is a Pydantic model with the domain's entities and their relationships. The article's example is the day_spa family: there are services (with category, duration and price), therapists (with their specialties and availability) and appointments. A therapist performs a service during an appointment.
class Service(BaseModel):
id: str
name: str
category: str # massage, facial, body_treatment, nail_care
duration_minutes: int
price: float
class Therapist(BaseModel):
id: str
name: str
specialties: list[str] # service categories they can perform
is_available: bool = True
class Appointment(BaseModel):
id: str
customer_name: str
service_id: str
therapist_id: str
status: str = "booked"The tools are plain Python functions that read or change the database. The agent never touches it directly. Tools enforce the domain logic (the therapist must be free, able to do that service, above a minimum rating) and return structured feedback.
class TaskTools(Tools):
db: TaskDB
@tool
def list_services(self) -> list[dict]:
"""Return all spa services with details."""
return [s.model_dump() for s in self.db.services]
@tool
def list_therapists(self) -> list[dict]:
"""Return all therapists with their specialties."""
return [t.model_dump() for t in self.db.therapists]
@tool
def book_appointment(self, appointment_id: str, customer_name: str,
service_id: str, therapist_id: str) -> dict:
"""Book a spa appointment."""
# check therapist availability and specialty match
# mark therapist unavailable, append appointment...The instruction comes in natural language. In the seed task, day_spa_t0, it reads:
Hi, I'm Sarah and I'd like to book a Swedish Massage. Could you look up the services and therapists, then just go ahead and book me with any available therapist who does massage? Don't worry about asking me to pick, just pick one and book it.
The agent has to figure out on its own which tools to use, and in what order.
Verification and gold solution. To make sure the task can be solved, the synthesizer writes a verification function that checks every constraint in the instruction, and a gold solution that must pass its own verification. For the seed, it's enough to check that Sarah has a booked appointment for that service:
def verify(db: TaskDB) -> float:
"""Check that the target customer has a booked appointment
for the target service."""
if not db.target_customer or not db.target_service:
return 0.0
for a in db.appointments:
if (a.customer_name == db.target_customer
and a.service_id == db.target_service
and a.status == "booked"):
return 1.0
return 0.0And the gold solution lists the services, lists the therapists and books:
[["list_services", {}],
["list_therapists", {}],
["book_appointment", {"appointment_id": "A1", "customer_name": "Sarah",
"service_id": "S1", "therapist_id": "T1"}]]Before a task is accepted there's a very simple sanity check:
verify(initial_db) == 0.0: the task can't come already solved.verify(gold_db) == 1.0: after replaying the gold solution, verification must pass.
If that fails, something is fundamentally broken. It's a first structural check that the task is solvable.
The difficulty ladder
Being solvable isn't enough: a task also has to be a challenge. Following the DeepSeek-V3.2 methodology, the article finds that evolving a task from trivial to hard is much easier than writing a hard task in one shot. So the synthesizer starts with a simple seed and makes it harder step by step, extending the instruction, the database and the tools. Each family has five tiers, t0 to t4, and there are nine strategies to move up:
| Strategy | What it does | Spa example |
|---|---|---|
multi_step_reasoning | The answer requires combining results from several tool calls | Search for sensitive-skin facials and filter therapists rated ≥ 4.7 before booking |
conditional_rules | Conditional constraints that require branching | If the skin is sensitive, the facial must be for sensitive skin |
cross_entity_coupling | No repeats, sums, dependency chains, mutual exclusivity across entities | No therapist reused across bookings |
stricter_thresholds | Budgets, minimum ratings, capacity caps | Total cost ≤ $195 |
larger_db | More entities and more distractors | The database grows from 26 to 97 entities |
schema_extension | New entity types and relationships | New Package and Product entities |
tool_proliferation | Plausible-looking but irrelevant tools | list_packages and list_products, not needed by the gold solution |
noisy_instructions | Realistic typos, 2 to 5 per instruction | "treaments", "thas", "dont", "skins been acting up" |
ambiguity_resolution | The agent must disambiguate through tool calls, or tools have less informative names | A "Prenatal Massage" looks perfect for a pregnant client but has medium pressure |
Each family has to use at least five different strategies. And above all, every tier is measured: it's tested against a solver model and only accepted if its pass rate lands in a target band, from 0.8-1.0 at t0 down to 0.0-0.2 at t4.
Here's how the spa family grows:
| Tier | Target band | GPT-5-mini (avg@50) | GLM-5.1 (avg@50) | Tools | Gold steps | Entities |
|---|---|---|---|---|---|---|
| t0 | 1.0-0.8 | 1.00 | 1.00 | 3 | 3 | 10 |
| t1 | 0.8-0.6 | 0.75 | 1.00 | 7 | 6 | 26 |
| t2 | 0.6-0.4 | 0.55 | 0.66 | 7 | 8 | 97 |
| t3 | 0.4-0.2 | 0.35 | 0.10 | 12 | 8 | 122 |
| t4 | 0.2-0.0 | 0.20 | 0.22 | 12 | 8 | 184 |
GPT-5-mini, the calibration model, lands in every band by design. GLM-5.1, which wasn't used for calibration, also does worse on the higher tiers, though not in a perfectly ordered way: it scores 10% on t3 and 22% on t4. The article speaks of a "clean" inverse relationship; it is for GPT-5-mini, while GLM-5.1 shows that small bump.
Where models fail
The most interesting part of the article is its analysis of GLM-5.1's failed attempts.
Tier t2 (GLM-5.1 solves 66%). It adds three strategies (larger database, cross-entity coupling and stricter thresholds) and grows the database from 26 to 97 entities. Olivia asks for a sensitive-skin facial, a gentle massage and a manicure, within budget and with no therapist or room reused. In almost all failures, the model picks a medium-pressure massage instead of a light one: that massage is known for "gentle flowing motions", so the model reasons it counts as gentle. It substitutes world knowledge for what's in the database. (A detail: the tier description mentions a $195 budget, while Olivia's instruction says $200.)
Tier t4 (GLM-5.1 solves 22%). Ambiguity, coupling and typos, with 184 entities. Mia is pregnant, writes with typos, and wants a soft-pressure massage, a sensitive-skin facial and a simple nail treatment, with $210 and only therapists rated 4.7 or higher. A "Prenatal Massage" shows up, contextually perfect, but its pressure field is medium. In most failures, the model books it. The right answer is the Couples Massage, $87 with light pressure: less obvious, but the one that meets the constraint. Budget violations pile up, and there are more failed than successful attempts.
The two-player game
The synthesizer designs task families and evolves them through the tiers; it was used offline to generate the corpus. The solver plays two roles: it measures difficulty during synthesis, and it's the model that later gets optimized with reinforcement learning.
Both are verifiers environments, Prime Intellect's library, so they plug into its evaluation, training and data generation platform. According to the article, that gives them this infrastructure at scale "for free". For the initial corpus they ran over 1,000 GLM-5.1 synthesizer agents in parallel, over several days, with barely any supervision.
The core insight is that creating a task is itself an agent task. The synthesizer is a language model in a sandbox with access to the General Agent CLI, guided by a skill that defines the task format, the evolution strategies, the gating criteria and the full protocol. The skill keeps the corpus consistent while the agent is free to choose the domain, the tasks and the constraints. The protocol has five steps:
- Design: pick a new domain, design the database schema and the tool API.
- Seed: write the simplest useful task, its verification and a gold solution that passes it.
- Gate: 20 solver rollouts on the seed; with a pass rate of at least 0.80 it's accepted; otherwise, adjust and retry.
- Evolve: for each tier from t1 to t4, add strategies, extend the database, write the new task, validate it and gate it against its band (for example, 20-40% for t3).
- Validate: the family must use at least five different strategies.
With that loop, every task is structurally valid (the gold solution replays and verification agrees), empirically calibrated (difficulty isn't guessed, it's measured) and diverse (each family combines several independent strategies).
The solver
The solver has three backends, with the same task format and the same scoring. Only the way the agent reaches the tools changes:
- Local: calls the tools as Python functions in-process. It's the fast one, and the one the gate uses inside the synthesizer's sandbox.
- OpenCode: an OpenCode agent in a sandbox; each tool is exposed through a local MCP server.
- RLM: an RLM agent in a sandbox; each
@toolis wrapped in a skill the agent calls from its IPython kernel withawait <tool>.run(...).
For example, this runs 5×3 rollouts on the spa family with GPT-5-mini as a local solver:
prime eval run general-agent-solver-local -a '{"task": "day_spa"}' -m openai/gpt-5-miniAll trajectories are uploaded to Prime Lab. In the article's example, the model solves the spa seed with two parallel calls (services and therapists) and a single call to book: exactly the optimal strategy.
The corpus
With GLM-5.1 (FP8) as the synthesizer and GPT-5-mini as the gate (avg@20), the loop produced 4,504 tasks across 1,040 domains. Each family is its own world, with its own schema, logic and verification, and every task has been measured against at least one model. They also generated over 200,000 traces with GLM-5.1 as the solver in the RLM harness, to estimate difficulty with a much stronger model.
Diversity. The 1,040 families define 8,159 unique tools and 2,222 entity classes (like Customer, Booking or AirspaceZone). 78% of the tools and 66% of the classes appear in a single family; the rest are shared abstractions, like Order, Equipment or get_customer.
All nine strategies are well represented. The most frequent are cross-entity coupling (1,505 tasks) and conditional rules (1,467); the rarest is ambiguity resolution (636), because it takes more careful task design.
Calibration. Across the corpus, difficulty rises in an orderly way with the tier:
| Tier | GPT-5-mini (avg@20) | GLM-5.1 (avg@50) | Tools | Gold steps | Entities |
|---|---|---|---|---|---|
| t0 | 0.928 | 0.961 | 6.3 | 2.5 | 10 |
| t1 | 0.757 | 0.928 | 9.0 | 8.7 | 23 |
| t2 | 0.601 | 0.895 | 11.4 | 13.3 | 240 |
| t3 | 0.407 | 0.863 | 13.4 | 17.2 | 323 |
| t4 | 0.251 | 0.792 | 14.9 | 20.5 | 437 |
GLM-5.1 drops too, but with a much gentler slope. Task by task, GPT-5-mini's distribution shifts from right to left: on t4, most tasks sit below 0.3. GLM-5.1's stays to the right even on t4 (median 0.98), though its tail of failures grows with each tier: the ladder also holds for a model it wasn't calibrated on.
The author's conclusion is honest: with this version of the corpus, there's little room to improve GLM-5.1. To improve tool calling on strong models, the tasks would need to keep evolving, using t4 as the seed and gating against stronger open models.
Does it work for training?
To stress-test it, they ran two simple experiments, one with reinforcement learning and one with supervised fine-tuning (SFT), and measured on two external benchmarks: BFCL (Berkeley Function Calling Leaderboard, function-calling accuracy across diverse real-world APIs) and a subset of MCP-Atlas (multi-step tool orchestration against real MCP servers).
Reinforcement learning. They trained Qwen3-30B-A3B-Instruct on the whole corpus except the trivial t0 seeds: 200 steps with a constant learning rate of 1e-6, batches of 32×16 rollouts and 32k-token sequences. Average reward climbs from 30% to somewhere between 60 and 70% (the text says "~70%"; the smoothed curve peaks a bit lower), with the steepest gains in the first 100 steps. And turns per rollout go from about 8 to about 24: the model learns to make more tool calls and solve its tasks more reliably. Note that this is measured on the same tasks it trains on; there are no external benchmarks in this experiment.
Supervised fine-tuning. They took the Nemotron-3-Nano-30B-A3B base model and trained it on 4,417 GLM-5.1 conversations from the corpus, with their tool calls and results, without any filtering: 200 steps, learning rate 5e-5 with a 50-step warmup, batch size 8 and 64k context on 16 H200s. The loss drops from 0.6 to 0.1, with most of the learning in the first 80 steps.
With just those 4.4k traces, BFCL goes from 18.9% to 52.3% and MCP-Atlas from 0.6% to 12.1%. For comparison, the final post-trained version of the model scores 73.5% and 45.5%, but with orders of magnitude more data. So it doesn't catch up; what stands out is how much it moves with so little data. (The text says the base model "starts near zero on both benchmarks"; that's true for MCP-Atlas, while BFCL starts at 18.9%. And in the figure, the last BFCL point, at step 160, sits around 51.7%.)
What's next
The broader goal is to close the loop toward self-improving agents that build their own environments automatically. To get there, Prime Intellect wants to train agents, not just models (any task in any harness) and to compose several agents in one episode (synthesizer and solver, solver and grader…). The concrete next steps:
- Harder corpus: use the hardest tier as the seed and gate against a stronger model, to get tasks that challenge frontier models.
- Other domains: the same recipe to generate environments for terminal use or document retrieval, grounded in real-world seed data.
- Multi-agent training: today synthesis runs offline and leaves a fixed corpus, but since both agents are verifiers environments, the game itself can be trained. That would let the corpus evolve during training. It's future work; it doesn't exist yet.
- Abstractions: a preview of what will become verifiers v1 decouples tasks (what to solve) from harnesses (how to solve it), and General Agent is the perfect playground because it mixes local and sandboxed execution, task-specific tools and a multi-agent subtask.
To sum up
General Agent turns task creation into a game between two agents. One invents tasks with a database, tools and verification, and the other measures how hard they are. The result is a 4,504-task corpus that calibrates itself and can keep getting harder. With it, a base model improves a lot at function calling with very few traces, although for the strongest models the corpus still falls short.
Creating a task is itself an agent task; so is measuring how hard it is.
Sources
- "General Agent: A Self-Evolving, Synthetic Agent Environment", by Mika Senghaas, Prime Intellect blog (May 18, 2026).
- DeepSeek-V3.2 (arXiv:2512.02556), whose task evolution methodology the article follows.
- The video, on my channels: English and Spanish.