Kernel Runtime
How the local runtime hosts tenants, agents, ticks, policies, and gateways.
Kernel Runtime
The Splendor runtime hosts tenant contexts, agent runtime contexts, schedulers, policy callbacks, the Action Gateway, state graph, trace store, replay, and local adapter boundaries.
Responsibilities
- Create and track tenant, agent, run, tick, action, state, and trace identity.
- Invoke perceptors and policies for each tick.
- Evaluate constraints before actions reach the gateway.
- Run verifier chains before adapters execute.
- Enforce quotas and permissions at tenant and agent scope.
- Commit explicit state nodes and append ordered trace events.
- Provide inspect-only replay without executing adapters.
Local runtime contexts
A tenant context contains allowed actions, adapters, permissions, quotas, data scope, and policy bindings. An agent context belongs to a tenant and owns its state head, trace stream, inbox/outbox metadata, and current run scope.
Policy and adapter boundary
Policy code receives state and percepts, then proposes actions. Adapters execute only after the runtime has routed the action through the gateway and verifier chain.
Scheduler
The scheduler advances agent ticks, applies configured tick budgets, resets per-tick quota ledgers, and stops or pauses safely when runtime preconditions fail.
Safe failure behavior
- Missing permission, unavailable verifier, exceeded quota, invalid identity, expired work order, trace persistence failure, or state commit failure must not become an implicit allow.
- Denied actions do not reach adapters.
- State commit failure prevents the next tick from advancing.
- Replay does not invoke perceptors, policies, gateways, verifiers, or adapters.
For a runnable path, see Getting Started and the
examples/local-basic-loop example.