> For the complete documentation index, see [llms.txt](https://gdplabs.gitbook.io/glchat/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gdplabs.gitbook.io/glchat/organization-admin/how-to-guides/ai-agent.md).

# AI Agent

In this tab, you can add and manage **agents** that can later be included in GLChat project.

<figure><img src="/files/6ZNkj1WZd7UqDJDZLfkc" alt=""><figcaption></figcaption></figure>

Select the type of agent you want to use from the available options on the **Agent** page:

1. **Built-In Agents:** Use ready-made agents provided by the platform, optimized for common tasks and requiring minimal setup.
2. **Custom Agents:** Create your own agent from scratch using a setup form or **GL Flow**, with full control over its behavior, prompts, and connected resources.

***

## Add New Agent

### Add Remote Agent

A **Remote Agent** is hosted outside the platform and connects via an API endpoint.\
Use this option to integrate agents managed in external environments.

<figure><img src="/files/wWJ7l8NtdFrXKCQhCIKb" alt=""><figcaption></figcaption></figure>

To add a remote agent:

1. Click the **arrow icon** next to **New Agent**.
2. From the dropdown menu, select **Add Remote Agent**.

This opens the **Remote A2A Agent Configuration** page, where you can set up your remote connection.

<figure><img src="/files/NfFFQxPJrIYSSnugQ3UX" alt=""><figcaption></figcaption></figure>

#### **Remote A2A Configuration Fields**

1. **Remote A2A Agent Icon**\
   Enable or disable the display of agent-specific icons in Agent-to-Agent (A2A) conversations.
2. **Remote A2A Agent Display Name**\
   Enter a descriptive name for your remote agent to help identify it in the agent list.
3. **Chat History Limit**\
   Define how many previous messages the agent can use as conversation context.
4. **Ignore PII**\
   Determine whether the agent should ignore or handle Personally Identifiable Information (PII):
   1. **Yes** – Skip processing or storing PII.
   2. **No** – Allow handling of PII.
5. **Remote A2A Agent URL**\
   Enter the API endpoint URL of the remote agent.
6. **Authentication Type**\
   Select the authentication method for the A2A agent.
   1. OAuth - The agent authenticates using an OAuth provider and can access resources based on the permissions granted during sign-in.
   2. No Auth - No authentication is required. The agent will not use OAuth credentials when interacting with connected services
7. **OAuth Providers**\
   Select OAuth provider that the agent is authorized to use for authentication.The agent can only access resources and services associated with the selected providers. **Any provider not configured here will be unavailable to the agent.**

#### **A2A Agent Card Information**

After configuration, the **A2A Agent Card Information** section will display:

1. **Agent Name** – The name of the remote agent.
2. **Version** – The version number of the agent.
3. **Description** – A short summary of the agent’s functionality.

Once verified, click **Save** to add your remote agent.

On this page, you can configure the details of your Remote Agent.

1. Remote A2A Agent Display Name:\
   Enter a clear and descriptive display name for your Remote Agent. This helps you identify the agent in the list.
2. Remote A2A Agent URL:\
   Enter the URL of the Remote Agent you want to connect. This URL should point to the agent’s accessible endpoint.
3. Click the Get Info button.\
   The system will automatically fetch the agent’s information based on the URL you provided.

After fetching, the **A2A Agent Card Information** section will display:

1. **Agent Name**: The name of the Remote Agent.
2. **Version**: The agent’s version number.
3. **Description**: A short description of what this agent does.

Once verified, click the "**Save"** button to add the Remote Agent.

### Add GLFlow Agent

A **GL Flow Agent** is built and managed using the Langflow visual editor. Langflow enables you to create agent workflows through a drag-and-drop interface, making it easy to design, test, and manage agent logic without writing code.

GL Flow is adapted from Langflow and customized for GDP Labs’ internal ecosystem. It uses GL SDK components as the main building blocks, so the flows created in GL Flow can follow the same patterns used by engineering teams in production.

<figure><img src="/files/wWJ7l8NtdFrXKCQhCIKb" alt=""><figcaption></figcaption></figure>

#### Step-by-step <a href="#step-by-step" id="step-by-step"></a>

{% stepper %}
{% step %}
**Add New Agent from Admin Dashboard**

From the GLChat Admin Dashboard, go to **`AI Agent`** → **`Agent`** → Click **`Add GL Flow Agent`**(top right). You will be redirected to the GL Flow Workspace.
{% endstep %}

{% step %}
**Click "New Flow"**

Once you entered the GL Flow Workspace, you can click "New Flow" to create a new agent. You will be redirected to the blank canvas.

<div data-with-frame="true"><figure><img src="/files/CcjeFXj3YYutLew4c4Uh" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Let's start building. First, add a Chat Input.**

In the left sidebar under **Input & Output**, drag **`Chat Input`** onto the canvas. This is the entry point — it captures whatever the user types and passes it into the flow.
{% endstep %}

{% step %}
**Add an Agent Orchestrator**

In the sidebar under **GL Components**, drag **`Agent Orchestrator`** onto the canvas, to the right of Chat Input.

Connect the two: click and drag from the **output port** of Chat Input to the **Input** port on the Agent node. You should see a line appear between them.

<div data-with-frame="true"><figure><img src="/files/i8t2ZFQWbo4e7AH4CYON" alt="" width="280"><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Configure the Agent Orchestrator**

Click on the AIP node to open its fields and fill in the following:

<table><thead><tr><th width="116">Field</th><th>What to enter</th></tr></thead><tbody><tr><td><strong>Agent Name</strong></td><td>A unique identifier with no spaces, e.g. <code>my-web-search-agent</code></td></tr><tr><td><strong>Version</strong></td><td><code>1.0.0</code></td></tr><tr><td><strong>Description</strong></td><td>A short description, e.g. <code>An agent that answers questions using live web search</code></td></tr><tr><td><strong>Agent Instructions</strong></td><td>Your system prompt. For a web search agent, try: <em>"You are a helpful assistant with access to a web search tool. When answering questions, use the web search tool to find current and accurate information. Summarise your findings clearly."</em></td></tr><tr><td><strong>Model</strong></td><td>Select a model from the dropdown (e.g. <code>openai/gpt-5.5</code>)</td></tr><tr><td><strong>Enable Memory</strong></td><td>Leave off for now</td></tr><tr><td><strong>Planning</strong></td><td>Leave off for now</td></tr></tbody></table>
{% endstep %}

{% step %}
**Add a Tool Selector**

In the sidebar under **GL Components**, drag **`Tools`** onto the canvas, to the left of the Agent Orchestrator.

Configure it:

<table><thead><tr><th width="186">Field</th><th>What to enter</th></tr></thead><tbody><tr><td><strong>Platform URL</strong></td><td>The AIP platform URL, e.g. <code>https://aip.glair.ai/</code> — ask the GL Flow team if you don't have this</td></tr><tr><td><strong>Platform Key</strong></td><td>Your AIP API Key — ask the GL Flow team if you don't have this</td></tr><tr><td><strong>Select Tool</strong></td><td>Click the dropdown and select <strong><code>web_search_tool</code></strong></td></tr><tr><td><strong>Human-in-the-Loop (HITL)</strong></td><td>Leave off unless you want manual approval before each web search</td></tr><tr><td><strong>Tool Config</strong></td><td>Click <strong><code>Edit Tool Configs</code></strong> if the tool requires additional configuration. For <code>web_search_tool</code> this can typically be left as-is.</td></tr></tbody></table>

{% hint style="warning" %}
**AIP API URL and AIP API Key** are currently visible fields. These will be hidden in a future release and injected automatically from your session. For now, you need to fill them in manually.
{% endhint %}
{% endstep %}

{% step %}
**Wire the Tool into the Agent**

Connect the Tool to the Agent Orchestrator: drag from the **Selected Tool** output port onto the Tools input port on the Agent Orchestrator.

<div data-with-frame="true"><figure><img src="/files/II1GdBnqZelffseqIbQX" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Add a Chat Output**

In the sidebar under **Input & Output**, drag **`Chat Output`** onto the canvas, to the right of the Agent Orchestrator.

Connect it: drag from the **Response** output port on the Agent Orchestrator to the input port of Chat Output.

Your canvas should now look like this:

<div data-with-frame="true"><figure><img src="/files/bnsj3JRMyEFx0Hyjoh3b" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Test in the Playground**

Click the **`Playground`** button at the bottom of the canvas. Type a question that requires up-to-date information — for example: *"What are the latest AI news this week?"*

Hit send. Your agent will call the web search tool and return a response based on live search results.

<div data-with-frame="true"><figure><img src="/files/bwy7eGYpTyTSEKRneBId" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}
**Run the Agent Orchestrator to publish**

Once you're happy with how the agent behaves, it's time to publish it to GLChat.

Click the **▶ Run** button on the **Agent Orchestrator** node directly. This deploys the agent to the AIP platform and registers it automatically. After a successful run, the agent will appear in your **GLChat Agent List**. From there you can create a project with it and start using it as a chatbot — just like any other GLChat agent.

{% hint style="info" %}
No separate export or publish step needed. Running the AIP Agent node is all it takes to deploy. If the agent doesn't appear in GLChat after running, please contact the GL Flow Team.
{% endhint %}
{% endstep %}
{% endstepper %}

For further details, please refer to ["Building Agents with GL Flow" on GL Flow Gitbook](https://gdplabs.gitbook.io/gl-flow/how-to-guides/building-agents-with-gl-flow).

{% hint style="info" %}
After creating an agent, it will not automatically appear to end-users.\
To make the agent available, create a **Project** and include the agent in its configuration (see [Create New Project ](/glchat/organization-admin/how-to-guides/project.md#create-new-application)section).
{% endhint %}

***

## **View and Edit Agent Details**

To view or modify an agent's configuration, select **View** or **Edit**. When editing an agent, make the necessary changes and click **Save** to apply them, or **Cancel** to discard your changes.

<figure><img src="/files/eYNAKNuuKJG0kQ017MbF" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The display and available configuration fields may vary depending on the **type of agent** you select (Built-In, Custom, GL Flow, or Remote).
{% endhint %}

***

## **Search Agent**

Use the **Search** field to quickly locate an agent by entering all or part of its name.

<figure><img src="/files/bECGgocVsQzR07s15vy7" alt=""><figcaption></figcaption></figure>

***

## **Delete Agent**

To delete an agent, select **Delete**. A confirmation pop-up will appear — click **Delete** to confirm or **Cancel** to abort the action.

<figure><img src="/files/rf2vf5sbPEigMq87Khp3" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
You cannot delete an agent that still has assigned projects.\
Remove all assigned agent first before attempting deletion.
{% endhint %}

***

## **HITL (Human in the Loop) Setup**

Administrators can configure **HITL (Human-in-the-Loop)** behavior for each tool when creating or editing an agent. This ensures that sensitive operations always include a human approval step before execution.

#### Setup Instructions

<figure><img src="/files/rIRlrLhzBhL25HYicKww" alt=""><figcaption></figcaption></figure>

1. Navigate to **Agent Management → Create or Edit Agent**.
2. Select the **tool** you want to attach HITL to.
3. Enable **Need Approval** to require manual confirmation before the tool executes.
4. Set the **Timeout Duration (in seconds)** — this defines how long the system waits for approval before it times out.
   * Default value: **300 seconds**
   * Timeout value is applied during runtime.
5. Click **Save** to confirm and apply the HITL configuration.
