Create Session
Create Session through the OMA API.
?beta=true.Authorizations
OMA workspace API key.
Query Parameters
Selects the beta API contract for this endpoint. Must be true.
true Body
Request parameters for creating a session.
Agent identifier. Accepts the agent ID string, which pins the latest version for the session, or an agent object with both id and version specified.
"agent_011CZkYpogX7uDKUyvBTophP"
ID of the environment defining the container configuration for this session.
1 - 128"env_011CZkZ9X2dpNyB7HsEFoRfW"
Human-readable session title.
500"Order #1234 inquiry"
Arbitrary key-value metadata attached to the session. Maximum 16 pairs, keys up to 64 chars, values up to 512 chars.
Resources (e.g. repositories, files) to mount into the session's container.
Mount a GitHub repository into the session's container.
- Option 1
- Option 2
- Option 3
Vault IDs for stored credentials the agent can use during the session.
Initial events to send to the session at creation, processed in order. Supports user.message and user.define_outcome events. Maximum 50 events.
Parameters for sending a user message to the session.
- Option 1
- Option 2
Enforced spend ceiling for the session. Omit to create an uncapped session. Every model the session can run — the agent's model and each callable agent's model — must have a public list price, or the request is rejected with reason model_not_budgetable.
Response
Successful response (OK)
A Managed Agents session.
session "session"
"sesn_011CZkZAtmR3yMPDzynEDxu7"
SessionStatus enum
rescheduling, running, idle, terminated "idle"
A timestamp in RFC 3339 format
"2026-03-15T10:00:00Z"
A timestamp in RFC 3339 format
"2026-03-15T10:00:00Z"
"env_011CZkZ9X2dpNyB7HsEFoRfW"
"Order #1234 inquiry"
Resolved agent definition for a session. Snapshot of the agent at session creation time.
- Option 1
- Option 2
- Option 3
Vault IDs attached to the session at creation. Empty when no vaults were supplied.
Per-outcome evaluation state. One entry per define_outcome event sent to the session.
Cumulative token usage for the session.
Timing statistics for the session.
When the session was archived. Null if not archived.
null
The session's enforced spend ceiling, or null when no budget is set.
null
Deployment ID when the session was created from a deployment reference. Null otherwise.