← Back to blog

Persona function-calling: LLM-driven actions

2026-05-22 · 9 min read

Function-calling lets an LLM emit a structured request to invoke a named function with named arguments. The host runs the function, returns the result, and the model produces the next turn with that result in context.

Each user owns a list of device action templates. A template has a name, description, a JSON-Schema for its arguments, and a runner type — adb_shell, uiautomator_script, or google_sign_in. Three templates ship built-in: whatsapp_send_text, telegram_send_text, adb_install_apk_url.

On the persona edit page tick the templates you want the LLM to access. The server takes each linked template and converts it into an OpenAI-compatible tool definition with type=function and a parameters JSON-Schema.

At runtime the auto-reply consumer assembles the messages array, adds the linked tools, calls the persona's provider. When tool_calls arrive, the consumer validates the call, resolves which Android device to target, submits the action, polls until terminal, appends a tool message, and calls the model again.

Safety rails: tool calls scoped to the persona owner, per-template rate limit, hard timeout per run, full audit log in action_runs with stdout/stderr.

Start free trial → · All features →


Related