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

# Deploy an Agent

> Deploy your agent to channels, and share templates with team

Once your agent is published, you can connect it to channels so users can reach it outside the Agent Studio. This page covers setup for each channel: Chat, Slack, scheduled tasks, MCP, A2A, REST API, SDK, and webhooks.

## Deploy on Channels

In the Agent Studio, click the <Icon icon="gear" size={12} /> gear icon and go to the **Channels** tab to see all available channels.

<img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-channels.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=2c6bbaba4ae8d07c8425fca70a2e56d9" alt="Channels tab showing all available deployment channels" width="3396" height="2076" data-path="images/guide/deployment-channels.png" />

| Channel             | Best for                                      | How users interact                                        |
| ------------------- | --------------------------------------------- | --------------------------------------------------------- |
| **Chat Widget**     | Internal teams, customer portals              | Hosted URL or embedded iframe with threaded conversations |
| **Slack**           | Teams already in Slack                        | DM or @mention the bot, auto-engage on topics             |
| **Webhooks**        | Automation platforms, CI/CD, custom apps      | HTTP POST, sync or async response                         |
| **MCP**             | Developers in Claude Desktop, Cursor, VS Code | Agent appears as a native MCP tool                        |
| **Scheduled Tasks** | Recurring reports, monitoring, data syncs     | No user trigger, runs on a cron schedule                  |

### Chat

A hosted Chat UI with a unique, shareable URL. No embedding or code required.

See [Chat Widget](/guides/deploy/chat-widget) for full setup, embedding, conversation starters, and access control.

<Steps>
  <Step title="Open the Chat section in the Channels tab">
    Your Chat UI URL is displayed (e.g., `https://peach-centipede.agents.xpander.ai`). Share this link directly with users who have access.

    <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-chat.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=214900fe9f201d4d7b64a3f72fad5fab" alt="Chat UI with Xpander branding, message input, and conversation starters" width="3128" height="1976" data-path="images/guide/deployment-chat.png" />
  </Step>

  <Step title="Configure conversation starters">
    Click <kbd>Conversation starters</kbd> to add prompt suggestions that appear when a user opens the chat for the first time. Add, edit, or remove starters, then click <kbd>Save</kbd>.

    <Frame>
      <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-chat-starters.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=777e2539a29a5f21456947bf5812bcf3" alt="Chat conversation starters editor with example prompts" width="400" data-path="images/guide/deployment-chat-starters.png" />
    </Frame>
  </Step>
</Steps>

Only users set in the **Access** setting (in the **General** tab) can access this link. Set it to **Only me** for private use or **All users in my account** to share with your team. Supports platform authentication (Xpander built-in) or SSO (SAML, OAuth 2.0 with Okta, Auth0, Azure AD).

<Frame>
  <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-chat-access.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=e03a8fea313b907d148a2801dc0c3962" alt="Access setting dropdown with Only me and All users in my account options" width="500" data-path="images/guide/deployment-chat-access.png" />
</Frame>

### Slack

Connect your agent as a Slack bot that users can DM or @mention in channels.

See [Slack](/guides/deploy/slack) for the full setup flow, file processing capabilities, auto-engage rules, and conversation starters.

<Steps>
  <Step title="Click Connect to Slack agent">
    In the Channels tab, click <kbd>Connect to Slack agent</kbd>. A dialog opens letting you create a new Slack agent or link to an existing one.

    Click <kbd>Create new Slack agent</kbd>.

    <Frame>
      <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-slack.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=befe3157266a8d9e470ad65185b9fb5c" alt="Connect to Slack agent dialog with options to create new or view existing" width="400" data-path="images/guide/deployment-slack.png" />
    </Frame>
  </Step>

  <Step title="Set up a new Slack agent">
    You'll need:

    * A name for your Slack bot
    * Access tokens and Refresh tokens (See next step)

    <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-slack-0.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=5dffdb977555d663b6073f33e5f31042" alt="New Slack agent setup page with empty name and token fields" width="3268" height="2196" data-path="images/guide/deployment-slack-0.png" />
  </Step>

  <Step title="Get your Slack tokens">
    Go to [api.slack.com/apps](https://api.slack.com/apps). Under **Your App Configuration Tokens**, click <kbd>Generate Token</kbd>.

    <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-slack-1.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=c260f96f7ab91fb04e92666f63edff39" alt="Slack API Your Apps page with Generate Token button" width="2950" height="1976" data-path="images/guide/deployment-slack-1.png" />
  </Step>

  <Step title="Select your workspace and generate">
    In the dialog, select the Slack workspace you want your agent to work in from the dropdown and click <kbd>Generate</kbd>.

    Each Slack workspace needs its own Xpander Slack agent, but you can connect a single Xpander agent to multiple Slack agents across workspaces.

    <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-slack-2.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=4ef854c3fa142032f1aada122d616d13" alt="Generate Your App Configuration Token dialog with workspace selection" width="2950" height="1976" data-path="images/guide/deployment-slack-2.png" />
  </Step>

  <Step title="Copy the Access Token and Refresh Token">
    Once generated, you'll see your **Access Token** and **Refresh Token** with <kbd>Copy</kbd> buttons. Copy both.

    <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-slack-3.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=3fdb91304d0bc12e2f22f8a4b392235d" alt="Slack API tokens page showing Access Token and Refresh Token with Copy buttons" width="2950" height="1976" data-path="images/guide/deployment-slack-3.png" />
  </Step>

  <Step title="Fill in the setup page and connect to Slack">
    Back on the Xpander setup page, enter a **Slack agent name**, paste the **Access Token** and **Refresh Token**, then click <kbd>Connect to Slack</kbd>.

    Slack will prompt you to review permissions for the Xpander app. Click <kbd>Allow</kbd>.

    <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-slack-4.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=0143a2ca1172e192ce63065c810e3b0c" alt="Slack OAuth permissions page. Allow Xpander to access Slack" width="2950" height="1976" data-path="images/guide/deployment-slack-4.png" />
  </Step>

  <Step title="Add channels and connect your agent">
    Once connected, you'll see "Xpander created successfully". Add the Slack channels the bot should be active in and click <kbd>Add to channels</kbd>. Then in the **Connect agent** section below, select the Xpander agent (or workflow) to connect and click <kbd>Connect agent</kbd>.

    <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-slack-5.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=3bdfed9376f275e616858bf924c63d62" alt="Slack agent page with successful connection, channel selection, and Connect agent button" width="3132" height="2032" data-path="images/guide/deployment-slack-5.png" />
  </Step>

  <Step title="Publish">
    Back in the Agent Studio, click <kbd>Publish</kbd> to make the agent live in Slack.
  </Step>
</Steps>

<Note>
  To manage, customize, or delete Slack agents after setup, go to the [Slack Agents page](https://app.xpander.ai/slack_agents/). From there you can change the connected Xpander agent, configure capabilities (OCR, audio transcription), set auto-engage rules, or delete the Slack agent entirely to revoke access.
</Note>

### Task (Scheduled)

Run your agent on a recurring schedule. Use this for daily reports, periodic data syncs, monitoring checks, or other automated work.

See [Scheduled Tasks](/guides/deploy/scheduled-tasks) for cron expressions, custom schedules, run-as-user context, and monitoring scheduled runs.

<Steps>
  <Step title="Click Add Task">
    Open the **Task** section in the Channels tab and click <kbd>Add Task</kbd>.

    <Frame>
      <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-task-card.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=63a9148a5022f6a52049a6356fd02e1b" alt="Task channel card showing Add Task button and existing tasks" width="500" data-path="images/guide/deployment-task-card.png" />
    </Frame>
  </Step>

  <Step title="Configure the task">
    Fill in the task configuration:

    * **Instructions**: Describe what the agent should do on each scheduled run
    * **Schedule**: Choose a **Quick Preset** (e.g., every 5 minutes) or set a **Custom Schedule** with interval, specific time, and active days
    * **User context** (under Advanced Settings): Provide an email, user ID, and name so the agent runs with a specific user identity. Without it, the agent runs as an anonymous user with no memory context.

    <Frame>
      <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-task.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=f7a6488476722588cdc2c81f102355ed" alt="Task configuration with instructions, schedule presets, interval settings, and user details" width="350" data-path="images/guide/deployment-task.png" />
    </Frame>
  </Step>
</Steps>

### MCP (Model Context Protocol)

Expose your agent as an MCP server so any MCP client can invoke it.

See [MCP Protocol](/guides/deploy/mcp) for client-specific configurations (Claude Desktop, Cursor, VS Code, ChatGPT), available MCP tools, and OAuth flow.

<Steps>
  <Step title="Enable MCP and view connection details">
    Toggle MCP on in the Channels tab, then click <kbd>Details</kbd>. The modal shows your **MCP server URL**, **API key**, and **transport** options (HTTP or SSE).
  </Step>

  <Step title="Copy the setup config for your client">
    The modal provides ready-to-paste configuration for **Cursor**, **Claude**, **Windsurf**, or **Raw JSON**. Copy and paste it into your MCP client's config file.

    <Frame>
      <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-mcp.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=b0251c71753c3c27e93e32d401ab3b55" alt="MCP details showing server URL, API key, transport selection, and easy setup configs for Cursor, Claude, Windsurf" width="400" data-path="images/guide/deployment-mcp.png" />
    </Frame>
  </Step>
</Steps>

### A2A (Agent-to-Agent)

<Frame>
  <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-a2a-card.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=1e61a3e60e4c7411e0bfe9332e14a573" alt="A2A channel card with Enabled toggle, Agent card and Manage API keys buttons" width="500" data-path="images/guide/deployment-a2a-card.png" />
</Frame>

Let other agents (inside or outside your organization) discover and invoke this agent via Google's Agent2Agent protocol.

<Steps>
  <Step title="Toggle A2A on">
    Open the **A2A** section in the Channels tab and enable it.
  </Step>

  <Step title="View the agent card">
    Click <kbd>Agent card</kbd> to see your agent's A2A identity, including the Agent A2A URL, name and version.

    <Frame>
      <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-a2a.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=fe833594853d524a6142cb1b18f8fcf1" alt="A2A agent card showing URL, name, version, and list of exposed skills with descriptions" width="400" data-path="images/guide/deployment-a2a.png" />
    </Frame>
  </Step>

  <Step title="Generate API keys for external agents">
    Click <kbd>Manage API keys</kbd> to open the A2A key manager.

    Click <kbd>Assign API Keys</kbd> to generate credentials that external agents use to authenticate.

    <Frame>
      <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-a2a-keys.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=5aa6724c90cf14e0a27b3cb637f2ad7f" alt="A2A API key manager with Assign API Keys dropdown showing generated keys" width="400" data-path="images/guide/deployment-a2a-keys.png" />
    </Frame>
  </Step>
</Steps>

### API

Call your agent programmatically via the REST API.

<Steps>
  <Step title="Open the API Tester">
    Click <kbd>Test</kbd> to open the Agent API Tester.

    <Frame>
      <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-api.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=e5bdd44088c88aa69953b031fe24ce11" alt="Agent API Tester with payload URL, API key, cURL command, and invoke mode selection" width="650" data-path="images/guide/deployment-api.png" />
    </Frame>
  </Step>

  <Step title="Get your endpoint and API key">
    The tester shows your **Payload URL** and **API Key** at the top. Copy these for your integration. It also generates a ready-to-use **cURL command**. Choose an invocation mode:

    | Method       | Endpoint                                   | When to use                                           |
    | ------------ | ------------------------------------------ | ----------------------------------------------------- |
    | Synchronous  | `POST /v1/agents/{agent_id}/invoke`        | Simple integrations. Blocks until the agent finishes. |
    | Asynchronous | `POST /v1/agents/{agent_id}/invoke/async`  | Background jobs. Returns a task ID immediately.       |
    | Streaming    | `POST /v1/agents/{agent_id}/invoke/stream` | Chat UIs. Delivers SSE events in real-time.           |

    All three support multimodal input (text, files, and images in the same request).
  </Step>

  <Step title="Test it">
    Set a JSON payload in the **Request Examples** section and click <kbd>Test API</kbd>. The response appears in the **Response History** panel.
  </Step>
</Steps>

### SDK

<Frame>
  <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-sdk-card.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=b282c1b50800248247d4dd28e37dd3a3" alt="SDK channel card showing Agent ID and Manage API keys button" width="500" data-path="images/guide/deployment-sdk-card.png" />
</Frame>

Integrate your agent into custom applications using the Xpander SDK.

<Steps>
  <Step title="Copy your Agent ID">
    Open the **SDK** section in the Channels tab. Your Agent ID is displayed there.
  </Step>

  <Step title="Click Manage API keys">
    Click <kbd>Manage API keys</kbd> to open the SDK modal. Click <kbd>Assign API Keys</kbd> to generate or select a key for your application.

    <Frame>
      <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-sdk.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=dfb32ebd470ff2de4add0282a1ef936a" alt="SDK modal showing Agent ID and Assign API Keys dropdown" width="400" data-path="images/guide/deployment-sdk.png" />
    </Frame>
  </Step>

  <Step title="Copy your API key">
    Expand the <kbd>Assign API Keys</kbd> dropdown to reveal your key. Copy it for use in your application.

    <Frame>
      <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-sdk-key.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=4d76d7e8e513170260e8437d5351d7cc" alt="SDK modal with API key expanded and visible" width="400" data-path="images/guide/deployment-sdk-key.png" />
    </Frame>
  </Step>

  <Step title="Install the SDK and connect">
    Follow the [SDK documentation](/api-reference/backend) to integrate the agent into your app.
  </Step>
</Steps>

### Webhook

Trigger your agent from Zapier, Make, n8n, etc.

See [Webhooks](/guides/deploy/webhooks) for sync vs async modes, file uploads, response field extraction, dynamic parameter mapping, and MCP OAuth pass-through.

<Steps>
  <Step title="Enable the Webhook and open the tester">
    Open the **Webhook** section in the Channels tab and toggle it on. Then click <kbd>Configure and test</kbd> to open the Agent Webhook Tester.
  </Step>

  <Step title="Get your endpoint and API key">
    The tester shows your **Payload URL** (with agent ID and API key embedded) and a ready-to-use **cURL command**. Copy these for your integration.

    Key parameters you can set in the payload:

    * **message**: the prompt to send to the agent
    * **asynchronous**: set to `true` for async mode (returns task ID immediately)
    * **task\_id**: optionally continue an existing conversation thread
    * **getter**: extract a specific field from the agent's response (e.g., `result`)
  </Step>

  <Step title="Test it">
    Choose an input format: **JSON**, **Form Data**, or **Multipart**. Set your payload fields. Click <kbd>Test Webhook</kbd> to send a test request. The response appears in the **Response History** panel.

    <Frame>
      <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-webhook.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=8def14cad11b050bc8cc015fd5342dc4" alt="Agent Webhook Tester with payload URL, API key, cURL command, JSON payload fields, and Test Webhook button" width="500" data-path="images/guide/deployment-webhook.png" />
    </Frame>
  </Step>
</Steps>

## Share Agent Template

You can share your agent's configuration with your team as a reusable template.

Use this to:

* Create similar agents quickly
* Share proven configurations with your team
* Backup a known-good configuration before making major changes

<Steps>
  <Step title="Open the Templates section">
    In the Agent Studio **General** tab, expand the **Templates** section.

    <Frame>
      <img src="https://mintcdn.com/xpanderai-099931d1/OGlJJ1lp1VY3af7I/images/guide/deployment-templates.png?fit=max&auto=format&n=OGlJJ1lp1VY3af7I&q=85&s=8bff5c57c50cbc7c092414be75686d1e" alt="Templates section in the General tab showing saved templates with Use template buttons" width="600" data-path="images/guide/deployment-templates.png" />
    </Frame>
  </Step>

  <Step title="Save as template">
    Click <kbd>Save as template</kbd>. This captures your agent's complete configuration (instructions, tools, memory settings, model, and channels) as a named template with a timestamp.
  </Step>

  <Step title="Use a saved template">
    Saved templates appear in the list with a <kbd>Use template</kbd> button. Click it to create a new agent pre-configured with that template's settings.
  </Step>
</Steps>

## Next Steps

<CardGroup cols={2}>
  <Card title="Agent Configuration" icon="sliders" href="/guides/agents/agent-configuration">
    Adjust settings and re-publish
  </Card>

  <Card title="Testing & Chat" icon="messages" href="/guides/agents/testing-chat">
    Debug issues found in production
  </Card>

  <Card title="Tools & Connectors" icon="plug" href="/guides/agents/tools-connectors">
    Add more capabilities to your deployed agent
  </Card>

  <Card title="Memory & State" icon="database" href="/guides/agents/memory-state">
    Tune memory for production workloads
  </Card>
</CardGroup>
