TalkToAgentOptions
Type: targeting and timing options for talkToAgent.
import type { TalkToAgentOptions } from 'flowstack-sdk'Controls which agent runs and how long the call waits inline. Targeting precedence: handle outranks siteId alone and outranks capability routing; agent requires siteId; supplying no target at all hands the choice to the capability registry.
Signature
interface TalkToAgentOptions { siteId?: string; agent?: string; handle?: string; fileRefs?: string[]; waitSeconds?: number }Returns
| Field | Type | Description |
|---|---|---|
siteId | string | Target site. Omit (together with agent) to let the capability registry route by task. |
agent | string | Target persona at that site. Requires siteId. |
handle | string | Address an agent by handle, e.g. "@coach" (the @ is optional). The phone-friendly addressing path; outranks siteId alone and capability routing. |
fileRefs | string[] | Files already in the site workspace for the agent to load. |
waitSeconds | number | Seconds to wait for an inline answer before returning a job to poll. Defaults to 25, capped at 50. |
Warning
agent without siteId does not identify a target — the pair is required together. Use handle if you want to name an agent with a single value.Warning
waitSeconds is capped at 50; larger values do not extend the inline wait. Plan for the polling path regardless of what you pass.NoteExplicit targeting is deterministic, capability routing is not. If you know which agent you want, name it — check
routed on the result to see whether the registry chose instead.Note
fileRefs names files already present in the site workspace; it does not upload anything.See also
talkToAgent · AgentTalkResult · getAgentResult
Source: src/api/client.ts (agent-to-agent talk, P0-187 FR3b) · Also available in llms-full.txt and registry.json.