Agents
Reserve the next maintenance lookups
BOTIE
Examples, experiments and workspace controls
Connect a tool's inputs to see what it produces. You can try a branch before connecting it to Result.
Try your own inputs
Use a copy of the example to try your own data. Keep the problem's assumptions in mind, and predict the effect of a change before checking the output. You can also add another branch to compare two ways of doing the calculation.
Context for this challenge
Connect limits, settled usage and in-flight reservations to Subtract spent and reserved work. Return its four named resource remainders.
Two proposed calls compete with an earlier in-flight call for one run’s allowance.
Inspect the component calculation
Subtract spent and reserved work( Run limits: Total run allowances Settled usage: Settled usage Reservations still in flight: Earlier work still in flight )
Examples and results
- Total run allowances
{ "tokens": 1000, "cost_units": 20, "model_requests": 4, "tool_calls": 4 }- Settled usage
{ "tokens": 200, "cost_units": 4, "model_requests": 1, "tool_calls": 1 }- Earlier work still in flight
{ "tokens": 300, "cost_units": 6, "model_requests": 1, "tool_calls": 1 }- Required result
{ "tokens": 500, "cost_units": 10, "model_requests": 2, "tool_calls": 2 }
- Total run allowances
{ "tokens": 1000, "cost_units": 20, "model_requests": 4, "tool_calls": 4 }- Settled usage
{ "tokens": 200, "cost_units": 4, "model_requests": 1, "tool_calls": 1 }- Earlier work still in flight
{ "tokens": 300, "cost_units": 6, "model_requests": 1, "tool_calls": 1 }- Required result
{ "tokens": 500, "cost_units": 10, "model_requests": 2, "tool_calls": 2 }
- Total run allowances
{ "tokens": 1000, "cost_units": 20, "model_requests": 4, "tool_calls": 4 }- Settled usage
{ "tokens": 200, "cost_units": 4, "model_requests": 1, "tool_calls": 1 }- Earlier work still in flight
{ "tokens": 0, "cost_units": 0, "model_requests": 0, "tool_calls": 0 }- Required result
{ "tokens": 800, "cost_units": 16, "model_requests": 3, "tool_calls": 3 }
- Total run allowances
{ "tokens": 1000, "cost_units": 20, "model_requests": 4, "tool_calls": 4 }- Settled usage
{ "tokens": 200, "cost_units": 4, "model_requests": 1, "tool_calls": 1 }- Earlier work still in flight
{ "tokens": 300, "cost_units": 6, "model_requests": 1, "tool_calls": 1 }- Required result
{ "tokens": 500, "cost_units": 10, "model_requests": 2, "tool_calls": 2 }
Try a fresh construction
This clears this draft, including its undo history. Earlier successful attempts stay recorded. Build again without opening hints to record an independent attempt.
Stuck? Inspect a worked construction
The tools below form one possible solution. You can assemble it, follow its signals, and undo that change to return to your own construction.
Assumptions and test precision
This is a deterministic admission snapshot. It does not implement distributed transactions, provider billing, remote cancellation or circuit-state transitions. Numerical tests allow a difference of 0.001. Lists and structures must also have the right shape.
Your last tested pieces can start the full construction. An existing draft there keeps its own pieces.
An affordable call cannot finish inside the remaining deadline
This check uses the pieces from “Reserve a batch against one shared ledger”.
BOTIE
- Proposed calls in queue order
[ { "id": "history-lookup", "input_tokens": 100, "timeout_ms": 401, "reserve": { "tokens": 200, "cost_units": 4, "model_requests": 0, "tool_calls": 1 } } ]- Total run allowances
{ "tokens": 1000, "cost_units": 20, "model_requests": 5, "tool_calls": 5 }- Settled usage
{ "tokens": 100, "cost_units": 2, "model_requests": 1, "tool_calls": 0 }- Earlier work still in flight
{ "tokens": 200, "cost_units": 4, "model_requests": 1, "tool_calls": 1 }- Cancellation and dependency circuit
{ "cancelled": false, "circuit": "closed", "probe_granted": false }- Run clock and per-request context cap
{ "now_ms": 1600, "deadline_ms": 2000, "max_input_tokens": 300 }
Use a number, text, or an array matching the requested result. For a matrix, put each row in brackets. Saving your prediction runs your current construction on these inputs and checks the earlier examples too.
Build a construction in the workspace above first. This case will test those pieces.
Why can the half-open circuit refuse a second probe even when every numeric budget still has room?
Resource capacity, dependency health and user cancellation are separate execution conditions. A proposal must satisfy all of them.
This is a deterministic admission snapshot. It does not implement distributed transactions, provider billing, remote cancellation or circuit-state transitions.
Work through the Python challenges →