> ## 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 PHP Agent SDK classes and methods.

| API                                       | Purpose                                      |
| ----------------------------------------- | -------------------------------------------- |
| `AgentSdk::createAgent(...)`              | Define an agent                              |
| `AgentSdk::defineTool(...)`               | Define a local or manual tool                |
| `AgentSdk::createGatewayAgentClient(...)` | Connect model turns to Phaseo                |
| `Agent::run(...)`                         | Run to a terminal or paused state            |
| `Agent::stream(...)`                      | Run with replayable iterables                |
| `Agent::continueRun(...)`                 | Continue saved or paused state               |
| `Agent::continueRunById(...)`             | Reload and continue through a state accessor |
| `AgentStreamResult::textStream()`         | Read text deltas                             |
| `AgentStreamResult::fullStream()`         | Read all events                              |

Important classes include `AgentDefinition`, `RunResult`, `RunRecord`, `Tool`, `ToolDecision`, `ToolOutput`, `RuntimeContext`, `StateAccessor`, and `GatewayAgentClientOptions`.

## Related

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