Tools
Latency and async tools
Keep live callers from hearing dead air. Answer within 800 ms or acknowledge and finish the work in the background.
The 800 ms rule
On a phone call, silence feels broken after about a second. Katexs gives every synchronous voice tool a hard budget of 800 ms end to end. If your endpoint hasn't answered by then, Katexs stops waiting and the agent says:
"That's taking longer than expected on my side. The team will follow up to confirm."
The timeout is logged with the status timeout so you can find slow tools in Traces.
Making tools fast
- Do the minimum work in the request path. Look up, don't compute.
- Keep your endpoint warm and close to your data. Cold starts alone can eat the budget.
- Cache read-only data such as opening hours, price lists and inventory.
- Return a short sentence. Long payloads take longer to send and to speak.
Async functions
Some work can't finish in 800 ms: creating a CRM record across several systems, sending documents, running a long search. Mark the function async. Katexs sends the request, does not wait for the answer, and the agent immediately says:
"Got it, I've sent that through."
Your endpoint should accept the request quickly (return 202), queue the work and finish it in the background. If the caller needs to know the outcome later, send it by SMS, email or a follow-up call.
| Use sync when | Use async when |
|---|---|
| The agent needs the answer to continue (availability, order status) | The agent only needs to know the request was received |
| Your endpoint reliably answers in under 500 ms | The work takes seconds or depends on slow third parties |
Warning
Never make a sync tool "fast" by returning success before the work is done. If the agent tells a caller something happened, it must have happened.
Last updated November 2026 · Found a problem? Email support@katexs.com
