Non-interactive (scripted) mode
Supply messages directly on the command line or from a file to runpoly chat without a human at the terminal. This is useful for automated testing pipelines and CI scripts.
Inline messages — use -m/--message (repeatable):
--input-file:
- to read from stdin.
If the file path does not exist, poly chat exits with an error.
Resuming an existing conversation
Use--conversation-id (or --conv-id) to resume an existing conversation by its ID instead of creating a new session:
Pushing before chatting
Use--push to push the local project to Agent Studio before starting the chat session. This ensures local changes are live before testing without requiring a separate poly push step:
Language flags
Use language flags to specify the expected input and output language when chatting against multilingual agents. If not specified, the project default is used.--input-lang and --output-lang take precedence over --lang when both are supplied.
Simulating SIP headers
Use--sip-header NAME=VALUE to simulate a SIP header when starting a conversation.
Single header:
conv.sip_headers. This is for
testing agent behaviour only; it does not create a SIP call or reproduce carrier-level
SIP behaviour. SIP headers cannot be changed when resuming an existing conversation.
poly chat flags summary
--json output shape — a conversations array, one entry per session (more than one if /restart was used in scripted input); each turns entry mirrors the enabled --functions/--flows/--state flags:
function_events, flow, and state_changes are only present on turns where --functions, --flows, or --state (or --metadata) produced data. If --push is used, a push key ({ "success": true, "message": "..." }) is added alongside conversations. On failure (e.g. session creation error, missing input file), the shape is { "success": false, "error": "..." } instead.
