> For the complete documentation index, see [llms.txt](https://developer.emporix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.emporix.io/agentic-commerce-intelligence/agentic-intelligence/agent-library/collaboration-agent.md).

# Collaboration Agent

The Collaboration Agent is a key component designed to manage and initiate human involvement when an automated solution cannot resolve a case. It is used as a **handoff** agent, which means that a task from another agent is handed over to the Collaboration Agent, when additional non-automatic collaboration is required.

## Purpose

The primary purpose of the Collaboration Agent is to set up and manage human collaboration. Its goal is to create the right environment for humans and the Emporix Support Agent bot to work together on resolving issues.

{% hint style="danger" %}
The agent is automatically created when either the Complaint Agent or the Anti-Fraud Agent is installed. Its workflow involves strict, predefined steps, meaning customization is not available. If collaboration is needed for other types of cases, you must create a custom agent to handle the initialization.
{% endhint %}

{% hint style="info" %}
Currently, the only supported collaboration tool is Slack.
{% endhint %}

## Key benefits

The benefits of having the Collaboration Agent installed within another agent stem directly from the automated, structured workflow it executes to initialize a focused discussion space.

| Benefit                               | Description                                                                                                                                                                                                    |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Focused collaboration environment** | As the agent takes care to arrange a dedicated collaboration tool and communication channel for the specific case, this process ensures that all relevant context can be shared in a focused discussion space. |
| **Targeted participant alignment**    | The agent ensures that the right people are involved immediately to engage in solving the issue.                                                                                                               |
| **Instant context**                   | The agent passes on the context in the dedicated collaboration channel so that all the involved participants are immediately aligned on the situation at the early stage of working on a case.                 |

## How it works

The Collaboration Agent is solely triggered by a Complaint Agent or an Anti-Fraud Agent when human interaction is required. This agent is not configurable.

### Workflow

The Collaboration Agent executes the following workflow steps:

{% stepper %}
{% step %}

#### Select collaboration tool

Based on the tool specified in the Complaint Agent or Anti-Fraud Agent, the agent chooses the collaboration tool (currently limited to Slack).
{% endstep %}

{% step %}

#### Create collaboration channel

The agent creates a new Slack channel dedicated to the specific case.
{% endstep %}

{% step %}

#### Identify participants

The agent identifies the right people to be involved immediately. For example, when summoned by the Complaint Agent, it executes steps to identify participants, such as checking the order related to a complaint, retrieving associated company details, and using the **Contact Info** mixin on the Company entity to find relevant contacts.
{% endstep %}

{% step %}

#### Invite participants

It then matches company contact emails with Slack user emails and invites the matched users into the new Slack channel.
{% endstep %}

{% step %}

#### Post context message

Upon creation, the agent posts an initial message to the Slack channel. This message includes the full context of the case (for example, the customer complaint details) and recommended next actions. This step ensures participants are immediately aligned on the situation.
{% endstep %}

{% step %}

#### Create Support Agent Context instance

The agent is responsible for creating a Support Agent Context custom entity. This entity stores all essential details of the collaboration, including the tool used (currently - Slack), the Channel ID, the invited participants, the case context, and the recommended action.
{% endstep %}

{% step %}

#### Hand over task to the Support Agent

After this crucial setup phase is complete, the Support Agent takes over, facilitating the ongoing collaboration inside Slack.
{% endstep %}
{% endstepper %}

{% hint style="info" %}
All Agents operations are tracked in the **AI Logs** view. You can check the details of the requests, jobs, and sessions for monitoring and evaluation purposes. For more information, see the [AI Logs](/agentic-commerce-intelligence/agentic-intelligence/logs.md).
{% endhint %}


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.emporix.io/agentic-commerce-intelligence/agentic-intelligence/agent-library/collaboration-agent.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
