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
| Name | Type | Required | Description |
|---|---|---|---|
agent_id | string | no | Agent to talk to. Omit only if flow_id is given (the flow's agent is used). |
flow_id | string | no | Call-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_variables | object (map) | no | Per-call variables substituted into the prompt as {{key}} |
direction | "inbound" | "outbound" | no | Test as this call direction (welcome message + prompt behave accordingly) |
stub_incall_apis | boolean | no | Node 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_id | string | no | Run 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):
| Field | Type | Description |
|---|---|---|
text_call_id | string | |
agent | string | |
room_name | string | |
call_history_id | string | |
ended | boolean | |
end_reason | string | |
greeting | string[] | |
warning | string | |
next | string |
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
| Name | Type | Required | Description |
|---|---|---|---|
text_call_id | string | no | The text_call_id returned by trillet_start_text_call |
session_id | string | no | Deprecated alias of text_call_id |
text | string | yes | What the caller says |
Structured output
Returned as structuredContent (fields are optional; the same data is in the text result):
| Field | Type | Description |
|---|---|---|
text_call_id | string | |
unprompted_messages | string[] | |
agent_messages | string[] | |
warning | string | |
call_ended | boolean | |
end_reason | string | |
note | string |
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
| Name | Type | Required | Description |
|---|---|---|---|
text_call_id | string | no | The text_call_id returned by trillet_start_text_call |
session_id | string | no | Deprecated alias of text_call_id |
Structured output
Returned as structuredContent (fields are optional; the same data is in the text result):
| Field | Type | Description |
|---|---|---|
text_call_id | string | |
agent | string | |
room_name | string | |
call_history_id | string | |
ended | boolean | |
end_reason | string | |
transcript | string[] | |
turns | number | |
tip | string |