Skip to content
Agents API
Agents APIDevelopment preview

Configuring Agents

Choose a model, instructions, and tools, then reuse that configuration across sessions.

On this pageSave an AgentAgent settingsSession overridesEnvironment settingsManage saved Agents

Define an Agent inline in a Session request, or save one and reuse its ID. The model field takes a supported Rebyte model ID.

Save an Agent

Using the client from the quickstart:

const agent = await client.beta.agents.create({
  name: 'Research assistant',
  model: 'glm-5.3',
  instructions: 'Explain your findings clearly. Save deliverables to /workspace/outputs.',
  metadata: { project: 'research' },
});

const session = await client.beta.agents.sessions.create({
  agent_id: agent.id,
  environment: { type: 'openai_hosted' },
});

Agent settings

SettingUse
modelSelect the model used for execution.
instructionsDefine the Agent's operating instructions.
toolsDeclare function tools and MCP connections.
reasoningConfigure reasoning options supported by the selected model adapter.
textConfigure output format and verbosity where supported.
service_tierSelect a supported provider service tier.
metadataStore application labels on a saved Agent or Session.

Generation settings depend on the selected model's adapter. Unsupported combinations return an error; service_tier: 'fast' and enabled Multi-agent execution are currently rejected.

Session overrides

Pass agent alongside agent_id to override selected fields for a new Session:

const session = await client.beta.agents.sessions.create({
  agent_id: agent.id,
  agent: { instructions: 'Review only the supplied document.', tools: [] },
  environment: { type: 'openai_hosted' },
});

An explicitly supplied object or array replaces that entire field. In this example, tools: [] removes the saved tool list for this Session. Later changes to the saved Agent do not alter existing Sessions.

Environment settings

Compute configuration belongs to the Session's environment: packages, files, network policy, setup commands, and inline skills. See managed sandboxes.

MCP credentials also belong to Session configuration or Vaults, not a reusable Agent definition. See MCP connections and Vaults.

Manage saved Agents

The Agents collection supports create, list, retrieve, update, and delete. Raw HTTP uses /v1/agents and /v1/agents/{agent_id} with OpenAI-Beta: agents=v1. Deleting a saved Agent leaves its existing Sessions intact.

Protocol referenceOpenAI Agents API ↗