Layer 8 · place
resource
What agents share and wait for: a pool of a fixed capacity (build slots, a rate limit, a cache, seats, a work queue) and the claims on it. A claim is for one or more units of the pool. It waits in the queue until the pool grants it, or until its wait limit, if it names one, has passed; holds for at most its time limit, and ends released, expired or killed; its holder may withdraw it while it is queued. A claim over capacity, or of more units than are free, waits; it is never refused for that. The queue publishes when each claim joined it (queued_at). A pool grants in its order: Fifo (the default) in queue order, so a grant while an earlier claim of the pool still waits is refused, and a claim on it names no priority; Priority by the claim's priority, highest first, equal priorities in queue order and a claim without a priority behind every claim with one, so a grant while a claim that comes before it still waits is refused.
Depends on
Used by
No block depends on this one.
Entities
Claim
One party's claim on one or more units of a pool, for at most its time limit, waiting for at most its wait limit if it names one.
Identified by claim_id (ClaimId).
| field | type | meaning |
|---|---|---|
pool_id | PoolId | |
holder | PartyId | |
time_limit_seconds | integer | |
units | integer | The units of the pool the claim holds once granted; one unless the request names more. |
queued_at | timestamp | When the claim joined the queue; the pool grants queued claims in this order, after priority on a pool of order Priority. |
priority | optional integer | The claim's priority on a pool of order Priority, higher first; a claim without one waits behind every claim with one. A pool of order Fifo takes none. |
held_until | optional timestamp | |
wait_until | optional timestamp | The instant the claim gives up waiting if it is still queued: the request time plus the claimant's wait limit. Absent, the claim waits until it is granted or withdrawn. |
run_id | optional RunId | The run the claim was made for; absent for a claim of no run. |
step_id | optional StepId | The step of that run that holds the claim. A step (agentic.work, a lower layer) names no claim, so the claim names the step it was held for. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
poolreferences Pool (one, bypool_id)runreferences Run of work (one, byrun_id)stepreferences Step of work (one, bystep_id)
Always holds: time_limit_seconds > 0, units > 0.
Lifecycle of Claim
Expired, Killed, Released, WaitExpired, Withdrawn.Pool
A shared resource with a fixed number of units, each held by one claim at a time.
Identified by pool_id (PoolId).
| field | type | meaning |
|---|---|---|
name | Name | |
kind | PoolKind | |
capacity | integer | |
held | integer | The units the claims hold now. |
free | integer | The units no claim holds now. |
order | optional PoolOrder | The order the pool grants waiting claims in; without it, Fifo. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Always holds: capacity > 0, held >= 0, held <= capacity, free >= 0, free <= capacity.
Lifecycle: one state, Open; a recorded Pool does not change.
Commands
CreatePool
Create a pool.
Called by: Scheduler.
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
zero-capacity refused | capacity <= 0 | Zero: A pool has at least one unit. |
created | otherwise | creates a Pool in Open; emits Pool |
More columns: swipe horizontally, or focus the table and use the arrow keys.
ExpireClaim
Expire a claim. The pool ends a held claim whose time limit has passed.
Called by: Scheduler.
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown-pool refused | no such Pool | Unknown: No pool has this identity. |
unknown-claim refused | no Claim for claim_ | Unknown: No claim has this identity. |
other-pool refused | the Claim of claim_ has pool_ | Other: The claim was made on another pool. |
not-held refused | the Claim of claim_ has state != Held | Claim: The claim does not hold a unit. |
limit-not-reached refused | the Claim of claim_ has held_ | Limit: The claim's time limit has not passed. |
units-mismatch refused | the Claim of claim_ has units != input. | Units: The units named are not the claim's units. |
expired | otherwise | updates the Pool; moves each Claim with claim_ to Expired; emits Claim |
More columns: swipe horizontally, or focus the table and use the arrow keys.
ExpireWait
End a claim's wait. The pool ends a queued claim whose wait limit has passed.
Called by: Scheduler.
| field | type |
|---|---|
claim_id | ClaimId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown-claim refused | no such Claim | Unknown: No claim has this identity. |
no-wait-limit refused | not (defined(wait_ | No: The claim names no wait limit; it waits until it is granted or withdrawn. |
wait-not-over refused | defined(wait_ | Wait: The claim's wait limit has not passed. |
wait-expired | otherwise | moves the Claim Queued → Wait; emits Claim |
wrong-state refused | the Claim is in a state that does not allow it | Claim: The claim is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
GrantClaim
Grant a claim. A queued claim takes its units of its pool, when that many are free.
Called by: Scheduler.
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown-pool refused | no such Pool | Unknown: No pool has this identity. |
missing-pool refused | no Pool for pool_ | Unknown: No pool has this identity. |
unknown-claim refused | no Claim for claim_ | Unknown: No claim has this identity. |
pool-full refused | the Pool of pool_ has held >= capacity | Pool: Every unit is held; the claim stays queued. |
other-pool refused | the Claim of claim_ has pool_ | Other: The claim was made on another pool. |
not-queued refused | the Claim of claim_ has state != Queued | Claim: The claim is not waiting in the queue. |
units-mismatch refused | the Claim of claim_ has units != input. | Units: The units named are not the claim's units. |
too-few-free-units refused | the Pool of pool_ has free < input. | Too: Fewer units are free than the claim holds; the claim stays queued. |
out-of-order refused | a Claim with claim_ | Not: A claim of the same pool that joined the queue earlier is still waiting; the pool grants in queue order. |
out-of-priority refused | a Claim with claim_ | Not: A claim of the same pool that comes first by priority is still waiting: one of a higher priority, one of the same priority that joined the queue earlier, or, for a claim without a priority, one with a priority. The pool grants by priority. |
granted | otherwise | updates the Pool; moves each Claim with claim_ to Held; emits Claim |
More columns: swipe horizontally, or focus the table and use the arrow keys.
KillClaim
Kill a claim. The pool ends a held claim by force.
Called by: Scheduler.
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown-pool refused | no such Pool | Unknown: No pool has this identity. |
unknown-claim refused | no Claim for claim_ | Unknown: No claim has this identity. |
other-pool refused | the Claim of claim_ has pool_ | Other: The claim was made on another pool. |
not-held refused | the Claim of claim_ has state != Held | Claim: The claim does not hold a unit. |
units-mismatch refused | the Claim of claim_ has units != input. | Units: The units named are not the claim's units. |
killed | otherwise | updates the Pool; moves each Claim with claim_ to Killed; emits Claim |
More columns: swipe horizontally, or focus the table and use the arrow keys.
ReleaseClaim
Release a claim.
Called by: Claimant.
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
holder-not-the-caller refused | holder != caller. | Not: Only the claim's holder releases it. |
unknown-pool refused | no such Pool | Unknown: No pool has this identity. |
unknown-claim refused | no Claim for claim_ | Unknown: No claim has this identity. |
other-pool refused | the Claim of claim_ has pool_ | Other: The claim was made on another pool. |
not-the-holder refused | the Claim of claim_ has holder != input. | Not: Only the claim's holder releases it. |
not-held refused | the Claim of claim_ has state != Held | Claim: The claim does not hold a unit. |
units-mismatch refused | the Claim of claim_ has units != input. | Units: The units named are not the claim's units. |
released | otherwise | updates the Pool; moves each Claim with claim_ to Released; emits Claim |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RequestClaim
Request a claim. The caller joins the queue of a pool for the units it names (one, if it names none), for at most the time limit, with a priority if it names one, for the run and step it names, if any, and until the wait deadline it names, if any.
Called by: Claimant.
| field | type | meaning |
|---|---|---|
pool_id | PoolId | |
time_limit_seconds | integer | |
units | optional integer | The units of the pool the claim is for; one if absent. |
wait_until | optional timestamp | The instant the claim gives up waiting; the request time plus the wait limit. |
priority | optional integer | |
run_id | optional RunId | The run the claim is made for. |
step_id | optional StepId | The step of that run that will hold the claim. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
no-time-limit refused | time_ | No: A claim names a time limit of at least one second. |
no-units refused | defined(units) and units < 1 | No: A claim names at least one unit. |
unknown-pool refused | no Pool for pool_ | Unknown: No pool has this identity. |
priority-on-fifo refused | the Pool of pool_ has defined(input. | Priority: The pool grants in queue order (Fifo) and takes no priority; only a pool of order Priority does. |
queued | otherwise | creates a Claim in Queued; emits Claim |
More columns: swipe horizontally, or focus the table and use the arrow keys.
WithdrawClaim
Withdraw a queued claim. The holder takes a claim back before the pool grants it; the pool is not touched.
Called by: Claimant.
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
holder-not-the-caller refused | holder != caller. | Not: Only the claim's holder releases it. |
unknown-claim refused | no such Claim | Unknown: No claim has this identity. |
not-the-holder refused | holder != input. | Not: Only the claim's holder releases it. |
withdrawn | otherwise | moves the Claim Queued → Withdrawn; emits Claim |
wrong-state refused | the Claim is in a state that does not allow it | Claim: The claim is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Events
| event | fields | emitted by |
|---|---|---|
ClaimExpired | claim_ ClaimId, pool_ PoolId | Expire |
ClaimGranted | claim_ ClaimId, pool_ PoolId, held_ timestamp | Grant |
ClaimKilled | claim_ ClaimId, pool_ PoolId | Kill |
ClaimQueued | claim_ ClaimId, pool_ PoolId, holder PartyId, time_ integer | Request |
ClaimReleased | claim_ ClaimId, pool_ PoolId | Release |
ClaimWaitExpired | claim_ ClaimId, pool_ PoolId | Expire |
ClaimWithdrawn | claim_ ClaimId | Withdraw |
PoolCreated | pool_ PoolId, kind PoolKind, capacity integer | Create |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Views
| view | rows | fields |
|---|---|---|
ClaimsClaims | each Claim | claim_ ClaimId, pool_ PoolId, holder PartyId, time_ integer, units integer, held_ optional timestamp, wait_ optional timestamp, queued_ timestamp, run_ optional RunId, step_ optional StepId, state State |
PoolsPools | each Pool | pool_ PoolId, name Name, kind PoolKind, capacity integer, held integer, free integer, state State |
QueueQueue of a pool | each Claim with pool_asked with pool_ PoolId | claim_ ClaimId, holder PartyId, time_ integer, queued_ timestamp |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Types
| type | is | values or fields |
|---|---|---|
PoolKindWhat a pool hands out: build slots, calls under a rate limit, cache entries, seats of a licence, or the places of a work queue whose claims are the items waiting to be taken. | one of | Build, Rate, Cache, Seats, Queue |
PoolOrderThe order a pool grants waiting claims in: the order they joined the queue (Fifo), or the claim's priority, highest first, then the order they joined (Priority). | one of | Fifo, Priority |
More columns: swipe horizontally, or focus the table and use the arrow keys.
KPIs
5 KPIs from the KPI catalogue. A gate must be zero for a variant of an architecture to count.
Quality
| KPI | unit | better | gate | status |
|---|---|---|---|---|
queue_wait_p50_secondsMedian time a claim waited in the queue. How: Seconds between ClaimQueued and ClaimGranted, median over a pool. | seconds | lower | – | simulated source: design |
queue_wait_p90_seconds90th percentile of the time a claim waited in the queue. How: Seconds between ClaimQueued and ClaimGranted, 90th percentile over a pool. | seconds | lower | – | simulated source: design |
pool_utilizationShare of pool slot-seconds that were held. How: Slot-seconds between ClaimGranted and ClaimReleased, ClaimExpired or ClaimKilled, divided by slot-seconds the pool offered, capacity drops included. | share | higher | – | simulated source: design |
jobs_killedClaims killed at their time limit. How: ClaimKilled events in the window. Each is a job that ran past its limit. | count | lower | – | simulated source: design |
slot_wait_shareShare of agent time spent waiting for a pool slot. How: Seconds agents wait between ClaimQueued and ClaimGranted, divided by instance seconds. | share | lower | – | simulated source: design |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Settings
The settings a part of this block carries in an architecture document. agenticspec sim check refuses any other setting (setting_unknown) and a value outside its type (setting_invalid), and a part that lacks a setting marked required in the default column; the contract copies a setting into the ports it narrows. The last rows of each table are the settings every part takes. What no setting here types (a file, a path, an audience, the use of a model) goes into the part's notes, a map with free keys and values that the check takes as written and nothing reads.
A part pool:
| setting | type | unit | default | contract | what |
|---|---|---|---|---|---|
kind | enum Pool: build_, rate_, cache, seats, queue | resource. | What the pool hands out. | ||
capacity | integer of at least 1 | slots | required | resource. | How many claims the pool holds at once; a claim over it waits in the queue until the pool grants it, in the pool's order. |
job_limit | duration of at least 1s | required unless kind is queue | resource. | How long one claim may hold a slot, the time limit of every claim on the pool; a claim held longer ends expired. A work queue (kind queue) may leave it out: the pool then sets no hold limit of its own. | |
order | enum Pool: fifo, priority | fifo | resource. | The order the pool grants waiting claims in: the order they joined the queue (fifo; a claim names no priority), or the claim's priority, highest first, then the order they joined (priority). | |
count | integer of at least 1 | 1 | How many copies of the part run. | ||
per | part | One copy of the part for each copy of the named part. | |||
notes | notes | Free notes on the part, a map with keys and values of any kind: what no setting of its block types. The check takes any map; the simulator, the search and the contract never read it. |
More columns: swipe horizontally, or focus the table and use the arrow keys.