Skip to content

TriageCapability

Exposes triage routing as tools: one route_to_<agentId> tool per route. The LLM selects the appropriate route; processToolResult converts the tool result to a handoff action for the host.

new TriageCapability(routes, defaultAgent?): TriageCapability;
Parameter Type

routes

AgentRoute[]

defaultAgent?

string

TriageCapability

getPromptSections(): CapabilityPromptSection[];

What does this capability contribute to the system prompt?

CapabilityPromptSection[]

Capability.getPromptSections


getTools(): ToolDeclaration<unknown, unknown>[];

What tools does this capability expose for the current state?

ToolDeclaration<unknown, unknown>[]

Capability.getTools


processToolResult(
toolName,
args,
result): CapabilityAction | null;

A tool was called and executed. Does this capability handle the result?

Parameter Type Description

toolName

string

The name of the tool that was called

args

unknown

The arguments passed to the tool

result

unknown

The result returned by the tool’s execute()

CapabilityAction | null

An action telling the host what to do, or null if this capability doesn’t handle this tool.

Capability.processToolResult