> For the complete documentation index, see [llms.txt](https://docs.heisenware.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.heisenware.com/app-builder/build-backend/agents/docker-agent.md).

# Docker Agent

The Docker Agent provides the same functionality as the [Native Agent](/app-builder/build-backend/agents/native-agent.md) but runs in an isolated Docker container. It is the right choice for edge gateways or servers where you already manage your infrastructure with Docker.

## Key differences

* **Containerized execution**: Runs in an isolated Docker container instead of directly on the host operating system.
* **Environment configuration**: Credentials are not built into an installer. You provide them as environment variables at startup.
* **Hardware and network access**: To reach local networks, USB devices, or persist data, use standard Docker features like host networking or volume mounting.
* **Platform independent**: Runs on any platform that supports Docker.

## Where to get it

The Docker Agent is available as a publicly downloadable image:

```
heisenware/docker-agent:<version>
```

Find all available versions on [Docker Hub](https://hub.docker.com/r/heisenware/docker-agent).

## How to use it

Configure the following environment variables when running the container:

```bash
docker run -it \
-e HW_DOMAIN=<account>.<workspace> \
-e HW_BROKER=mqtts://<account>.heisenware.cloud \
-e HW_USERNAME=<username> \
-e HW_PASSWORD=<password> \
-e HW_AGENT_ID=<unique-id> \
heisenware/docker-agent:v91-slim
```

### Retrieving credentials

To get `HW_USERNAME` and `HW_PASSWORD`, first add a [VRPC integration](https://github.com/heisenware/heisenware-docs/tree/master/app-manager/integrations-inbound-connections.md#vrpc-client) in the App Manager.

### Example

For an account named `my-company`, an integration with the username `agentRunner`, and the password `secret`:

```bash
docker run -it \
-e HW_DOMAIN=my-company.default \
-e HW_BROKER=mqtts://my-company.heisenware.cloud \
-e HW_USERNAME=agentRunner \
-e HW_PASSWORD=secret \
-e HW_AGENT_ID=my-agent-1 \
heisenware/docker-agent:v91-slim
```

Once the connection is established, the console shows a confirmation screen indicating the Agent is online and connected to the workspace.

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

## Persisting data

To keep your data and configurations (such as created instances) across container restarts or updates, mount the `/shared` volume to a persistent location on your host machine:

```bash
-v /path/on/host:/shared
```


---

# 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.heisenware.com/app-builder/build-backend/agents/docker-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.
