> ## 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.

# ストリーミング

> 再走査可能な非同期列挙子で、エージェントのテキストとライフサイクルイベントをストリーミングします。

`Agent.Stream(...)`は`Run(...)`と同じステートマシンを実行し、`AgentStreamResult`を返します。

```csharp theme={null}
var stream = agent.Stream(new RunOptions { Input = input, Client = client });

await foreach (var delta in stream.TextStream())
{
    Console.Write(delta);
}

var completed = await stream.GetResult();
```

モデル、ツール、ステップ、実行のイベントを取得するには`FullStream()`を使います。キャプチャされた非同期シーケンスは、複数のコンシューマーから独立して再走査できます。実行中の処理を停止する場合は`Cancel()`を呼び出します。キャンセルはモデルリクエストとローカルツールにも伝播します。

## 関連項目

* [ツール](./agent-sdk-tools.mdx)
* [オブザーバビリティとDevTools](./agent-sdk-observability.mdx)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.