> 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/function-explorer/agents/docker-agent.md).

# Docker Agent

The Docker Agent provides the same core functionality as the Native Agent but is designed for containerized environments. It is the ideal choice for edge gateways or servers where you already manage your infrastructure using Docker.

### Key Differences

* **Containerized execution**: It runs within an isolated Docker container rather than directly on the host operating system.
* **Environment configuration**: Unlike the Native Agent, credentials are not "baked in." You must provide them via environmental variables during startup.
* **Hardware & network access**: To reach local networks, USB devices, or persist data, you use standard Docker features (like host networking or volume mounting).
* **Platform independent**: It runs on any platform that supports Docker, providing a consistent deployment model across different hardware.

### Where to get it?

Our Docker agent is available as a publicly downloadable image:

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

You can find a list of all available versions on [Docker Hub](https://hub.docker.com/r/heisenware/docker-agent).

### How to use it

Setting up the Docker Agent is straightforward. You simply need to 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 your `HW_USERNAME` and `HW_PASSWORD`, you must first add a [VRPC Integration](https://docs.heisenware.com/app-manager/overview-and-dashboard/integrations-external-clients#connecting-mqtt-and-vrpc-clients) in the App Manager.

**Example**

For an account named `my-company`, an integration with the username `agentRunner`, and the password `secret`, the command would look like this:

```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 successfully established, your console will show a confirmation screen (see below) indicating the agent is online and connected to the workspace.

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

### Persisting Data

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


---

# 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/function-explorer/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.
