> For the complete documentation index, see [llms.txt](https://docs.euno.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.euno.ai/setup-configuration/account-settings/local-agents.md).

# Local Agents

A local agent lets Euno reach databases that run inside your private network — without opening inbound firewall ports. The agent connects **outbound** to Euno's relay, and Euno routes source integration traffic through the agent's encrypted tunnel to your database.

{% hint style="info" %}
Local agents are currently supported for **MySQL** and **SQL Server** integrations.
{% endhint %}

## Step 1: Create a local agent in Euno

1. Navigate to **Account Settings → Local Agents**.
2. Click **+ Create agent**.
3. Enter a **name** for the agent (e.g. `my-private-network-agent`) and optionally a **description** (e.g. `Production network - US East`).
4. Save. On the confirmation screen, copy the **Agent ID** and **Agent Secret**.

{% hint style="warning" %}
The Agent Secret is shown only once. Store it securely before closing the dialog — it cannot be retrieved afterwards.
{% endhint %}

## Step 2: Deploy the agent container

### Quick test

```bash
docker run -d --restart unless-stopped \
  -e AGENT_ID=<your-agent-id> \
  -e AGENT_SECRET=<your-agent-secret> \
  eunoai/euno-local-agent:latest
```

### Persistent setup (recommended)

Create a `docker-compose.yml` file on the machine that has access to your private network:

```yaml
services:
  euno-local-agent:
    image: eunoai/euno-local-agent:latest
    environment:
      AGENT_ID: <your-agent-id>
      AGENT_SECRET: <your-agent-secret>
    restart: unless-stopped
```

Then start the agent:

```bash
docker compose up -d
```

### Environment variables

| Variable       | Required | Description                              |
| -------------- | -------- | ---------------------------------------- |
| `AGENT_ID`     | Yes      | Agent UUID from the Euno Local Agents UI |
| `AGENT_SECRET` | Yes      | Secret from agent creation (shown once)  |

## Step 3: Verify the connection

1. Go back to **Account Settings → Local Agents** and click **Refresh**.
2. The agent's status should change from **Disconnected** to **Connected**.

You can also verify by checking the container logs:

```bash
docker logs <container-name>
# Expected: agent <uuid> connected to relay
```

## Step 4: Configure a source to use the agent

When creating or editing a source (currently supported for **MySQL** and **SQL Server**), expand the **Advanced** section and select your agent from the **Local agent** dropdown. Set the hostname to your database server address as reachable from within your private network.

Click **Test & Save**. Euno will validate the connection through the agent before saving.

## Managing agents

| Action | How                                                                                                         |
| ------ | ----------------------------------------------------------------------------------------------------------- |
| Rename | Click **⋯** next to the agent → **Edit**. Change the name in the form. This does not affect the connection. |
| Stop   | Stop the agent container. The UI will show **Disconnected** after a refresh.                                |
| Delete | Click **⋯** next to the agent → **Delete**. Update any sources that used the agent before deleting.         |

{% hint style="warning" %}
Deleting an agent does not automatically update sources that were configured to use it. Those sources will fail on the next run. Open each affected source, update or clear the local agent field, and save.
{% endhint %}

## Troubleshooting

| Symptom                                                    | Fix                                                                                                                                                               |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Status stays **Disconnected** after starting the container | Check that `AGENT_ID` and `AGENT_SECRET` are correct. Inspect container logs for connection errors.                                                               |
| Source run fails with "agent not connected"                | Ensure the agent container is running. Restart it if needed, then refresh the Local Agents page to confirm the status is **Connected** before re-running.         |
| Source run fails with "agent not found"                    | The agent was deleted from Euno. Create a new agent and update the source's Advanced settings to select it.                                                       |
| Source run fails with "Failed to connect to \[database]"   | Verify that the database hostname is reachable from the machine running the agent container (not the Euno cloud). Check firewall rules and credentials.           |
| `no matching manifest for linux/arm64/v8`                  | Add `platform: linux/amd64` to your `docker-compose.yml` under the `euno-local-agent` service. This applies when running on Apple Silicon Macs for local testing. |


---

# 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://docs.euno.ai/setup-configuration/account-settings/local-agents.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.
