> ## 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 C# Agent SDK types 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 async streams |
| `Agent.ContinueRun(...)`                 | Continue saved or paused state    |
| `AgentStreamResult.GetResult()`          | Await the completed run           |
| `AgentStreamResult.TextStream()`         | Read text deltas                  |
| `AgentStreamResult.FullStream()`         | Read all lifecycle events         |
| `AgentStreamResult.Cancel()`             | Cancel the active run             |

Important records and interfaces include `AgentDefinition`, `RunOptions`, `RunResult`, `RunRecord`, `RunStep`, `Tool`, `ToolDecision`, `ToolOutput`, `RuntimeContext`, `IStateAccessor`, `ModelRetryConfig`, and `ToolExecutionConfig`.

## Related

* [Build your first agent](./agent-sdk)
* [Errors and gateway details](./agent-sdk-observability)
