Skip to main content

What Are Tools?

Tools are capabilities you can attach to a persona. When the agent determines it needs to perform an action — like transferring a call, looking up information, or sending a follow-up message — it invokes the appropriate tool. Kejue provides a set of built-in tools and lets you create custom HTTP tools that call your own APIs.

Tool Scoping: In-Call vs Post-Call

Each tool attached to a persona is assigned to a specific scope that determines when it can be used:
A tool cannot be enabled for both voice:in-call and voice:post-call at the same time. Choose the scope that matches how you want the tool to be used.
This separation is important because in-call tools run synchronously during the conversation (the agent waits for the result), while post-call tools run asynchronously after the call ends.

Built-in Tools

Voice Tools

These tools interact directly with the call and are only available during live voice calls (voice:in-call).

Platform Built-in Tools

These tools interact with the Kejue platform and are available across all scopes.

agent_transfer

Hands the live call off to a different persona mid-conversation. Configure one or more transfer targets — the AI picks among them based on each target’s when_to_use description.

create_call

Lets the agent dial a contact (now or scheduled) on behalf of a persona. The new call runs as a separate session — it does not interrupt the current conversation.

Integration Tools

These tools connect with external messaging platforms.

Custom HTTP Tools

Custom HTTP tools let you connect your agent to any external API. When the agent invokes a custom tool, Kejue makes an HTTP request to your endpoint with the parameters the agent provides.

Creating a Custom Tool

Parameters

Each parameter you define has a source that controls who provides the value:
  • AI Generated (source: "ai") — the AI fills in the value based on the conversation. You provide a description and type so the AI knows what to supply. These are visible to the AI.
  • System Injected (source: "system") — the value is injected automatically from the execution context (e.g. call ID, contact ID). These are hidden from the AI.
You also have static parameters — fixed values with a constant string, useful for API keys or account identifiers. These are hidden from the AI. All parameters can be routed to different parts of the HTTP request: the request body, query string, URL path, or headers.

System-Injected Parameters

When you set a parameter’s source to system, you choose which system variable to inject. This lets you pass execution context to your external APIs without exposing it to the AI.

Available System Variables

Example

A CRM integration tool that creates a ticket with the call and contact context:
The AI only sees subject as a parameter. The call_id and customer_id are injected silently by the system.
If a system variable is not available in the current context (e.g., campaign_id for a non-campaign call), it is omitted from the request.

Attaching Tools to a Persona

After creating a tool (or choosing a built-in one), you attach it to a persona with a specific channel scope. The attachment specifies:
  • Which tool to attach
  • Which channels it’s active on (e.g. voice:in-call, voice:post-call, whatsapp)
  • Any tool-specific configuration (like transfer phone numbers)
Use post-call tools for actions that don’t need to happen during the live conversation. This keeps calls fast and responsive while still letting your agent take follow-up actions automatically.