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

# Agents

> Create and manage UnleashX voice agents, campaigns, and the data behind them.

# Agents

> **In one line:** Let your UnleashX assistant build and manage voice agents and calling campaigns, attach phone numbers, run analytics on executions, and generate report documents — all through the UnleashX Agents API.

|                    |                                                                                         |
| ------------------ | --------------------------------------------------------------------------------------- |
| **Category**       | Dev Tools                                                                               |
| **Authentication** | Platform-managed                                                                        |
| **Setup time**     | \~1 minute                                                                              |
| **Difficulty**     | Medium                                                                                  |
| **Best for**       | Spinning up voice agents, launching outbound campaigns, and pulling execution analytics |

## 1. Overview

The Agents integration is the control surface for UnleashX's own voice-AI platform. With it, an assistant can create or update agents and voice agents, set up calling campaigns, attach phone numbers, and read back rich execution analytics — calls, workflows, nodes, and form data.

Once connected, your assistant can do the heavy lifting of operating a calling program: define an agent's prompt and configuration, launch a "Winter Sale" campaign against the right agent, attach the numbers that dial out, and then report on how every run performed. It can also export results into PDF/Excel/Docx and other document formats.

Because this drives your live UnleashX workspace, it's platform-managed: UnleashX auto-generates the Agents API key from your session, so there's nothing for you to paste. Connecting it turns natural-language requests into real, governed actions on your agents and campaigns.

## 2. What you'll need

<Note>
  Agents is **built into UnleashX** and operates on your own workspace. There's no third-party account, and the Agents API key is generated for you from your signed-in session.
</Note>

* An active UnleashX account with the Agents feature enabled.
* Permission to create/manage agents and campaigns in your workspace (admin or appropriate role).
* Your workspace identifier for a few analytics/key-generation actions (the assistant will ask if needed).
* If you lack admin rights, ask a workspace admin to enable the feature and grant agent-management permissions.

## 3. Get your credentials

<Info>
  There are **no credentials for you to create**. The Agents API key is **auto-generated by UnleashX** from your session (the **Generate API Key** tool can mint a token when one is required), and the platform supplies the base URL and database access. You never handle a raw key.
</Info>

Platform-side, an admin configures the UnleashX base URL and the analytics database connection; these are preset in managed environments. Some tools require a `workspace_id` so actions and queries are scoped correctly — the assistant will request it when needed.

| Platform-managed setting          | Plain-English reason it exists                                                        |
| --------------------------------- | ------------------------------------------------------------------------------------- |
| Agents API key / session token    | Authorizes create/update/delete actions on your agents and campaigns. Auto-generated. |
| UnleashX base URL                 | Points the integration at your environment's Agents API.                              |
| Analytics DB access (MySQL/Mongo) | Lets the read-only analytics tools query execution data.                              |
| Workspace ID                      | Scopes campaigns, key generation, and analytics to the right workspace.               |

## 4. Connect on UnleashX

<Steps>
  <Step title="Open your agent">
    Go to [https://www.tryunleashx.com](https://www.tryunleashx.com) and open the assistant you want to give Agents control to.
  </Step>

  <Step title="Open Data Connectors">
    Click **Data Connectors** in the agent.
  </Step>

  <Step title="Find Agents and add it">
    Locate **Agents** and click **Connect** / **Add**. It's platform-managed — the Agents key is generated from your session, so there's nothing to paste.
  </Step>

  <Step title="Confirm it's connected">
    The Agents tool should now show a **Connected** badge.
  </Step>
</Steps>

### Use Agents in a Workflow

Once connected, you can add **Agents** to any automation from the **Workflows** builder. Its triggers and tools appear in the Apps panel, marked with an **MCP** badge.

<Steps>
  <Step title="Add a trigger or action node">
    Open **Workflows → New Workflow**. On the canvas, click **+ Add Trigger** (or the **+** below any node) to add a step.

    <img src="https://mintcdn.com/unleashx/LXZeho1M8XzFkz0k/images/mcp/workflows/05-add-trigger.png?fit=max&auto=format&n=LXZeho1M8XzFkz0k&q=85&s=449a0c03b0c7b40e571ec02373a85259" alt="Add a trigger on the workflow canvas" width="1390" height="722" data-path="images/mcp/workflows/05-add-trigger.png" />
  </Step>

  <Step title="Pick Agents from the Apps panel">
    In the **Paths** panel, open the **Apps** tab and select **Agents**. Use the search box if you have many connectors.

    <img src="https://mintcdn.com/unleashx/LXZeho1M8XzFkz0k/images/mcp/workflows/06-apps-list.png?fit=max&auto=format&n=LXZeho1M8XzFkz0k&q=85&s=bbb8bb6e668c4f8e1f6fd5e4955a45f0" alt="Choose your app from the Apps list" width="2446" height="1550" data-path="images/mcp/workflows/06-apps-list.png" />
  </Step>

  <Step title="Choose a trigger or tool">
    Pick the trigger or action you want. Configure its fields — required fields are marked with a red asterisk (\*).
  </Step>

  <Step title="Add or select your account">
    Under **Selected account**, choose an already-connected account, or click **Add Account** to connect one now.
  </Step>

  <Step title="Save and test">
    Fill in the remaining fields and click **Save**. Use **Test** to verify the step, then toggle **Publish** when the workflow is ready.
  </Step>
</Steps>

<Note>
  The steps are the same for every connector. For the full workflow builder guide, see [Using MCP in Workflows](/mcp/workflows).
</Note>

## 5. Available tools

**Agent & voice-agent management**

| Tool                 | What it does                                                              | Changes data? |
| -------------------- | ------------------------------------------------------------------------- | ------------- |
| Create Agent         | Create or update an agent (name, category, purpose, prompt, type, status) | ✏️ Yes        |
| Create Voice Agent   | Create a voice agent with prompt, voice, STT, and LLM config              | ✏️ Yes        |
| Update Voice Agent   | Update a voice agent (only the fields you pass)                           | ✏️ Yes        |
| Delete Voice Agent   | Delete a voice agent                                                      | ⚠️ Yes        |
| List Voice Agents    | List voice agents in the workspace                                        | No            |
| Attach Phone Numbers | Attach phone numbers to a voice agent                                     | ✏️ Yes        |
| Generate API Key     | Generate (mint) an Agents API token                                       | ✏️ Yes        |

**Campaign management**

| Tool            | What it does                                 | Changes data? |
| --------------- | -------------------------------------------- | ------------- |
| Create Campaign | Create a calling campaign for a chosen agent | ✏️ Yes        |
| Update Campaign | Update a campaign (resolved by id or name)   | ✏️ Yes        |

**Analytics & data access (read-only)**

| Tool                        | What it does                                                        | Changes data? |
| --------------------------- | ------------------------------------------------------------------- | ------------- |
| Universal Data Access       | Run intent-based analytics over workflows, nodes, and forms         | No            |
| MySQL Query Tool            | Run a read-only SELECT/SHOW/EXPLAIN query on analytics tables       | No            |
| MongoDB Query Tool          | Run a Mongo aggregation over form/object collections                | No            |
| Form Dynamic Query Tool     | Query dynamic form collections by table name with filter/projection | No            |
| Get Calling Execution Data  | Fetch calling-execution analytics with success/failure summary      | No            |
| Get Workflow Execution Data | Fetch full workflow-execution details                               | No            |
| Get Node Execution Data     | Fetch node-level execution details (+ optional Mongo logs)          | No            |
| Get Form Objects Data       | Fetch form-response analytics and load primary/secondary tables     | No            |

**Form data update**

| Tool                    | What it does                                       | Changes data? |
| ----------------------- | -------------------------------------------------- | ------------- |
| Update Form Record Data | Update a secondary-table form record by field name | ✏️ Yes        |

**Document generation** (exposed through the Agents server to turn results into files)

| Tool        | What it does                               | Changes data? |
| ----------- | ------------------------------------------ | ------------- |
| Create PDF  | Build a PDF document from content/sections | ✏️ Yes        |
| Create Docx | Build a Word (.docx) document              | ✏️ Yes        |
| Create Xlsx | Build an Excel (.xlsx) spreadsheet         | ✏️ Yes        |
| Create CSV  | Build a CSV file                           | ✏️ Yes        |
| Create JSON | Build a JSON file                          | ✏️ Yes        |
| Create HTML | Build an HTML file                         | ✏️ Yes        |
| Create Pptx | Build a PowerPoint (.pptx) deck            | ✏️ Yes        |

<Warning>
  **Delete Voice Agent** permanently removes a voice agent. The create/update tools modify your live workspace. The analytics query tools are read-only and restricted to SELECT-style statements on whitelisted tables.
</Warning>

## 6. Example usage

**"Create a winter-sale outbound campaign on our Sales voice agent, retry twice."**
→ Runs **List Voice Agents** to resolve the agent by name, then **Create Campaign** with your dates and retry settings.

**"How did yesterday's calls do for agent 1240 — success vs. failed?"**
→ Runs **Get Calling Execution Data** (with a summary) and the assistant reports the breakdown; it can then **Create Xlsx** to export it.

## 7. Permissions & data access

**UnleashX can:**

* Create, update, and delete agents, voice agents, and campaigns in your workspace.
* Attach phone numbers and mint Agents API tokens.
* Read execution analytics (calls, workflows, nodes, forms) via read-only queries.
* Update specific form records you target and generate report documents.

**UnleashX cannot:**

* Run write/DDL SQL — analytics queries are limited to read-only statements on whitelisted tables.
* Act outside your workspace scope.
* Bypass your role-based permissions.

**To disconnect:** Open the agent → **Data Connectors** → **Agents** → **Disconnect**. Access is revoked immediately.

## 8. Troubleshooting

| Problem                       | What it means                                    | How to fix it                                                       |
| ----------------------------- | ------------------------------------------------ | ------------------------------------------------------------------- |
| "No Agents API key available" | The session token couldn't be resolved           | Re-authenticate on UnleashX; the key is generated from your session |
| "workspace\_id is required"   | A scoped action/query needs your workspace ID    | Provide the workspace ID when asked                                 |
| 401 / unauthorized            | Token missing or expired                         | Sign in again on UnleashX                                           |
| 403 / forbidden               | Your role lacks permission for the action        | Ask a workspace admin to grant agent/campaign rights                |
| "Campaign not found"          | The id/name didn't match the campaign list       | Use a name/id from **List Voice Agents** / the campaign list        |
| Query rejected                | The SQL wasn't a read-only/whitelisted statement | Use SELECT/SHOW/EXPLAIN on the allowed analytics tables             |

For general connector issues, see [/mcp/integrations](/mcp/integrations).

## 9. Frequently asked questions

**Do I need to create an API key?**
No. The Agents API key is auto-generated from your UnleashX session. The **Generate API Key** tool can mint one when an action requires it.

**Can it delete things?**
Yes — **Delete Voice Agent** removes a voice agent. Create/update tools change live data, so treat them with care.

**Are the analytics tools safe?**
Yes. They are read-only and restricted to SELECT-style queries on whitelisted tables (workflow/node/form analytics); writes and DDL are blocked.

**Can multiple team members use it?**
Yes, subject to each member's role and permissions in the workspace.

## 10. References

* UnleashX dashboard: [https://www.tryunleashx.com](https://www.tryunleashx.com)
* UnleashX integrations help: [/mcp/integrations](/mcp/integrations)
* Support: [cs@unleashx.ai](mailto:cs@unleashx.ai)
