> ## Documentation Index
> Fetch the complete documentation index at: https://hellotars.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Give a voice agent tools

> Add built-in tools, your own API calls, code and integration actions to a voice agent, and attach knowledge bases it can search during a call.

> [!NOTE]
>
> This capability is in **beta**. Behavior can change before general availability.

At the end of this page, your voice agent can call tools during a call, before it starts or after it ends, and can search your knowledge bases. A tool runs while the caller waits, so this page also covers what the caller hears meanwhile.

## Before you start

Before you start, sign in to [the dashboard](https://dashboard.hellotars.com) and select the organization you want to work in.

* A voice agent. See [Create a voice agent](https://hellotars.com/docs/guides/voice/build/create-a-voice-agent.md).
* Your role includes **Build chat agents, voice agents, knowledge bases & tools**.
* For integration actions, a connected toolkit or a CodeKit toolkit. See [Connect a toolkit](https://hellotars.com/docs/guides/tools/connect-a-toolkit.md).

## Add a tool

**1. Open the voice agent and expand Tools in the settings rail**

The **Tools** section lists the tools this voice agent can use.

**2. Select Add tool and choose a tool**

**Built-in tools** and **Integrations** are listed separately.

**3. Enter a Callable name and describe When should the agent use it?**

The model reads this description to decide when to call the tool. Use a snake\_case name.

**4. Set the tool's fields, then save**

The tool shows in the **Tools** list with its kind, such as **built-in**, **custom** or **code**.

[https://dashboard.hellotars.com](https://dashboard.hellotars.com)

![The Tools section highlighted in the settings rail of the Agent page, listing an end\_call built-in tool and two transfer tools above Add tool](https://hellotars.com/docs/docs/guides/voice/images/voice-agent-tools.png)

In a conversation flow, a **Tool** or **Code** flow node runs one tool on entry, and a **Subagent** flow node carries its own tools. See [Add flow nodes](https://hellotars.com/docs/guides/voice/build/build-a-voice-flow.md#add-flow-nodes).

Large tool lists slow responses and make the voice agent less accurate at choosing a tool.

## Built-in tools

| Tool | What it does |
| - | - |
| **End Call** | Ends the call when the caller says goodbye or asks to end, or when your prompt tells the voice agent to end once the request is handled. |
| **Transfer Call** | Hands the caller to a person or another system. See [Transfer calls](https://hellotars.com/docs/guides/voice/build/transfer-calls.md). |
| **Agent Transfer** | Hands the call to another voice agent. |
| **Press Digit** | Presses keys to get through a phone menu on outgoing calls. The voice agent listens to the menu and sends the key tone. It does not ask the caller to press a key. |
| **Extract Variable** | Pulls values out of the conversation so later steps and tools can use them. |
| **Verify Caller** | Sends a one-time code and checks that the caller is who they say. The caller can **Speak the code** or use the **Phone keypad**. |
| **Web Search** | Searches the web for current information. |
| **Code** | Runs JavaScript during the call to fetch data, compute, and store the result as variables. |
| **Custom Function** | Calls your own API during the conversation. |

## Call your own API

A **Custom Function** sends an HTTP request.

| Field | What it holds |
| - | - |
| **Endpoint** | A public HTTPS URL. It can include variables, such as `{{response.order_id}}`. |
| **Headers** | Header names and values. Headers that start with X-TARS are reserved. |
| **Query parameters** | Parameter names and the value each one takes. |
| **Request body** | The body, edited as **Form** or **JSON**. |

Each input takes its value from one of four sources: **Conversation variable**, **Fixed value**, **Agent fills**, or **Prior result**. With **Agent fills**, describe in **What this value means** what the model must provide.

**Test request** sends the request with sample values and shows the **Request to send**, the **Response body**, and **What the agent sees**. Save the tool changes before you test.

## Use an integration action

Select **Integrations** in **Add tool**. Choose a connected account or a CodeKit toolkit, then the actions this voice agent can use. The **Defaults for selected actions** apply to every action you include. Select **Override for this action** to change one action.

Removing an integration from the voice agent keeps the connected account in **Tools**.

## Decide when a tool runs

**Run** sets the stage of the call:

| Stage | When the tool runs |
| - | - |
| **During call** | When the model calls it. |
| **Before call** | Before the voice agent speaks, so it has context from the start. |
| **After call** | After the call ends, for example to log the outcome in your CRM. |

Tools before and after the call run without the caller, so they ask for no confirmation and say nothing. A single prompt voice agent shows these stages on its **Workflow** page. A conversation flow keeps **Pre-call tools** on **Begin** and **Post-call tools** in **Global Settings** → **After the call**.

**Where is it available?** limits a tool to some conversation states. **Everywhere** makes it available in every state.

## Add safeguards

| Setting | What it does |
| - | - |
| **Confirm with caller** | **Never**, **Auto** or **Always** asks the caller before the tool runs. |
| **Require verified caller** | The tool needs a caller verified with **Verify Caller**. |
| **Action impact** | **Read-only** or **Consequential**. |
| **Undo action if needed** | An action that reverses this one. |
| **Safe to retry** | Lets Tars retry the tool, up to **Maximum retries**. |

## Set what the caller hears

**Say something while it runs** sets the line the voice agent says while the tool runs:

* **None** adds no line.
* **Prompt** gives the voice agent an instruction, and it says one short line in its own words.
* **Static** says your exact sentence after variables are filled.

The **Subtle typing sound while it runs** setting plays a quiet sound while the caller waits. With **Wait for the result**, the voice agent waits for the tool before it speaks.

## Save results as variables

**Result fields** save parts of a tool's result as variables that later steps can read. A tool that declares no output fields cannot save results as variables.

## Attach a knowledge base

**1. Expand Knowledge base in the settings rail and select Add knowledge base**

The list shows the knowledge bases in your organization.

**2. Choose a knowledge base and select Done**

The voice agent can now search its indexed passages during a call.

**3. Optional: write a Knowledge instruction**

Tell the voice agent how to use retrieved passages, such as "Answer only from the retrieved passages".

The **Passages per lookup** setting sets how many passages each search returns. The **Minimum similarity** setting drops passages below that score.

In a conversation flow, **Knowledge** on a flow node attaches a knowledge base to that flow node only.

## Verify

Open the test panel and select **Text chat**. Ask something that needs the tool or the knowledge base. Tool calls and knowledge searches show in the transcript.

Tools that change data must be mocked in tests. See [Test and publish a voice agent](https://hellotars.com/docs/guides/voice/launch/test-and-publish-a-voice-agent.md).

## Related pages

* [Create a voice agent](https://hellotars.com/docs/guides/voice/build/create-a-voice-agent.md)
* [Build a voice flow](https://hellotars.com/docs/guides/voice/build/build-a-voice-flow.md)
* [Transfer calls](https://hellotars.com/docs/guides/voice/build/transfer-calls.md)
* [Connect a toolkit](https://hellotars.com/docs/guides/tools/connect-a-toolkit.md)
* [Create a knowledge base](https://hellotars.com/docs/guides/knowledge/create-a-knowledge-base.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.