Trillet AI logo

Text test calls

Talk to an agent by text, like the dashboard Test panel.

Talk to an agent by text, like the dashboard Test panel. 3 tools.

trillet_start_text_call

Start a text test call

Start an interactive TEXT conversation with an agent, the same thing as the dashboard Test panel in text mode. Works for both flow kinds (simple prompt flows and node flows; node flows run the real router and variable extraction). Returns a text_call_id plus the agent's greeting; continue with trillet_say and finish with trillet_end_text_call. Notes: this is a real call (CallHistory row, LLM cost of a few cents, transcript + post-call analysis) and non-stubbed side effects (bookings, webhooks, transfers) EXECUTE FOR REAL. Pass flow_id to test that flow's ACTIVE EDITOR DRAFT when one exists (exactly like the Test panel while editing). On a local install the first ever use installs a native LiveKit client (~30-60s, needs npm).

Flags: writes open-world billed structured output

Parameters

NameTypeRequiredDescription
agent_idstringnoAgent to talk to. Omit only if flow_id is given (the flow's agent is used).
flow_idstringnoCall-flow (pathway) id. When provided it is passed like the editor Test panel does: if the flow has an active draft, the DRAFT config is tested instead of production.
dynamic_variablesobject (map)noPer-call variables substituted into the prompt as {{key}}
direction"inbound" | "outbound"noTest as this call direction (welcome message + prompt behave accordingly)
stub_incall_apisbooleannoNode flows only: In-Call API nodes return their configured testResponse instead of hitting the real endpoint (the editor Test panel default). Other tools still run for real. Default: true.
workspace_idstringnoRun this call in another workspace: its id or its name (see trillet_list_workspaces). Omit to use the default (TRILLET_WORKSPACE_ID, the workspace picked when the connector was approved, or the one set with trillet_switch_workspace).

Structured output

Returned as structuredContent (fields are optional; the same data is in the text result):

FieldTypeDescription
text_call_idstring
agentstring
room_namestring
call_history_idstring
endedboolean
end_reasonstring
greetingstring[]
warningstring
nextstring

trillet_say

Say something in a text test call

Send one caller message in an active text test call and wait for the agent's reply (usually ~1-3s; up to 90s when the agent runs tools). Returns the agent's message(s) plus call_ended when the agent hung up (end_call / transfer / silence policy). Any messages the agent sent unprompted while you were away are returned in unprompted_messages.

Flags: writes open-world structured output

Parameters

NameTypeRequiredDescription
text_call_idstringnoThe text_call_id returned by trillet_start_text_call
session_idstringnoDeprecated alias of text_call_id
textstringyesWhat the caller says

Structured output

Returned as structuredContent (fields are optional; the same data is in the text result):

FieldTypeDescription
text_call_idstring
unprompted_messagesstring[]
agent_messagesstring[]
warningstring
call_endedboolean
end_reasonstring
notestring

trillet_end_text_call

End a text test call

Hang up a text test call (or clean up one the agent already ended) and get the full transcript. Post-call analysis and summary land on the call record ~30-60s later, fetch them with trillet_get_call using call_history_id.

Flags: writes idempotent structured output

Parameters

NameTypeRequiredDescription
text_call_idstringnoThe text_call_id returned by trillet_start_text_call
session_idstringnoDeprecated alias of text_call_id

Structured output

Returned as structuredContent (fields are optional; the same data is in the text result):

FieldTypeDescription
text_call_idstring
agentstring
room_namestring
call_history_idstring
endedboolean
end_reasonstring
transcriptstring[]
turnsnumber
tipstring