Goals that teach agents: the Bet loop
How SchemaBounce agents place graded bets against your business metrics, how the server grades and triages each one, and a dated log of what the method has shown so far.
Graded bets are how SchemaBounce agents learn which of their work moves your numbers. Before an agent acts on a goal, it writes down what it will change and how much a key result should move by a date. When that date passes, the server grades the bet against the real metric, checks the receipts of the work, and sends the result to the loop that can learn from it.
The agent never grades itself. A person approves every change to a goal. This page explains the method, how to use it in the console and through the MCP, and keeps a dated log of what it has shown so far.
Everything on this page is built and was tested on our local test stack and in internal workspaces. The build log at the end says what was demonstrated, where, and on what evidence. The learning hand-off from goals to the Practice loop runs only in internal workspaces. No result figures appear here yet: they come from the goal gym, which is not built.
The problem: agents graded on their own output
Look at how agent goals are usually written: "one finding per run", "triage every incoming bug", "four topics a month". Each one counts something the agent produces. The count goes up when the agent writes more, whether or not anything outside it got better.
A detection goal with a rate target is worse. "Flag one billing anomaly a day" can only be met on a quiet day by inventing an anomaly. This is Goodhart's law in software that writes records faster than a person can read them.
The fix has three parts:
- A goal that measures something the agent does not control directly.
- A written record of what the agent expected its work to do.
- A grader that is not the agent.
A bet is the second part. The server is the third. Goal quality checks, covered below, guard the first.
Two loops, one triage step
An agent pursuing a goal has to get two things right: what to do, and how to do it. They fail differently and are proven differently.
- How to work can be rehearsed. Replay the same task five times with and without a change, and you know in minutes whether the change helps. That is the Practice loop, SchemaBounce's implementation of the Harness² method. It gets its own page.
- What to do cannot be rehearsed. You cannot run "grow organic search clicks" five times. It can only be bet on and graded when the window closes. That is the Bet loop, the subject of this page.
Between them sits triage. It reads every graded bet and decides which loop, if any, should learn from it.
The bet
A bet is one written, checkable prediction about one key result of one goal. It has four parts:
| Part | What it holds | Limit |
|---|---|---|
| Lever | What will change in the world | 280 characters |
| Hypothesis | Why that change should move the metric | 600 characters |
| Expected | Direction (up or down), size of change, and unit | One key result |
| Window | The due date | At least 1 key-result window ahead, at most 6 windows ahead |
A key result is one declared outcome metric with a target. If the key result measures weekly, a bet is due between one and six weeks out.
Limits
- At most 3 open bets per key result and 6 per goal. A fourth bet on one key result is refused by name (
bet_limit_reached), with the open bets listed. - A bet can only be placed on an active goal, on a key result that belongs to that goal.
- An agent can place a bet on a goal it stewards, or as a member of the goal's domain with write access to it. In the console, placing a bet takes
adl:manage.
The limits stop a steward from spraying bets so that something is bound to hit. A person's bets grade the same way as an agent's.
Linked work
A bet names the work that pulls its lever: tasks and child goals. Tasks and child goals created in the same run that opened the bet join its work automatically. A steward can attach or detach work with adl_update_bet until the bet is graded, and never after. A bet holds at most 50 work items.
The opening snapshot
When a bet opens, the server captures the key result's metric value and stores the snapshot's id on the bet. A metric that someone publishes, rather than one the server computes, has no capture; the bet records the latest published value and says so.
Withdrawing
adl_withdraw_bet closes an open bet with a reason. A withdrawn bet stays on the timeline, counts toward the steward's record, and is never graded.
Grading: the server, never the agent
An hourly job grades every open bet whose due date has passed. Grades and triage live in columns that no agent tool can write.
- Closing value. The server captures or reads the closing snapshot.
- Observed change.
observed = sign × (closing − opening), where the sign follows the bet's direction. A positive number always means "the way the bet said". - Noise band. The band is the median absolute window-over-window change of the metric across up to 8 prior windows. With fewer than 3 prior windows the band is recorded as unknown: too little history. A repeated reading counts as a gap in the data, never as a change of zero, so it cannot shrink the band.
- Result:
| Grade | Rule |
|---|---|
| hit | Observed is at least half the expected change and outside the band. With the band unknown, observed must reach the full expected change. |
| miss | The band is known, observed is outside it, and observed is under half the expected change or moved the wrong way. |
| inconclusive | Observed is inside the band, or the band is unknown and observed is under the full expected change. |
| void | The metric could not be read at open or close, nothing was published since the bet opened, or the goal was abandoned. |
Overlap
When other bets on the same key result were open for more than half of this bet's window, the grade is marked shared and names them. A shared hit counts as a hit on the record. It is never a claim that this bet caused the move.
"Consistent with", never "caused"
Every declared metric carries an attribution caveat class. The grade copies it. On a metric the market also moves (confounded_market), every surface says a hit is consistent with the lever, never proof that the lever caused the move.
Cost
At grading, the server adds up the model spend on the bet's tasks and child goals between the bet's opening and its grade, from the usage ledger, and stores it in cents. The goal page then answers: what did this agent's moves achieve, and at what price.
Triage: sending each graded bet to the right teacher
Triage runs right after grading. It is deterministic code reading a versioned policy file (goal-triage-policy-1). Each result records the policy version it was computed under, so a threshold change is a reviewed change with a new version.
The receipts it reads
All metadata and receipts. Triage never reads a prompt, a reply or a tool payload.
- Task outcomes: the status of each task and child goal in the bet's work (completed, blocked, cancelled, open).
- False done: a task an agent ran on that a person later moved out of completed, inside the bet's window.
- A person's corrections: a person edited or deleted a record the agent wrote, or gave it feedback such as "wrong category". Each correction counts only against the agent that wrote the record.
- Failed runs: the failure class of each failed run that worked on the bet.
- Staleness: how many key-result windows old the metric's newest real value is.
- Self-scored metrics: whether the metric only counts records the steward writes itself.
The four classes, first match wins
| Order | Class | Rule |
|---|---|---|
| 1 | measurement | The grade is void, or the metric is more than 2 windows stale, or the metric is self-scored and the grade is a hit. |
| 2 | execution | Any false done; or under 70% of the bet's tasks completed; or no work linked at all; or a person corrected the work; or more than 1 failed run. |
| 3 | external | An inconclusive grade on a confounded_market metric, with the work verified done. |
| 4 | strategy | A miss or an inconclusive grade, with the work verified done: enough tasks completed, no false done, no corrections, healthy runs. |
| none | (verified hit) | A hit with the work verified. Recorded as a hit. |
Measurement comes first because a number that cannot be trusted teaches nothing. Execution comes before strategy because a strategy cannot be judged on work that was never done right.
The design leaves room for a typed judgment to add a reason, or to move a bet from strategy to execution when a signal is ambiguous. A judgment could never clear a gate or remove a reason. Nothing produces one today: triage is fully deterministic.
Why triage is the contribution
A loop that learns from every miss learns the wrong thing about half the time. It rewrites a good procedure because the market had a slow month, or keeps a bad strategy because the agent blamed its tools. Separating "did the work happen, and happen right" from "did the work matter" keeps both loops honest, and every rule above can be checked against receipts the platform already keeps.
What each class teaches
| Class | What happens next |
|---|---|
| strategy | No change to how the agent works. The steward's next brief says the last bet was a strategy miss and asks for a bet that pulls a different lever, rather than a bigger or smaller version of the same one. 2 strategy results in a row on one key result file a goal review, suggesting a retarget. |
| execution | Handed to the Practice loop: the platform cuts a scenario from the bet's own work (below). The brief tells the steward to finish or fix the work and leaves the method to the Practice loop. |
| measurement | No lesson. A quality flag goes on the goal and the brief says to fix the measurement before placing another bet. 2 in a row file a goal review that names the metric as the problem, suggesting remeasure. |
| external | Recorded, no lesson, no review. 3 in a row raise a quality flag: the metric may be the wrong instrument. |
The hand-off to the Practice loop
An execution miss opens one improvement per agent and key result. A second miss on the same pair attaches to the open improvement instead of opening another.
The platform cuts a goal scenario from the bet's work:
- Inputs: the ids of the records the bet's runs read, and hashes of the task prompts. Never message text.
- Expected outcome: what the person's correction or the failed receipt says the work should have produced.
- Checks: written by the platform from those receipts, never by the agent under test. For example: a record's content hash must match the corrected record, a record must not be written, a reopened task must not be marked done again.
The Practice loop then proposes changes to how the agent works and replays the scenario 5 times per arm, with the current behaviour always one of the arms and holdout scenarios guarding against regressions. Only a change that clears the evidence policy reaches the Inbox, and a person approves it. An adopted lesson records the goal and key result it came from. The full mechanics are on the Practice loop page, which is coming.
This hand-off runs only in internal workspaces, behind a switch that is off by default. Customer workspaces get it later, by opt-in, on their own model and credits.
Goal review
A goal review is a proposal to change a goal, filed into the Inbox for a person to decide. It recommends one of five things:
| Recommendation | What approval does |
|---|---|
| keep | Changes nothing and records the review. |
| retarget | Changes one key result's target (or its rate per window). |
| split | Creates the named child goals under the goal. |
| retire | Moves the goal to abandoned, and creates a replacement goal if one is named. |
| remeasure | Declares a different metric and points the key result at it. |
The card carries the bet record since the last review (placed, hit, miss, inconclusive, withdrawn, with cost), the verdict history and the quality findings in force.
How a review gets filed
- By triage, after repeated strategy or measurement results (above).
- By the steward, with
adl_propose_goal_review. - On a cadence: every 4 key-result windows on an active standing goal, counted from the last decided review or from the goal's creation, using the goal's shortest key-result window. A cadence review recommends keep, because nothing may be wrong; it is the regular check that the goal still measures the right thing.
A goal has at most one open review. A new filing merges into it: it adds its reason and takes the newer recommendation.
Who decides
- A person approves, edits then approves, or rejects. Approval applies exactly the stated change and nothing else, and the goal's history names the person who approved it.
- Approval requires a person signed in to the console. An agent, a service account or an MCP token cannot approve a review, its own or anyone else's. The server refuses with 403.
- A retarget or remeasure passes the same goal quality checks as any key result edit. A change that fails them is refused with the findings, and the review stays open.
- A review never touches a budget policy, an approval policy or a permission.
Goal quality checks
Iterating on a bad goal makes an agent better at the wrong thing. Eight checks (G1 to G8) run on goal create and update and when a bot's goals are seeded. Some block the write; others are stored as warnings that show on the goal page and in the brief. Among them: no rate target on an event the agent cannot cause (G1), no target the metric already meets (G2), a warning when the goal only counts the steward's own records (G3), a steward that checks in at least once per key-result window (G6), and a declared attribution caveat on every metric (G8).
The brief
A steward reads its goal brief on every wake that names a goal it stewards: its schedule, an off-track alarm, or a goal route event. An alarm wake starts with the reason it fired. The bet-related lines:
- Bets graded since your last tick, the 3 newest with their grade, observed change, band and overlap, and a count of the rest.
- The triage line for the newest graded bet: what the class asks of the steward.
- Open bets, as "n of 3" per key result, with the next due date.
- Review, when one is open: why it was filed, what it recommends, and that a person decides it.
- Lessons in force: how many apply to the goal, and when the last one was adopted.
An example, with invented values:
Bets graded since your last tick: 1
bet_7k2abcd1 on organic_clicks, expected +40 by 2026-12-01: miss (observed +6, band 9)
Last bet was a strategy miss: place a bet that differs in lever, not only in size.
Open bets: 2 of 3 (next due 2026-12-08)
Lessons in force: 1, last adopted 2026-11-30
Levers and hypotheses are agent-written, so they appear in a separate block marked as untrusted text, never in these lines. Detail stays behind adl_list_bets.
Safety and governance
- Agents never grade, triage or approve. Grades and triage classes are server-written columns. Goal reviews and lessons are Inbox decisions a person makes.
- Metadata only. Grading, triage, scenarios and the brief use ids, statuses, counts, receipts and hashes. No conversation content is read for evidence. A person's edit receipt names the fields changed and a hash of the new values, never the values.
- Untrusted text. A bet's lever and hypothesis render as plain text in the console, never as markdown or HTML, and are quoted as untrusted in any later prompt.
- No loosening. A goal review cannot change a budget, an approval policy or a permission. A lesson cannot loosen a control.
- Bounded spend. Bets are capped per key result and per goal. The work they create runs as ordinary agent runs under the workspace's budget checks.
- Internal-only switch. The hand-off from execution misses to the Practice loop runs only in workspaces named on one allowlist, off by default.
Use it in the console
The goal page
Open a goal from the Goals page. Under the title, a quality line lists any warnings. Below it:
- Bets shows "n of 6 open" and a timeline. Each row shows the lever, expected and observed change, a grade pill, the triage class with its reasons and any quality flag, the cost, and a note when the bet was shared with others.
- Place a bet opens a form: key result, lever, hypothesis, direction, change, unit and due date. It shows only for people with
adl:manage, on an active goal with at least one key result. - Withdraw on an open bet asks for a reason. The bet stays on the timeline and is never graded.
- Lessons in force lists the lessons learned for this goal.
Feedback on agent records
In the data explorer, every record an agent wrote carries a feedback control: Correct, Wrong category, Missed something or Wrong. Anything other than Correct is a person's correction. It is recorded as a receipt against the agent that wrote the record, and triage counts it when that agent's bet is graded. Editing or deleting an agent's record, or moving its task out of completed, is recorded the same way.
The Inbox goal review card
A goal review appears in the Inbox with its reason, recommendation, bet record and quality findings. Approve applies it, Edit then approve lets you change the recommendation first (for example a different target), and Reject takes an optional reason.
The agent's Lessons and Improvements
On an agent's Rules section:
- Improvements lists the Practice loop's work in progress for that agent, including improvements opened by a missed goal bet, and lets you start one by hand. It works in workspaces where the learning loop is switched on.
- Lessons lists what the agent learned, with the evidence, the review date and a Roll back action. Rolling back files a proposal in the Inbox; the lesson stays in force until a person decides it.
For agents and the MCP
Runtime tools an agent uses on its goals:
| Tool | What it does |
|---|---|
adl_open_bet | Places a bet: key result, lever, hypothesis, expected change, due date. |
adl_update_bet | Attaches or detaches work on an open bet. |
adl_withdraw_bet | Closes an open bet with a reason. |
adl_list_bets | Lists a goal's bets with grades and triage. |
adl_propose_goal_review | Files or replaces the recommendation on the goal's open review. |
No tool sets a grade, a triage class or an approval.
Through the hosted SchemaBounce MCP:
sb_metricswithbets_listandbet_getreads bets;goal_getreturns a goal with its bets and quality findings.sb_inboxwithaction=pendingandparts=goal_reviewslists goal reviews waiting for a person, with the change approving each one would make.
Build log
What this method can do, as it was demonstrated, newest first. Each entry says where the evidence comes from. "Local test stack" means our own development cluster running the platform; "internal workspace" means a SchemaBounce workspace, not a customer's.
Pending: the second try at a goal bet that feeds the learning loop
Bet bet_flf3rz3m on our local test stack, internal workspace, is due on 2026-11-13. Its agent wrote three findings on its task, and a person marked all three "wrong category". It has not graded yet. This entry will record what happened.
2026-11-13: the whole loop ran, in a simulated ledger, 8 times
- A test ground that runs in hours. Waiting a day per bet was too slow to learn from, so we built a goal gym on our local test stack. It is a simulated business with a hidden house rule for categorizing transactions, 5-minute key-result windows, and a scripted reviewer who corrects every wrong category. In the gym only, the reviewer also approves or rejects learning proposals by a stated rule. Every such decision is labelled as made by the harness, and an agent never approves anything.
- The full loop closed. A bet graded, triage counted the person's corrections, a goal scenario was cut from the task's real inputs, and a proposed rule took the agent from 0 of 5 to 5 of 5 on that scenario. The rule was approved and adopted as a lesson.
- What we measured. 4 seeds with the method on and 4 with it off (learning proposals rejected), 18 windows each, on a Haiku agent:
- Bets hit: 11 of 30 with the method on, 2 of 30 with it off.
- Mean accuracy in windows 13 to 18: 0.34 on, 0.04 off.
- The one seed that adopted no lesson stayed at 0. In the other two seeds with a clear gain, the gain came one to two windows after a lesson was adopted.
- What it does not show yet. 4 seeds is a small sample, and these are local simulated runs, not customer results. The lessons learned the house format but rarely the department, because the department depends on a memo field the proposer does not see.
- Found and fixed on the way:
- Triage missed runs started by the runtime's own dispatch.
- The goal brief only reached scheduled runs.
- A goal scenario replayed the corrected records instead of the original task.
- The grader hashed a value differently from the person's receipt, so no probe could ever pass.
2026-11-12: the first goal bet did not reach the Practice loop
- What happened. Bet
bet_i4l3d655on the local test stack graded inconclusive: the key result moved 0 against an expected 3, with too little history to know the metric's normal noise. Triage classed it strategy, not execution, and counted 0 person corrections, although a person had marked all three of the agent's findings "wrong category". No goal scenario opened and nothing reached the Inbox. - Why. Triage found the agents that worked a bet by matching each run's task id to the bet's tasks. The runtime runs an assigned task under its own queue key and ties the run to the task only through the task's timeline. Triage saw no agent, so it skipped the person's corrections. It now follows the timeline links. Two integration tests against a throwaway Postgres cover the two ways a task gets run.
- What stays. A triage result is written once and never rewritten, so this bet keeps its strategy class as the record of what the platform saw at the time. The test runs again on a new bet.
2026-11-11: execution misses hand off to the Practice loop
- Goal scenarios. An execution miss opens a goal practice improvement with a scenario cut from ids and hashes, with checks the platform writes from the receipts. Proven in integration tests against a throwaway Postgres: three "wrong category" corrections became one execution miss, one improvement and a scenario of three platform-written checks; a second miss attached to the same improvement; a workspace off the allowlist stored nothing.
- The learning loop ran end to end on the local test stack, internal workspace, on a Haiku agent. The scenario was a seeded capability scenario (a workspace-specific record name no model guesses), not one cut from a bet. The current behaviour passed 0 of 5; the proposed rule passed 5 of 5. Tokens per run went down 5%. The holdout scenario held at 5 of 5 in both arms. A person approved the proposal in the Inbox, and the lesson is in force with a 30-day review date and a watch over the agent's next 10 runs.
- Two real defects found by those runs, and fixed. A proposed rule scoped to a platform tool never reached the agent, because the runtime only renders scoped rules for a granted MCP server or skill; such rules now apply agent-wide. Learned changes were not pushed to the running agent until some unrelated publish; adoption now publishes at once.
2026-11-10 and 2026-11-11: triage and goal review (phase 2)
- Deterministic triage with a versioned policy runs right after every grade.
- Goal review proposals, on the local test stack, internal workspace: a steward filed a retarget of a key result from 50 to 75. A person approved it, only the target changed, and the goal's history names the person who approved. An approval attempted with an agent-bound credential was refused with 403.
- Cadence reviews file every 4 key-result windows on standing goals.
- A person's corrections are receipts: record feedback, edits and task reopens are recorded, each attributed to the agent that wrote the record, and triage reads them.
2026-11-10: goal quality and bets (phases 0 and 1)
- Goal quality checks G1 to G8 run on goal create and update and at bot goal seeding.
- A brief on every goal wake, including off-track alarms, which now start with the reason they fired.
- Bets with server grading: the hourly grading job, noise band, overlap marking and cost attribution.
- A person placed and withdrew bets on the goal page, on the local test stack.
- An agent placed a bet through its tool. A steward on Haiku opened
bet_1zlwx8k2withadl_open_beton the local test stack, internal workspace. Its task joined the bet automatically, and the opening snapshot was recorded with no grade.
What is not claimed yet
- No results figures. This page does not say how much the method improves goal attainment, hit rates or cost per hit. Those numbers will come from the goal gym, a planned suite of seeded, simulated businesses where the same goal can run 5 times with the method on and off. It is not built. When it runs, its figures will be published with the environment seeds, models and policy versions.
- One run is one run. The 0 of 5 to 5 of 5 result above is one seeded scenario on one local stack. It shows the loop works end to end. It does not measure how many changes help.
- No graded live bet has fed the loop yet. See the pending entry.
- Planned, not built: leading indicators and an early read inside a key result's first window, and customer opt-in for the learning hand-off.
Common questions
Can an agent grade or approve its own bet?
No. The server writes grades and triage classes in columns no agent tool can set. Goal reviews and lessons need a person signed in to the console.
What happens when a bet misses?
Triage decides why. If the work was not done or was corrected, the Practice loop learns how to do it better. If the work was done and the number did not move, the next bet must pull a different lever. If the number cannot be trusted, the goal goes back to a person.
Does SchemaBounce read conversations to grade bets?
No. Grading and triage read metadata and receipts: ids, statuses, counts, hashes and a person's feedback values. Conversation content is never evidence.
Can a person place a bet?
Yes. A person with adl:manage places bets from the goal page. A person's bet is graded and triaged the same way as an agent's.
Related Documentation
Continue exploring