Configuring Agents
Choose a model, instructions, and tools, then reuse that configuration across sessions.
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
| Setting | Use |
|---|---|
model | Select the model used for execution. |
instructions | Define the Agent's operating instructions. |
tools | Declare function tools and MCP connections. |
reasoning | Configure reasoning options supported by the selected model adapter. |
text | Configure output format and verbosity where supported. |
service_tier | Select a supported provider service tier. |
metadata | Store 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.