> For the complete documentation index, see [llms.txt](https://docs.uptiq.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.uptiq.ai/platform/console/agent-builder/deploy/agent-integration.md). Agents can also search and read this documentation through its [MCP server](https://docs.uptiq.ai/~gitbook/mcp).

# Integrate Agent

Embed, call, or drive your agent from your own applications.

If you want people to use this agent outside the platform — in your own app, product, or website — set it up here. Pick **Agent API** to call it from your backend, or **Embedded Chat** to drop a ready-made chat widget into your site. Find it under **Agent Config → Integrate Agent**, under *Credentials & access*; it opens as a side panel with two tabs, **Embedded Chat** and **Agent API**.

<figure><img src="https://1326225582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0qmgQjJ5aArDTj2ACFHG%2Fuploads%2Fgit-blob-75c5226d4f2af344c407ea985f812e367cda8852%2Fqore_agent-builder_manage-agent-integrate-agent-embedded-chat_rounded_shadow.png?alt=media" alt="The Integrate Agent panel on the Embedded Chat tab, at step 1 Widget key, with Use existing key and Generate new key options"><figcaption><p>Integrate Agent, with the Embedded Chat and Agent API tabs.</p></figcaption></figure>

{% hint style="info" %}
**Versions are per agent.** Read the SDK version and Executor version from your own agent's **Agent Config Panel**, and use those in your app and API calls. The values shown in the samples in the integration guides are placeholders.
{% endhint %}

{% hint style="warning" %}
**`<BASE_URL>` in every sample in the integration guides** is a placeholder for the Uptiq Platform API host your organization uses. Confirm your production host with your Uptiq contact or your platform administrator before you ship — it differs by deployment, and a sample host will not work against your environment. (The panel's own "Download as MD" export shows a real host for your environment — copy the sample from there once you've confirmed it's the right one for where you're shipping.)
{% endhint %}

## Choosing an integration

Start by matching the tab to where your agent runs and how much of the interface you want to own.

| If you want to…                                          | Use                                      | Runtime                       |
| -------------------------------------------------------- | ---------------------------------------- | ----------------------------- |
| Drop a chat onto a web page with no UI to build          | **Embedded Chat**                        | Browser (prebuilt UI)         |
| Call the agent from a backend, service, or scheduled job | **Agent API** — Client: `raw (HTTP)`     | Server-to-server (no browser) |
| Build your own custom chat UI in the browser             | **Agent API** — Client: `TypeScript SDK` | Browser (your UI)             |

**Shared prerequisites.** Both tabs connect using credentials and domain rules configured on the agent:

| Requirement            | Where                                | Applies to                                                                              |
| ---------------------- | ------------------------------------ | --------------------------------------------------------------------------------------- |
| **Widget Key**         | Agent Config → **Access & Security** | Embedded Chat, TypeScript SDK client (and optionally the API)                           |
| **API Key + Secret**   | Agent Config → **Access & Security** | Agent API, raw HTTP client (server-to-server)                                           |
| **Whitelisted domain** | Agent Config → **Access & Security** | Embedded Chat, TypeScript SDK client — add the full URL or hostname, no trailing spaces |

To obtain a **Widget Key**, open your agent's **Access & Security** page, then generate and copy the key. The [Embedded Chat](https://docs.uptiq.ai/platform/console/agent-builder/deploy/agent-integration/embedded-chat.md) wizard walks you through the same **Widget key** step. To **whitelist a domain**: on the same page, add and save your domain under **Allowed Domains**.

Set up [Access & Security](https://docs.uptiq.ai/platform/console/agent-builder/deploy/authentication.md) first. It holds both the Access Keys and the Allowed Domains list.

{% hint style="warning" %}
Wherever you supply a `user` object, it must represent a **trusted, authenticated identity** from your own auth system. This is the user signed in to your application and verified by your auth system. Never populate it from query parameters or untrusted input, which can be manipulated.
{% endhint %}

## Integration guides

Each integration option has its own page.

* [Embedded Chat](https://docs.uptiq.ai/platform/console/agent-builder/deploy/agent-integration/embedded-chat.md): Add the chat widget to your own page with a widget key, allowed domains, installation, variants, props, theming and examples
* [Agent API](https://docs.uptiq.ai/platform/console/agent-builder/deploy/agent-integration/agent-api.md): Call your agent over HTTP with authentication, triggers, sub-agents, documents, variables, execution management, webhooks and error responses
* [TypeScript SDK client](https://docs.uptiq.ai/platform/console/agent-builder/deploy/agent-integration/typescript-sdk-client.md): Drive your agent from your own code with the headless TypeScript SDK client, its instance API, a React example and best practices

## How this relates to the agent's other settings

Whichever integration you choose, a few other settings shape how it behaves:

* [**Access & Security**](https://docs.uptiq.ai/platform/console/agent-builder/deploy/authentication.md) — the Access Keys are the credentials your Embedded Chat widget, TypeScript SDK client, or Agent API integration uses. The Allowed Domains list governs where the widget and TypeScript SDK client can run.
* [Secrets & Variables](https://docs.uptiq.ai/platform/console/agent-builder/build/secrets-and-variables.md) — the credentials and values the agent uses at runtime; the widget, SDK, and API all invoke the agent against these same configured secrets.

Tighten these before you publish embeds or share API credentials. Once a widget is live on a page, every visitor reaches the agent through whatever auth and domain rules you have set.

{% hint style="info" %}
To export the agent's full configuration as a portable package instead of running it live, see [Export Agent](https://docs.uptiq.ai/platform/console/agent-builder/deploy/export-agent.md).
{% endhint %}

## What's next

{% content-ref url="/pages/v1irXV4XnJ0eWqoIsWTv" %}
[Access & Security](https://docs.uptiq.ai/platform/console/agent-builder/deploy/authentication.md)
{% endcontent-ref %}

{% content-ref url="/pages/re2eRT4yR6XTEPkZmPWt" %}
[Authentication](https://docs.uptiq.ai/platform/console/agent-builder/deploy/authentication-1.md)
{% endcontent-ref %}

{% content-ref url="/pages/zH9Bsg8FxRdLqitlHI8J" %}
[Runtime & Versioning](https://docs.uptiq.ai/platform/console/agent-builder/build/runtime-and-versioning.md)
{% endcontent-ref %}

***

{% columns %}
{% column width="83.33333333333334%" %}

<p align="right"><em>Maintained by</em> <mark style="color:green;">Abhishek Paul</mark><br><code>AI-assisted, human-approved</code></p>
{% endcolumn %}

{% column width="16.666666666666664%" %}

<div align="left"><img src="https://1326225582-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0qmgQjJ5aArDTj2ACFHG%2Fuploads%2Fgit-blob-d034645b4f8f8ee661985f5306b60ded3289653c%2Fmaintainer-abhishek-paul.png?alt=media" alt="" width="60"></div>
{% endcolumn %}
{% endcolumns %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.uptiq.ai/platform/console/agent-builder/deploy/agent-integration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
