Skip to main content

Prepare the runtime

The independent package is not yet on PyPI. Follow the source installation instructions.

Quickstart

What it ships

  • create_agent(...)
  • define_tool(...)
  • create_gateway_agent_client(...)
  • retries, concurrent tools, timeouts, and lifecycle events
  • human-review pauses with continue_run(...)
  • serializable state and Phaseo Devtools capture

Advanced runtime

Python supports callable schemas and approvals, HITL and manual tools, progress, recoverable errors, replayable streams, stop helpers, dynamic turns, persisted next-turn overrides, normalized usage/cost, and application-owned state accessors.

Streaming and cancellation

agent.stream(...) and agent.continue_stream(...) use the gateway’s Responses SSE stream. Consume text_stream(), reasoning_stream(), item_stream(), tool_stream(), or full_stream(); call cancel() to close the active request. Completed steps retain request IDs, provider metadata, finish reasons, warnings, usage, and cost.
Last modified on July 26, 2026