operations array. Declare the {{args.…}}
it reads in the tool’s json_schema and create the {{secrets.…}} it reads
before publishing.
Lookup then answer
The caller asks for something you fetch; the agent answers from it. Thesay
covers the HTTP latency, and the http is silent so the model sees only the
two values.
generate_reply with a say and save a
model call.
Book then confirm
An irreversible action whose outcome the caller must hear. The confirmation is asay so the reference is read exactly, and the reference goes to userdata so
the rest of the call knows it.
Escalation to a person
One tool per destination, no arguments, withdisable_interruptions: true on the
tool so a caller talking over the ringback cannot lose the outcome. The tool’s
description is the escalation policy: say exactly when to use it and when not
to. See transfer for mode, on_failure and what the caller
hears.
Guard then continue
Nothing can follow anif, so an early exit puts the whole rest of the flow
inside one branch.
Business hours
Time decisions belong in acode operation: {{system_vars.time}} is a spoken
string and gt/lt refuse it. The script names its zone, so it works whatever
the agent’s timezone; replace Asia/Kolkata with your own.
"yes"/"no" rather than a boolean so the if stays editable in
the dashboard, whose fields are plain text.
Silent logging
Record something without the caller waiting or the model reacting.background_execution sends the request and moves on; nothing is published and
a failure only reaches our logs. A tool made only of background operations is
silent, so the model says nothing about it.
generate_reply.
Next
The operation tree
Kinds,
on_error and the branch rule.Testing and publishing
Run a pattern against your endpoints before publishing.