Skip to content

Commit 95885cd

Browse files
Update Activity Messages section in messages.mdx
Clarified the purpose and characteristics of Activity Messages in the documentation.
1 parent c51d92f commit 95885cd

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/concepts/messages.mdx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ interface ToolMessage {
112112

113113
### Activity Messages
114114

115-
Structured progress updates that appear between chat messages:
115+
Structured UI messages that exist only on the frontend.
116+
 Used for progress, status, or any custom visual element that shouldn’t be sent to the model:
116117

117118
```typescript
118119
interface ActivityMessage {
@@ -122,11 +123,13 @@ interface ActivityMessage {
122123
content: Record<string, any> // Structured payload rendered by the frontend
123124
}
124125
```
126+
Key points
127+
- Emitted via `ACTIVITY_SNAPSHOT` and `ACTIVITY_DELTA` to support live, updateable UI (checklists, steps, search-in-progress, etc.).
128+
- **Frontend-only:** never forwarded to the agent, so no filtering and no LLM confusion.
129+
- **Customizable:** define your own `activityType` and `content` and render a matching UI component.
130+
- **Streamable:** can be updated over time for long-running operations.
131+
- Helps persist/restore custom events by turning them into durable message objects.
125132

126-
Activity messages are populated by `ACTIVITY_SNAPSHOT` and `ACTIVITY_DELTA`
127-
events. The structured `content` object gives frontends everything they need to
128-
render bespoke status views, such as checklists, workflow progress, or search
129-
results in flight.
130133

131134
### Developer Messages
132135

0 commit comments

Comments
 (0)