Skip to main content
Use system invocation when a tool must run because an event occurred, not because the model decided to call it. You configure invocation on the attachment, so one tool can remain model-invoked elsewhere.

Model invocation and system invocation

Use system invocation for lifecycle work that must happen consistently. The model does not participate in the decision.

Supported events

Custom Code cannot run on call_end. MCP, Send SMS, and call-control tools do not support system invocation.

Configure the attachment

1

Select system invocation

On the tool attachment, select Run automatically in the Dashboard or set invocation to system in the API.
2

Choose the triggers

Add at least one event. For tool_succeeded or tool_failed, also select the source attachment. The API requires its attachment_id as source_attachment_id.
3

Map the arguments

Map each tool argument from a constant, a template, transcript messages, transcript text, or call context. Mark it required only when the tool cannot run without that value.
4

Test the event

Save the agent and place a test call that reaches the trigger. Confirm the execution status and arguments in the call details.
System attachment
Add this object to tool_refs with the safe partial-update procedure in Attach a tool to an agent.

Available argument sources

first_user_message is unavailable at call_start. call_end_reason is only available at call_end. phone_number is unavailable for web calls. Runtime memory is not populated for call_start or first_user_message.

Handle results and failures

The call record shows each system tool execution as succeeded, failed, or timed out. Use tool_succeeded and tool_failed triggers when one tool should start after a specific source attachment finishes. This creates an explicit chain and avoids relying on the model to coordinate the tools. If the source attachment fails, only a matching tool_failed trigger runs. Review the execution error and mapped arguments in the call details before retrying the workflow.