▾
import { sendTraceMessage, sendUXSuggestion } from "@arcgis/ai-components/orchestrator/signals.js";Functions
sendTraceMessage
Sends a progress or diagnostic message from agent execution to the assistant log. Use it to describe actions taken or report execution status. The assistant displays the message when its logEnabled property is enabled.
- Signature
-
sendTraceMessage (data: TraceEventData, config?: RunnableConfig): Promise<void>
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| data | Trace event data to display in the chat log, including the message, agent, and tool if applicable. | | |
| config | RunnableConfig | Optional runnable configuration as defined in LangChain, which can include additional context or variables to associate with the trace message. | |
sendUXSuggestion
Sends a structured UI suggestion from agent execution to the assistant component. Use it to suggest follow-up prompts or slot
custom content, such as a web component, to complement an agent's response. The assistant renders the built-in text and suggested-prompts types; custom block types
need application-provided rendering.
- Signature
-
sendUXSuggestion (suggestion: UXSuggestion, config?: RunnableConfig): Promise<void>
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| suggestion | The UX suggestion payload. | | |
| config | RunnableConfig | Runnable LangChain config to pass through to the dispatcher. | |
Type definitions
TraceEventData
Data for a progress or diagnostic message emitted during agent execution.
text
- Type
- string
Text supplied by the agent or tool for the trace message, typically a progress update or diagnostic detail.
UXSuggestion
A structured response block emitted by an agent that provides a suggestion to render a component in the assistant component. The application developer has the option to render the suggested content by listening to the assistant's arcgisSlottableRequest event.
type
- Type
- string
The suggested UI type, which determines how the application can interpret and render the data. This type can help establish a contract between the application and agents on how to render custom content in agent responses.