> ## Documentation Index
> Fetch the complete documentation index at: https://phaseo.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> Reference the main Ruby Agent SDK classes and methods.

| API                                               | Purpose                           |
| ------------------------------------------------- | --------------------------------- |
| `PhaseoAgentSdk.create_agent(...)`                | Define an agent                   |
| `PhaseoAgentSdk.define_tool(...)`                 | Define a local or manual tool     |
| `PhaseoAgentSdk.create_gateway_agent_client(...)` | Connect model turns to Phaseo     |
| `Agent#run`                                       | Run to a terminal or paused state |
| `Agent#stream`                                    | Run with replayable sequences     |
| `Agent#continue_run`                              | Continue saved or paused state    |
| `StreamResult#result`                             | Read the completed run            |
| `StreamResult#text_stream`                        | Read text deltas                  |
| `StreamResult#full_stream`                        | Read all events                   |

Important classes and values include `Tool`, `ToolDecision`, `ToolOutput`, `RuntimeContext`, `RunResult`, retry configuration, tool execution configuration, and state accessors.

## Related

* [Build your first agent](./agent-sdk)
* [Observability and DevTools](./agent-sdk-observability)
