Optional
beforeOptional callback function executed before navigation begins. Allows for custom pre-navigation logic and validation before changing to the default agent.
Optional
executeOptional message or function to execute when no navigation is needed. If a function, it receives the client ID and default agent name, returning a string or promise of a string.
Optional
flushOptional message or function to emit after flushing the session. If a function, it receives the client ID and default agent name, returning a string or promise of a string.
Optional
lastOptional function to transform the last user message for navigation context. Customizes how the previous message is processed when navigating to the triage agent.
Optional
toolOptional message or function for tool output when navigation to the default agent occurs. If a function, it receives the client ID and default agent name, returning a string or promise of a string. Defaults to a message indicating successful navigation.
Optional
toolOptional message or function for tool output when already on the default agent. If a function, it receives the client ID and default agent name, returning a string or promise of a string. Defaults to a message indicating no navigation was needed.
Configuration parameters for creating a navigation handler to a triage agent. Defines optional messages or functions to handle flush, execution, and tool output scenarios during navigation.
INavigateToTriageParams
Example
Example