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

# streamAgentStatus

> Org-wide agent run transitions.

```typescript theme={null}
streaming.agents.streamAgentStatus({}, options?) → AsyncIterable<AgentStatusUpdate>
```

One update per agent run transition, for every agent visible to the API key.
On connect, an update is emitted immediately for each agent currently running.

## Example

```typescript theme={null}
import { createStreamingClient } from "@textql/sdk/streaming";
import { AgentRunStatus } from "@textql/sdk/generated/connect/public/agent_pb.js";

const streaming = createStreamingClient({ apiKey });

for await (const update of streaming.agents.streamAgentStatus({})) {
  if (update.status === AgentRunStatus.RUNNING) {
    setRunning(update.agentId, update.summary); // live progress summary
  }
  if (update.status === AgentRunStatus.DONE) {
    linkResult(update.agentId, update.chatId); // the run's chat
  }
}
```

## Updates

| Field                      | Type             | Notes                                       |
| -------------------------- | ---------------- | ------------------------------------------- |
| `agentId`                  | `string`         |                                             |
| `status`                   | `AgentRunStatus` | `RUNNING` / `DONE` / `FAILED` / `CANCELLED` |
| `summary`                  | `string`         | progress summary while running              |
| `chatId`                   | `string`         | the run's chat, once created                |
| `postId`, `mentionThingId` | `string`         | set for mention-triggered runs              |

This stream has **no heartbeat** — a quiet org sends nothing. Wrap long-lived
consumers in a reconnect loop.
