Layer 8 · place
runtime
What runs a workload. A runtime says which kinds of workload it runs and the least isolation it runs them under. A workload is a package by digest, a shape and the sandbox it runs in; an instance is one running copy, started, observed and stopped; a start while one is Pending or Running joins it. A Model workload serves one endpoint of agentic.model; its instance's state is the endpoint's phase (Pending starting, Running ready, Exited stopped), and its start may cost money, booked against a budget. A compute cloud and an agent runtime each play this block; neither is described here.
Depends on
- sandbox · layer 8 · 6 references
- authority · layer 6 · 5 references
- model · layer 2 · 5 references
- shared · layer 0 · 7 references
Used by
- deployment · layer 9 · 18 references
Entities
Instance
One running copy of a workload.
Identified by instance_id (InstanceId).
| field | type | meaning |
|---|---|---|
workload_id | WorkloadId | |
exit_code | optional integer | |
reason | optional string | Why the instance failed, as the runtime reports it. |
budget_id | optional BudgetId | The budget the start cost was booked against (agentic.authority RecordSpend) before the start. A booking refused over the limit (OverLimit) is a start refused at a cap. A start of a workload with an instance Pending or Running joins that instance (InstanceJoined) and starts none, so a joined start books nothing. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
workloadreferences Workload (one, byworkload_id)budgetreferences Budget of authority (one, bybudget_id)
Lifecycle of Instance
Exited, Failed.Runtime
One place that runs workloads of the kinds it names.
Identified by runtime_id (RuntimeId).
| field | type |
|---|---|
name | Name |
kinds | list of WorkloadKind |
min_isolation | IsolationLevel |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Lifecycle: one state, Available; a recorded Runtime does not change.
Workload
A package placed on one runtime, with its shape and its sandbox.
Identified by workload_id (WorkloadId).
| field | type | meaning |
|---|---|---|
runtime_id | RuntimeId | |
kind | WorkloadKind | |
package | PackageDigest | |
shape | Shape | |
sandbox_id | SandboxId | |
endpoint_id | optional EndpointId | The endpoint a Model workload serves. |
start_cost | optional Money | What one start of an instance costs before it does any work, as a rented model server does. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Relations:
runtimereferences Runtime (one, byruntime_id)sandboxreferences Sandbox of sandbox (one, bysandbox_id)endpointreferences Endpoint of model (one, byendpoint_id)
Lifecycle: one state, Defined; a recorded Workload does not change.
Commands
DefineWorkload
Define a workload. Place a package on a runtime, with a shape and a sandbox.
Called by: Operator.
| field | type |
|---|---|
runtime_id | RuntimeId |
kind | WorkloadKind |
package | PackageDigest |
shape | Shape |
sandbox_id | SandboxId |
endpoint_id | optional EndpointId |
start_cost | optional Money |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown-runtime refused | no Runtime for runtime_ | Unknown: No runtime has this identity. |
unknown-sandbox refused | no Sandbox for sandbox_ | Unknown: No sandbox has this identity. |
kind-not-run refused | the Runtime of runtime_ has not (some k in kinds with k == input. | Kind: The runtime does not run workloads of this kind. |
sandbox-retired refused | the Sandbox of sandbox_ has state == Retired | Sandbox: The sandbox is retired; nothing is placed in it. |
isolation-none-too-low refused | the Sandbox of sandbox_ has isolation == None | Isolation: The sandbox isolates less than the runtime's minimum. |
isolation-process-too-low refused | the Sandbox of sandbox_ has isolation == Process | Isolation: The sandbox isolates less than the runtime's minimum. |
isolation-container-too-low refused | the Sandbox of sandbox_ has isolation == Container | Isolation: The sandbox isolates less than the runtime's minimum. |
isolation-userkernel-too-low refused | the Sandbox of sandbox_ has isolation == User | Isolation: The sandbox isolates less than the runtime's minimum. |
defined | otherwise | creates a Workload in Defined; emits Workload |
More columns: swipe horizontally, or focus the table and use the arrow keys.
RegisterRuntime
Register a runtime.
Called by: Operator.
| field | type |
|---|---|
name | Name |
kinds | list of WorkloadKind |
min_isolation | IsolationLevel |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
no-kinds refused | kinds. | No: A runtime runs at least one kind of workload. |
registered | otherwise | creates a Runtime in Available; emits Runtime |
More columns: swipe horizontally, or focus the table and use the arrow keys.
ReportExited
Report an instance exited.
Called by: Host.
| field | type |
|---|---|
instance_id | InstanceId |
exit_code | integer |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Instance | Unknown: No instance has this identity. |
exited | otherwise | moves the Instance Running → Exited; emits Instance |
wrong-state refused | the Instance is in a state that does not allow it | Instance: The instance is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
ReportFailed
Report an instance failed.
Called by: Host.
| field | type |
|---|---|
instance_id | InstanceId |
reason | string |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Instance | Unknown: No instance has this identity. |
failed | otherwise | moves the Instance Pending, Running → Failed; emits Instance |
wrong-state refused | the Instance is in a state that does not allow it | Instance: The instance is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
ReportRunning
Report an instance running.
Called by: Host.
| field | type |
|---|---|
instance_id | InstanceId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Instance | Unknown: No instance has this identity. |
running | otherwise | moves the Instance Pending → Running; emits Instance |
wrong-state refused | the Instance is in a state that does not allow it | Instance: The instance is not in a state this command acts from. |
More columns: swipe horizontally, or focus the table and use the arrow keys.
StartInstance
Start an instance. Start an instance of a workload, or join the one already Pending or Running: a workload has at most one instance that is not Exited or Failed.
Called by: Operator.
| field | type |
|---|---|
workload_id | WorkloadId |
budget_id | optional BudgetId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown-workload refused | no Workload for workload_ | Unknown: No workload has this identity. |
joined | a Instance with workload_ | emits Instance |
started | otherwise | creates a Instance in Pending; emits Instance |
More columns: swipe horizontally, or focus the table and use the arrow keys.
StopInstance
Stop an instance.
Called by: Operator.
| field | type |
|---|---|
instance_id | InstanceId |
More columns: swipe horizontally, or focus the table and use the arrow keys.
| outcome | when | result |
|---|---|---|
unknown refused | no such Instance | Unknown: No instance has this identity. |
stopped | otherwise | moves the Instance Pending, Running → Exited; emits Instance |
wrong-state refused | the Instance is in a state that does not allow it | Instance: The instance 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 |
|---|---|---|
InstanceExited | instance_ InstanceId, exit_ integer | Report |
InstanceFailed | instance_ InstanceId, reason string | Report |
InstanceJoined | instance_ InstanceId, workload_ WorkloadId | Start |
InstanceRunning | instance_ InstanceId | Report |
InstanceStarted | instance_ InstanceId, workload_ WorkloadId, budget_ optional BudgetId | Start |
InstanceStopped | instance_ InstanceId | Stop |
RuntimeRegistered | runtime_ RuntimeId, name Name, min_ IsolationLevel | Register |
WorkloadDefined | workload_ WorkloadId, runtime_ RuntimeId, kind WorkloadKind, package PackageDigest, sandbox_ SandboxId, endpoint_ optional EndpointId | Define |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Views
| view | rows | fields |
|---|---|---|
InstancesInstances | each Instance | instance_ InstanceId, workload_ WorkloadId, exit_ optional integer, reason optional string, budget_ optional BudgetId, state State |
RuntimesRuntimes | each Runtime | runtime_ RuntimeId, name Name, kinds list of WorkloadKind, min_ IsolationLevel, state State |
WorkloadsWorkloads | each Workload | workload_ WorkloadId, runtime_ RuntimeId, kind WorkloadKind, package PackageDigest, shape Shape, sandbox_ SandboxId, endpoint_ optional EndpointId, start_ optional Money, state State |
More columns: swipe horizontally, or focus the table and use the arrow keys.
Types
| type | is | values or fields |
|---|---|---|
PackageDigestThe content digest of the package a workload runs. | an identifier or value | string |
Shape | a record | cpu_ integer, memory_ integer |
WorkloadKind | one of | Agent, Service, Job, Model, Snippet |
More columns: swipe horizontally, or focus the table and use the arrow keys.
KPIs
3 KPIs from the KPI catalogue. A gate must be zero for a variant of an architecture to count.
Quality
| KPI | unit | better | gate | status |
|---|---|---|---|---|
instance_failed_shareShare of started instances that failed. How: InstanceFailed events divided by InstanceStarted events, per workload. | share | lower | – | planned source: design |
instance_start_p90_seconds90th percentile of the time from start to running. How: Seconds between InstanceStarted and InstanceRunning of one instance, 90th percentile per workload. | seconds | lower | – | planned source: design |
worker_busy_shareShare of instance time spent doing work. How: Busy seconds of instances divided by instance seconds between InstanceRunning and exit. Low means idle workers, whatever the cause. | share | higher | – | 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 runtime:
| setting | type | unit | default | contract | what |
|---|---|---|---|---|---|
kind | string | every port | What kind of runtime the part is. | ||
role | string | The role of the behaviour profile the runtime's runs play. | |||
durable_state | boolean | false | Whether the runtime keeps durable state of its own, records it writes and reads back after a restart; in a deployment bundle its unit claims an exclusive volume for it, <part>-. | ||
state_writers | string list | The programs outside the runtime that also write its durable state, by name; only beside durable_. The state stays the runtime's one volume, with no workspace lease or proposal port, and the bundle's claim of it names these writers. | |||
state_readers | string list | The programs outside the runtime that read its durable state, by name; only beside durable_. The bundle's claim of the state volume names these readers and grants them nothing. | |||
model_share | shares | The share of the runtime's model calls each model part it reaches gets; without it, equal shares. | |||
per_day_usd | number of at least 0 | USD | The spend cap of the runtime's runs per calendar day; without it, no cap. | ||
per_month_usd | number of at least 0 | USD | The spend cap of the runtime's runs per calendar month; without it, no cap. | ||
per_run_usd | number of at least 0 | USD | The spend cap of one run the runtime executes: a run that has spent it makes no further model call and ends; without it, no cap. | ||
route | enum: stop, ask, notify | stop | What happens at a spend cap: further spending stops (stop), a question goes to the principal the runtime acts for (ask), or spending goes on and a notification is sent (notify). | ||
process | part | The process part whose program the runtime's runs follow: a run takes the process's steps, of the kinds its agent_ and person_ name, with the process's role when it names one, else the runtime's. | |||
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.