The runtime model
Your agent function describes the next step
The default export is a synchronous function. It reads the current input, selects resources with hooks, and returns instructions:The harness performs the loop
OpenComputer owns the agent harness. For each step it:- renders the agent function;
- builds a model request from the returned instructions and selected resources;
- streams the model response;
- validates and executes requested tools;
- records the resulting events; and
- renders again when another model step is required.
A session makes execution durable
A session stores the conversation and runtime events across turns. Clients can disconnect, reconnect, and continue without reconstructing the agent’s history themselves. Every session remains pinned to the immutable deployment it started with. A new development sync or production deployment affects new sessions, not code already running inside an existing session.Capabilities are selected, not executed, during render
Use the narrowest capability that fits the work:
The model decides whether to request an available tool. The harness remains
responsible for validating the request, executing it, and recording the
result. See Agent capabilities for the full comparison.
Deployment registers; rendering selects
A deployment packages the agents and resources that are allowed to exist. A render selects which of those resources are available for one model step. Development and Production point to different deployments and keep operational configuration—such as secrets, schedule state, webhook tokens, and channel bindings—separate. Read Deployments and environments for that lifecycle.Remember this
The agent function decides what the agent is for this step.
The harness decides how to run that step.
The session remembers what happened.
Explore each concept
Reactive agents
Define instructions and select resources with ordinary TypeScript.
Sessions and turns
Understand durable conversations and runtime events.
Capabilities
Choose between tools, MCP servers, skills, and subagents.
Schedules
Start recurring sessions from code-defined cron schedules.
Webhooks
Start sessions from authenticated external services.
Channels and outboxes
Receive conversational events and publish durable notifications.