@@ -808,7 +808,8 @@ Events are streamed to stdout as JSON lines during agent operation. Events do NO
|
||||
| Event | Description |
|
||||
|-------|-------------|
|
||||
| `agent_start` | Agent begins processing |
|
||||
| `agent_end` | Agent completes (includes all generated messages) |
|
||||
| `agent_end` | One low-level agent run completes (may still be followed by retry, compaction, or queued continuations) |
|
||||
| `agent_settled` | Agent run is fully settled; no automatic retry, compaction retry, or queued continuation remains |
|
||||
| `turn_start` | New turn begins |
|
||||
| `turn_end` | Turn completes (includes assistant message and tool results) |
|
||||
| `message_start` | Message begins |
|
||||
@@ -834,15 +835,24 @@ Emitted when the agent begins processing a prompt.
|
||||
|
||||
### agent_end
|
||||
|
||||
Emitted when the agent completes. Contains all messages generated during this run.
|
||||
Emitted when one low-level agent run completes. Contains all messages generated during this run. If `willRetry` is true, an automatic retry will follow.
|
||||
|
||||
```json
|
||||
{
|
||||
"type": "agent_end",
|
||||
"messages": [...]
|
||||
"messages": [...],
|
||||
"willRetry": false
|
||||
}
|
||||
```
|
||||
|
||||
### agent_settled
|
||||
|
||||
Emitted after the full session-level run settles. At this point Pi will not continue automatically through retry, compaction retry, or queued follow-up messages.
|
||||
|
||||
```json
|
||||
{"type": "agent_settled"}
|
||||
```
|
||||
|
||||
### turn_start / turn_end
|
||||
|
||||
A turn consists of one assistant response plus any resulting tool calls and results.
|
||||
|
||||
Reference in New Issue
Block a user