## What it does

Already have an AI agent you built elsewhere? You can **connect it to Madyis Hub** so it answers your customers **instead of the built-in Madyis AI**. The choice is made **inbox by inbox**: one inbox can use your external agent, another the Madyis AI.

Compatible agents and services:

- **Claude** (Anthropic)
- **OpenAI**
- **n8n**
- **Hermes**
- any **OpenAI-compatible endpoint**

## What you need

- your agent's **format**: OpenAI, Anthropic, or simple Webhook;
- the **endpoint URL** to send messages to;
- the access **key** (API key or token).

## Connect your external agent

1. Open the **AI Agents** section and select the agent to configure.
2. Go to **Settings**.
3. Open **AI Engine**.
4. Choose **My own external agent**.
5. Set the **format** (OpenAI / Anthropic / simple Webhook).
6. Enter the **endpoint URL** then the **key**.
7. Click **Test connection** to check everything works.
8. Save.

## Good to know

- If the connection test isn't green, check the URL, the key and the chosen format.
- You can switch back to the built-in Madyis AI at any time by changing the AI Engine again.