Skip to content
Agents API
Agents APIDevelopment preview

Architecture

Understand how your application, the managed runtime, and an environment work together.

On this pageThe piecesStart without an environmentAdd a managed environmentConfiguration and ownershipReceive progress and results

Your application submits work. Rebyte runs the agent loop and retains the Session. An optional Environment supplies compute and files. These responsibilities follow the Agents API's public architecture.

The pieces

ComponentResponsibility
HarnessCalls the model, executes tools or requests function results, and advances the Session's Turn. Rebyte provides this managed runtime.
EnvironmentRuns commands and holds working files. A Rebyte-managed Environment belongs to one Session.
Application serverAuthenticates requests, submits input, consumes events, and executes application-side function tools.
Your application
   │  input / function results
   ▼
Rebyte managed runtime ──────► Model
   │  │
   │  └─────────────────────► Service MCP servers
   ▼
Session environment
   ├── Commands and working files
   ├── Environment MCP servers
   └── Deliverables → immutable Artifacts

Events, Items, and Artifacts → Your application

Start without an environment

Choose environment: { type: 'none' } for tasks that need a model, service MCP connections, or application functions without a filesystem. Supply initial input when creating this kind of Session.

Your application still receives events and can continue the Session. There is no Sandbox to provision and no environment shell or working files.

Add a managed environment

Choose environment: { type: 'openai_hosted' } when the agent needs to run commands, install dependencies, or produce files. Against Rebyte, this provisions Rebyte compute.

Configure the Environment's files, packages, skills, setup commands, and network policy when you create the Session. Rebyte runs commands there; your application continues to handle any function tools.

Configuration and ownership

An Agent is reusable configuration. Creating a saved Agent does not provision compute. Creating a Session resolves that configuration and stores a snapshot, including explicit overrides.

Two Sessions created from the same Agent have independent conversation state and, when requested, separate Environments. Updating the saved Agent affects future Sessions. Existing Sessions keep their resolved configuration.

Working files persist across Turns and pause/resume of that Session's Sandbox. Completed deliverables are copied into immutable Artifacts. Deleting a saved Agent does not delete existing Sessions; deleting a Session removes its own environment and Artifacts.

Receive progress and results

Use live streaming for progress and the Items, Turns, and Artifacts endpoints for durable results. The application must return results for function calls before the waiting Turn can continue.

Rebyte provides one managed Sandbox for compute — there is no self-hosted or customer-supplied alternative. Webhooks, Multi-agent execution, and automatic compaction are not implemented. This architecture does not imply use of OpenAI's managed Codex harness.

Protocol referenceOpenAI Agents API ↗