The short answer
Function calling is what makes a voice agent useful rather than merely conversational. Without it the agent can only discuss what is in its prompt; with it, it can check a calendar, look up an order, or write a record. In voice it carries an extra constraint: the call is live, so a slow function produces audible silence.
In detail
The mechanism is a contract. Each function is declared with a name, a description, and a schema for its parameters. The model, given the conversation, decides whether to call one and emits a structured invocation with arguments. The platform executes it, returns the result, and the model continues with that result in context. The model never executes anything itself — it only requests.
Description quality determines behaviour far more than most teams expect. The model chooses a function based on its description, so vague or overlapping descriptions produce wrong selections, and a parameter without a clear type and explanation produces malformed arguments. Fewer, well-described functions consistently outperform many similar ones.
Voice adds a timing constraint that text does not have. A function that takes several seconds leaves the caller listening to nothing, which reads as a dropped call. The standard mitigations are a filler phrase spoken while the call is in flight, an aggressive timeout, and a defined utterance for the timeout case so the agent says something coherent rather than stalling.
Functions are also a security boundary. Arguments are model-generated text and must be validated as untrusted input, permissions must be scoped to what the agent legitimately needs, and any function with side effects needs idempotency protection — a retried call must not book the appointment twice.
How Rexa handles it
Rexa functions are HTTPS webhooks declared with a JSON-schema parameter definition and an HMAC-signed call from the platform. Each function sets its own timeout_ms between 1000 and 30000, plus a waiting_message the agent speaks while the call is in flight and a separate sentence it speaks if the function exceeds its timeout — so a slow backend produces a spoken response rather than dead air.
Functions referenceRelated terms
Voice agent
A voice agent is software that conducts a spoken conversation with a person over a phone line or a browser connection, understanding natural speech and responding in speech.
System prompt
A system prompt is the standing instruction set given to a language model that defines its role, constraints and behaviour for every turn of a conversation.
Idempotency key
An idempotency key is a client-supplied identifier that lets a server recognise a retried request and return the original result instead of performing the operation again.
Latency budget
A latency budget is an allocation of the maximum acceptable end-to-end response delay across each component that contributes to it.