Run your Agent
An Agent is configuration; a Turn is one metered execution of that configuration. A Session is stored conversation state used by some Turns, not a requirement for every execution mode.
Choose an execution mode
Sessions and Turns
Keep a stored conversation and resume it across Turns.
Generation and streaming
Choose stateful chat or stateless text and consume its stream.
Structured output
Generate schema-constrained JSON without creating a Session.
Tool approvals
Pause a sensitive Tool call for a durable human decision.
Tasks and schedules
Run durable background work on demand or on a schedule.
What every Turn shares
Every Turn resolves an Agent and either its latest Version or a configured Version Pin. The platform applies the ordinary quota gate, runs the model and Tool loop, records the resolved Version and Attribution in usage, and settles usage after success, failure, or cancellation.
Failure does not make every mode look alike: a failed interactive Turn does not change its Session transcript, while stateless Turns have no transcript and Task runs keep their own lifecycle. Follow the mode page for its persistence and recovery behavior.
Related guides
- Backend and frontend integration for synchronous application flows.
- Automation and operations for background work and schedules.