Skip to main content
A voice agent uses regular Timbal tools. The caller asks a question, the text agent decides to call a function, and its answer is spoken back. Speech adapters do not execute the tool themselves.

Add one lookup

After the quickstart and greetings, replace agent.py with this complete example. Keep the same .env and server command:
agent.py
Restart the server and start a new session. Say “Check order 101.” You should see Calling get_delivery_status…, wait through the demo lookup, then hear that the order is shipped and expected tomorrow. An unknown ID should produce a not-found answer. These are mock records, not a live delivery integration.

What the caller hears while waiting

With the thinking sound off and no filler configured, a tool call can leave a quiet gap. This is a good baseline: first verify that the tool is called and its result is used. The next lessons add a thinking sound or a spoken filler to that gap.

Add real actions carefully

Replace the mock with an async service call when the basic flow works. For actions requiring approval, wrap the function in Tool(handler=..., requires_approval=True) and implement the approval UI and HTTP resume flow. The playground displays a pending request; it does not resolve approval from spoken words. See Approval gates and Voice approval events. A filler is an acknowledgement of waiting, not confirmation that an action succeeded. Give the final spoken confirmation only after the tool result supports it. Continue to Thinking sounds.