Skip to content
blog
quadropic

© 2026 Quadropic Private Limited

Company

HomeBlogSyntheo

Topics

PartnershipsProductResearch

Contact

GeneralCareersInvestorsLegal

Locations

BengaluruMysuru

Follow

RSS feed

ilm:start

Turning an agent's work into checked, reusable code, and composing new answers from a library of many actions.

Published
Nov 24, 2026
Written by
Mohamed Kamran
Topics
Research
Reading time
12 min
ilm:start

On this page

  1. Learn once, then replay
  2. Control tasks: driving and parkour
  3. A worked example: how the robot learned to jump
  4. Composing new answers from old pieces
  5. Addresses: a pick that doesn't grow with the library
  6. Contracts: only pieces that fit
  7. Guess first, then check for real
  8. Dreams: learning with no teacher
  9. Compression: keeping plans short
  10. Try cheap first
  11. A small local model as the brain
  12. Why it could matter
  13. Disadvantages
  14. What's next
  15. References
ilm:start
  1. 01Learn once, then replay
  2. 02Control tasks: driving and parkour
  3. 03A worked example: how the robot learned to jump
  4. 04Composing new answers from old pieces
  5. 05Addresses: a pick that doesn't grow with the library
  6. 06Contracts: only pieces that fit
  7. 07Guess first, then check for real
  8. 08Dreams: learning with no teacher
  9. 09Compression: keeping plans short
  10. 10Try cheap first
  11. 11A small local model as the brain
  12. 12Why it could matter
  13. 13Disadvantages
  14. 14What's next
  15. 15References

ilm, short for iterative learning model, is a runtime that makes AI agents cheaper the more they work. The first time it meets a new kind of job, a large model writes a short script for it; ilm checks the script and saves it as an action, and every later job of that kind is a replay with no large model.

We show the idea on file tasks, a self-driving car and a parkour robot, and then describe the composer: how ilm builds answers to new jobs out of actions it already has, using addresses, learned contracts, an effect model, practice runs and compression.

Learn once, then replay

Most agents solve every task from scratch, even when they solved the same kind of task a minute ago. ilm takes a different route. The first time a new kind of job arrives, a large model writes a general, typed program for it, which we call an action. ilm checks it and saves it. When a similar job comes in later, ilm replays the saved action instead of asking the model again.

In ilm, a script and an action are the same thing. Whatever the large model writes to solve a job is a short script. Once that script has run and passed its checks, it is saved, with its fixed values turned into parameters, and from then on it is an action that ilm can call.

a new job done this kindbefore? yespartlyno replay the saved programno big AI needed build it from old partsthe composer the big AI writesa new program run it safely,check the result,save it
Figure 1. What happens to each job.

Several pieces make this safe and cheap:

  • Typed actions. An action like "sum a column per group and save it as JSON" takes the file, the column and the output path as inputs, so one action covers every job of its kind.
  • A decision model. A small, cheap model (Jev) does the judgement calls. It picks which action fits, fills in its inputs from the job's wording, and reviews the result.
  • A gate and a sandbox. New code is checked statically before it ever runs, and every run happens in an isolated process with time and memory limits.
  • A journal. Every call is written to an append-only log. From good runs ilm learns what each action's output normally looks like, so it notices when a replay suddenly drifts.

Control tasks: driving and parkour

Actions are not limited to file and data work: anything with a programmatic interface can be driven by them. We use two simulated control tasks in ilm Studio. In both, low-level control (steering and speed, or joint motion) is plain code. The actions encode manoeuvres, and the decision model chooses among them at run time. When a situation has no matching action, the run pauses at a safe point and the large model writes one; after that, the situation is handled without it.

Driving. A car on a city route. Learned actions cover stop signs, school zones, potholes, emergency vehicles and red lights.

Parkour. A simulated humanoid. Each move, such as ducking, vaulting or climbing, is learned once and reused on unseen courses.

Clips from the ilm demo video.

We crossed the same course, Course 7 with eight obstacles, two ways and added up the tokens obstacle by obstacle. Without ilm, the agent (Claude Opus 5.5) used the same parkour tools and worked out every obstacle itself. With ilm, the moves it had already learned ran with no large model at all. Both runs cleared all eight obstacles without a fall.

0k150k300k450k600kstartcrawlzip linevaultplatformdivejumpclimbswingtokens so far551kwithout ilm12.6kwith ilmwithout ilm (large model)with ilm (decision model only)
Figure 2. Running total of tokens across the same course. Without ilm this counts every token the large model processed, including context it re-read. With ilm the only tokens are the decision model's one pick per obstacle. The moves were taught once beforehand, and that teaching is not counted here. Hover or tap a point for details.

Across the eight obstacles that is 551k tokens and $0.46 without ilm, against 12.6k tokens and under a tenth of a cent with ilm. Without ilm the cost also varies with the obstacle: the moving platform and the climb each took five calls. With ilm every obstacle costs the same single pick.

A worked example: how the robot learned to jump

To teach the jump, the large model writes one short script: run up to the gap, try every push strength from 0.3 to 0.8 on copies of the world, let the decision model pick one that lands safely, then do it for real and check the robot is on its feet.

gap 0.3 ✗ 0.4 ✗ 0.5 0.6 ✓ 0.7 0.8 picked too far six pushes, tried on copies of the world before anything really moves
Figure 3. Six pushes tried on copies of the world (illustrative). The ones that fall in are dropped; the decision model picks among the rest.

Once the script works, it is saved as the action parkour.jump, with its numbers turned into parameters so it fits any gap. From then on every gap is a replay with no large model.

Python
@action
def jump(speed_mps: float = 4.5, angle_deg: float = 30.0,
         strengths: list = [0.3, 0.4, 0.5, 0.6, 0.7, 0.8]) -> dict:
    """Use when a gap is next."""
    gap = tools.parkour.next_obstacles(count=1)["obstacles"][0]
    tries = tools.parkour.preview(variants=[steps(s) for s in strengths])
    # keep only the pushes that land
    landed = {s: t for s, t in zip(strengths, tries) if t["ok"]}
    if not landed:                     # nothing works: stop safely and ask
        ilm.escalate("no push clears this gap", gap=gap)
    question = "Which push lands past the gap with a comfortable margin?"
    s = ilm.decision.pick(question, options=landed, gap=gap, frame=camera())
    out = tools.parkour.do(steps=steps(s))
    ilm.ensure(out["ok"] and not out["fallen"], "landed past the gap on its feet")

Listing 1. The saved action parkour.jump, simplified so it is easy to read. A real action is often longer, with more checks, more options, retries and hand-offs, but it has the same shape: look, try, pick, do, check.

Composing new answers from old pieces

Replay only helps when the same kind of job comes back. A job like "filter this file, then keep the top 10 rows" is new as a whole, even if ilm already has a filter action and a top-N action. Today it goes back to the large model. We want ilm to build the answer from the parts it has.

Two facts make this tractable. Both follow from actions being plain, deterministic code: an action a with inputs θ maps a state s to exactly one next state.

T(s, a, θ) = s′

Checking is exact

Any candidate plan can be run on a scratch copy of the folder in about a tenth of a second per step, so we never have to trust a guess. The planner only has to rank candidates well, not be right first time.

Training data is free

Every run (s, a, s′) is a true example, with no labelling needed.

The hard part is search. With N actions and plans of length k, there are Nk possible plans; with 106 actions and four steps that is 1024. There are three numbers to attack: the cost of one pick, the number of choices per step, and the plan length. The composer has one idea for each.

10²⁴ plans width: N actions per step depth: k steps 3 cuts width: only actions that fit depth: shorter, thanks to merges each pick: 765 scores, not N
Figure 4. Search as a triangle: width is the number of choices per step, height is the plan length. The design shrinks both and makes each single choice cheap. Not to scale.
task + state address tree contracts effect model sandbox run plan ✓ 3 picks drop misfits rank ~32 prove verified runs become training data and new actions
Figure 5. The composer at a glance. Each blue stage cuts the number of candidates; the green stage proves the survivors by running them. Whatever it proves flows back as training data and new actions.

Addresses: a pick that doesn't grow with the library

Comparing a task with every action one by one is slow once there are many of them. Instead, every action gets a three-digit address, each digit from 0 to 254, like a floor, aisle and shelf: 2553, about 16 million slots.

all actions files money email charts … 255 shelves invoices bank tax read statement match rows find duplicates 3 small picks instead of searching every action
Figure 6. Three small picks lead from the top of the tree to one action.

The digits come from the action's embedding by residual quantization: the nearest of 255 coarse centres, then the nearest centre to what is left over, and so on.

action level-1 centres (255 of them) level-2 centres (255 per level) the action's embedding φ(a) digit 1 = nearest large centre digit 2 = nearest small centre to what is left over digit 3 = the same again, one level finer
Figure 7. Each digit names the centre closest to what the previous digits left unexplained.

The library becomes a 255 × 255 × 255 cube of small buckets, stored as three bytes per action, and a pick is three choices of 255:

p(a | s, g) = p(c1 | s, g) · p(c2 | c1, s, g) · p(c3 | c1, c2, s, g)
one bucket(17, 203, 5) digit 1 · 255 digit 2 · 255 digit 3 · 255 255³ = 16.5 million cells A, the address table 172035 172036 8812140 … N rows 3 bytes per address similar actions share the start tiny, even for huge libraries The pick, three lists of 255 scores ×× digit 1 digit 2, given 1 digit 3, given 1, 2 chance of an action = its three bars multiplied
Figure 8. The library as a cube (left), stored as a table of three small integers per action (top right), and picked with three lists of 255 scores (bottom right).

That is 765 scores per pick at any library size, and a new action gets an address without retraining.

Toy example. With 2-number embeddings and 3 centres per level, an action at (3.6, 1.2) is nearest to the centre (4, 0), so its first digit is 1. Repeating on the leftover gives the address (1, 2, 0), which rebuilds to (3.5, 1.0).

row 0(0, 4) row 1(4, 0) row 2(−4, 0) action (3.6, 1.2) distance to row 0: 4.56 distance to row 1: 1.26 ← nearest, so digit 1 = 1 distance to row 2: 7.69 The short blue line is what row 1 failed to explain: (3.6, 1.2) − (4, 0) = (−0.4, 1.2). Digit 2 works on that.
Figure 9. Digit 1 of the toy example: the nearest centre wins.

Robustness. A wrong turn near the top would lose an action, so each cell is a bucket compared exactly, an action can have up to three addresses (from its text, its behaviour and the tasks it solved), a plain nearest-neighbour scan runs alongside, and only an overfull bucket is split.

Adding an action needs no retraining and changes no other address:

new action embed its text run it, embed result skipped if it has outside effects 3 digits each add to buckets + flat index bucket too big? split that bucket only
Figure 10. Adding an action: embed it, give each vector three digits, add it to those buckets.

Contracts: only pieces that fit

Each action needs something and produces something. ilm learns both from the action's own runs, for example "reads a CSV file, writes a JSON file". Two steps can be chained only if what the first produces fits what the second needs:

post(at) ⇒ pre(at+1)
read file table keep some rows table make chart ✓ fits read file table send email needs an address, not a table ✗ skipped without asking any AI
Figure 11. Steps are joined only where the output of one fits the input of the next.

This turns most wrong plans into impossible ones before any model is asked, and it turns wiring (which output feeds which input) into simple matching. Types are learned on a small ladder (a CSV path is a path, which is text) and only get narrower once several runs agree, so a single odd run can't mislead the planner.

Guess first, then check for real

Running every candidate is cheap but not free. So a small effect model learns to predict what an action will do to the current state, in the spirit of JEPA: it predicts a compact summary of the next state, not every byte of it. The composer imagines about 32 candidates this way, ranks them by how close their predicted result is to the goal, and runs only the best few in the sandbox.

s E h z P ẑ′ a, θ s′ E h z′ run a for real(sandbox) L_predguess vs real q which action?L_inv frozenfrozen grey = frozen or given · blue = trained
Figure 12. The effect model. Top: guess the after-state from the before-state and the action. Bottom: the real after-state, from running it. A second head has to name the action from the two states, which stops the model from ignoring the action.

There is a trap. An action usually changes a small part of a large state, so "nothing changes" is almost always a good prediction, and a model trained only to predict the next state learns to ignore the action. We guard against this with an inverse loss: from the states before and after, a second head has to say which action ran.

L = ‖ P(z, a) − z′ ‖2  −  α log q(a | z, z′)

Rollouts are kept to one or two steps. The real state is re-read after every step that actually runs, because latent world models are known to rank actions reliably only over short horizons.

Dreams: learning with no teacher

Because actions are code, ilm can practise on its own. It samples random chains of actions that fit together, runs them in a scratch folder, and records where they end up.

s₀ s₁ s₂ s₃ a₁ a₂ a₃ = goal g Training example: start s₀, goal s₃, answer a₁ a₂ a₃. It is correct because we watched it happen.
Figure 13. A dream: run a random valid chain, then treat wherever it ended as the goal. The chain is a correct plan for that goal by construction.

The trick is hindsight: whatever state a chain reached, the chain is a correct plan for reaching it. Every random run becomes a labelled example for the effect model and the picker. Real tasks still count for more than dreams, since dreams come from a different distribution than what users actually ask.

Compression: keeping plans short

If the same chain of actions keeps showing up in solved plans with the same wiring, it is merged into one new action. This is the BPE idea from tokenizers, applied to plans: common pairs become a single token.

beforeafter A B C D E B C B C F G merge the commonest pair A BC D E BC BC F G 3 plans, 11 steps3 plans, 8 steps, 1 new action
Figure 14. Compression on a toy corpus. Each row is a solved plan and each letter an action. The pair that keeps recurring becomes one action, and every plan that used it gets shorter.

Each merge adds one choice to the library but removes steps from every plan that used it, and plan length is what makes search explode. Merges are weighted towards what recent jobs use, not just what was common long ago. A merge is only committed if every past plan that used the chain, rewritten to call the new action, reproduces its recorded run exactly. If a merged action ever fails, it is split back into its parts and only the broken part is re-planned.

Try cheap first

For each job, ilm climbs a ladder and stops at the first rung that works:

1 Replay 2 First guess 3 Wider search 4 Repair 5 Ask the big AI cheap and instant slow and costly
Figure 15. The ladder each job climbs, from cheap and instant to slow and costly.
  1. Replay: a saved action already fits the job.
  2. First guess: the picker's best plan, checked in the sandbox.
  3. Wider search: a best-first search over about 32 candidates per step.
  4. Repair: split a failing merged action, or write a small adapter between two actions that almost fit.
  5. Ask the big AI: the large model writes a new action, which is saved, so that kind of job won't need it again.

Because checking is exact, more tries buy real accuracy. If each sampled plan were right with probability p, running R of them succeeds with probability

1 − (1 − p)R
30 tries → 0.958 10 tries → 0.651 00.51 010203040 R = plans run for real chance at least one is correct
Figure 16. Why more tries help when checking is exact: the formula above with p = 0.1. Real tries are correlated, so a real curve sits lower.

A plan is only accepted when every step feeds the final answer and the result passes the same review as any other job. An accepted plan is compiled into one ordinary action, so the next job of its kind is a plain replay at the cheapest rung.

A small local model as the brain

A language model of about 1.7 billion parameters (LFM3-1.7B) runs locally and takes over jobs that would otherwise need the large one:

  • Proposing plans. Its output is constrained to the names of actions that exist and can run, so it can't invent one. It is also trained with the action addresses as new tokens, learning from the task-and-plan pairs ilm saves from every solved job, so it writes a whole plan as a short string of codes.
  • Writing glue. When two actions almost fit, it writes many small adapters; each is gated and tested, and only one that passes is kept.
  • Learning from search. Search with exact checking finds better plans than the model alone, and the model can then be trained on those plans: a loop that improves itself with no human labels.

Why it could matter

  • Agents get cheaper and faster with use, because solved work turns into code.
  • Picking an action is designed to cost the same however many actions there are.
  • Every plan is proven by running it, not trusted because a model said so.
  • Plans get shorter over time as common chains merge.
  • Most of it runs on a laptop.

Disadvantages

  • Some actions can't be practised. Actions with outside effects, like sending an email, can't be run at random, so they learn only from real runs.
  • Contracts are weak for new actions. An action with only a few runs has little evidence about what it needs and makes.
  • Actions belong to their environment. A library is learned against one set of tools, so it has to be adjusted for each environment. If a tool changes, say it is renamed, takes new inputs or returns something different, the actions that call it break. ilm keeps a separate library per environment and notices when results drift, but a broken action still has to be fixed or taught again.

What's next

The improvements we're working on next:

  • Train the picker on solved jobs and practice runs, so the address tree alone finds the right action at any library size.
  • Repair actions when tools change: spot the call that broke and rewrite only that part, checked against past runs.
  • Carry experience across environments: when ilm meets a new environment or a different set of tools, construct its actions on the fly from what it learned in other scenarios and environments, instead of starting from an empty library.

References

  1. The Planning Limits of Latent World Models: short horizons
  2. Keeping JEPA World Models Plannable When Little of the Frame Moves: the inverse loss
  3. ToolWeaver: hierarchical codes for tools
  4. PRISE: BPE over action sequences
  5. Prospective Compression in Human Abstraction Learning
  6. Hindsight Supervised Learning: relabelling dreams
  7. Searching Latent Program Spaces: search at test time
  8. LFM3-1.7B

Questions or ideas? Write to us at info@quadropic.com.

Related articles

View all
  1. Partnerships

    Joining NVIDIA Inception Program

    We've been selected for the NVIDIA Inception Program, which supports AI startups. Here's what it is, why it matters to us, and what comes next.

    Nov 20, 2026 · 2 min read

  2. Product

    Meet Syntheo, the workspace for AI agents

    A developer environment and boardroom for AI agents, built for collaboration, security and control, and running on the subscriptions you already pay for.

    Sep 27, 2026 · 3 min read