Docs / ai / TalkToAgentOptions

TalkToAgentOptions

typesince 0.7.0not for built apps

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

FieldTypeDescription
siteIdstringTarget site. Omit (together with agent) to let the capability registry route by task.
agentstringTarget persona at that site. Requires siteId.
handlestringAddress an agent by handle, e.g. "@coach" (the @ is optional). The phone-friendly addressing path; outranks siteId alone and capability routing.
fileRefsstring[]Files already in the site workspace for the agent to load.
waitSecondsnumberSeconds to wait for an inline answer before returning a job to poll. Defaults to 25, capped at 50.
Warningagent 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.
WarningwaitSeconds 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.
NotefileRefs 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.