Message Types
Tags can be added at three levels:| Type | Description |
|---|---|
| User | Used to emit user-specific data. Applies across all sessions for a user. |
| Session | Used to emit session related data. Applies to a single session. |
| Message | Used to emit message-level fields. Applies to an individual message. |
Adding Custom Tags
Custom tags can be defined and emitted from the following:- Code Tools
- Workflow Tool(Script Nodes)
- Agent Preprocessor
- Response Processor
- Each tag type is declared as a separate statement (user, session, and message-level tags) and cannot be combined in a single statement.
- One or more tags of the same type can be updated using a single statement.
- Tag name cannot be empty.
- Tag value can be a static value or a dynamic variable like memory, environment, content or context variable. Variables are resolved at runtime during emitting.
Runtime Behavior
- Variable values for Tags are resolved before inclusion.
- Tags from different sources are aggregated and added to the response payload.
- If the same tag is updated at a different time during execution, the latest value of the tag is retained, and other values are overwritten.
- Tags from multiple surfaces within a request are aggregated and emitted as a single tags object in the response payload.
- Tags are emitted only at the end of the request execution.
Execute API Response Payload
Tags are appended to the agent response payload in Execute API.- Only tag types with values are included.
- Empty arrays are omitted
Using Tags in AI for Service
Custom tags are used for analytics and reporting in AI for Service. They can be used for:- Custom dashboards
- Filtering and segmentation
- Analytics and reporting