Skip to main content

Prepare the runtime

The Agent SDK gem is not yet on RubyGems. Follow the source installation instructions.

Quickstart

What it ships

  • PhaseoAgentSdk.create_agent(...)
  • PhaseoAgentSdk.define_tool(...)
  • PhaseoAgentSdk.create_gateway_agent_client(...)
  • a bounded tool loop over the Phaseo responses API

Advanced runtime

Ruby supports validation and approval callables, HITL and manual tools, progress, recoverable errors, replayable enumerators, stop helpers, dynamic turns, persisted next-turn parameters, normalized usage/cost, and duck-typed state accessors.

Streaming and cancellation

Agent#stream(...) and Agent#continue_stream(...) consume the gateway’s Responses SSE stream on a worker thread. Use text_stream, reasoning_stream, item_stream, or full_stream; call cancel to stop the worker and close the HTTP stream. Completed steps retain request IDs, provider metadata, finish reasons, warnings, usage, and cost.
Last modified on July 26, 2026