Agent Runtime
This page is the canonical explanation of how the openboaAgent runtime operates.
Use Agent for the meaning of the layer.
Use Agent Capabilities for the capability model.
Use Agent Resilience when the main question is recovery behavior under pause, retry, requeue, or replay.
Use this page when you want the runtime contract: what exists, how a wake runs, what gets persisted, and how durable improvement works.
Runtime contract in one sentence
The openboa Agent runtime is a session-first system in which:- a durable
Sessionis the running object - new session events act as the public ingress surface
- a worker consumes pending or due activations for a session
wake(sessionId)remains the low-level execution step for one boundedHarnessloop- the run uses mounted resources, tools, retrieval, shell, and outcome posture
- the run writes new events and runtime artifacts back into the same durable session
The one-wake flow
This is the smallest useful picture of the runtime. The most important consequences are:- the prompt is disposable
- the session is durable
- public callers append events rather than constructing ad-hoc wake payloads
Core runtime objects
AgentDefinition
The durable definition of one worker identity.
It answers:
- which provider backend to use
- which model to prefer
- which bootstrap substrate belongs to this Agent
Environment
The reusable execution contract.
It answers:
- what sandbox exists
- what resources are mounted
- what permission and vault posture apply
Session
The primary running object.
A session owns:
- its
sessionId - one
agentId - one
environmentId - one append-only event log
- stop reason and status
- mounted resources
- runtime artifacts
- pending action state
- optional parent-child lineage
- active outcome posture
SessionEvent
The append-only event stream for a session.
That stream is the durable log the runtime interrogates before each wake.
Harness
The bounded brain loop.
For one wake it:
- loads the session
- reads pending work
- assembles bounded context
- calls the provider
- interprets the loop directive
- appends new events
- updates runtime artifacts
Sandbox
The bounded execution hand behind filesystem and shell work.
ToolDefinition
The stable callable surface for managed, MCP, and custom tools.
Runtime objects versus prompt view
The session is not the model context window. This is why the runtime can:- survive context pressure
- reopen prior truth
- keep cross-session reuse separate from prompt compaction
Status and stop model
Current session statuses:idlerunningreschedulingterminated
idlerequires_actionreschedulingterminated
requires_action is the pause seam for:
- custom tool results
- managed tool confirmations
Default storage layout
One session currently lives under:session.json- durable session state
events.jsonl- append-only event journal
runtime/- continuity and execution artifacts
wake-queue.jsonl- bounded proactive revisits
Runtime artifacts
The runtime also materializes a filesystem-readable view of the current session under:- environment posture
- mounted resources
- tools catalog
- vault catalog
- context budget
- outcome posture
- permission posture
- shell state and shell history
- last shell output
- event feed and traces
- session relations
- the Agent should be able to reread important runtime facts from the filesystem
- not every important runtime fact should exist only in prompt text
Mount model
The current runtime uses a shared-substrate plus session-hand model. This gives the Agent:- one writable session-local execution hand
- one durable shared substrate
- one session-local runtime surface
- one agent-level learning surface
- protected vault mounts
Proactive execution
The runtime already supports bounded proactive continuation. That means one run may request a later revisit of the same session. Why it exists:- many tasks need waiting, checking back, or following up
- the Agent should not need a fresh external nudge for every bounded next step
- unlimited hidden background autonomy
- a second scheduling system outside the session model
Learning loop
The runtime also supports durable learning capture. Current learning kinds:lessoncorrectionerror
- session-local continuity is not enough for durable improvement
- the Agent needs a reusable memory surface across sessions
Retrieval and reread
Cross-session reuse does not depend on one irreversible summary. Instead the runtime uses:- cheap deterministic candidate retrieval
- bounded reread of prior truth
- retrieval candidates are hints
- reopened session truth is truth
Outcome and promotion loop
Durable shared improvement is not implicit. This is why the runtime separates:- current session work
- current task posture
- durable promotion
Common operating loop
Typical builder flow:- create a session
- send a message or define an outcome
- wake the session
- inspect status, traces, context, shell, or memory
- work under
/workspace - promote durable shared change only when outcome and permission posture say it is safe
What this page does not try to cover
This page explains the runtime contract. It does not try to be:- the file-by-file steering guide
- the full internal architecture page
- the exhaustive tool catalog
- Agent Workspace
- Agent Memory
- Agent Context
- Agent Resilience
- Agent Bootstrap
- Agent Architecture
- Agent Tools
Reading order
If you want to keep going:- read Agent Capabilities if you want the runtime logic explained capability-by-capability
- read Agent Memory, Agent Context, and Agent Resilience for the concrete runtime surfaces
- read Agent Architecture for the internal structure
- read Agent Sessions for session lifecycle and truth
- read Agent Sandbox and Agent Tools for the execution surface