Prerequisites
- Docker installed and running (Docker Desktop on macOS/Windows, or Docker Engine on Linux)
- Agent Canvas installed locally (if connecting from another instance) — see Setup
Run the Official Image
Mount a persistence directory for settings, secrets, and conversation history, and a projects directory for workspace access.- macOS / Linux
- Windows (PowerShell)
http://localhost:8000. The agent can access any project under the mounted /projects path.
Environment Variables
Configuration is passed via-e flags on docker run:
| Variable | Purpose |
|---|---|
PORT | Ingress port inside the container (default 8000). Map it with -p <host>:<PORT>. |
LOCAL_BACKEND_API_KEY | API key for the Agent Canvas backend API. Auto-generated and persisted if not set. |
OH_SECRET_KEY | Secret used to protect stored settings and secrets. |
LMNR_PROJECT_API_KEY | Enables built-in SDK tracing to Laminar. |
OTEL_EXPORTER_OTLP_TRACES_ENDPOINT | Enables built-in SDK trace export to an OTLP-compatible backend such as Jaeger, Honeycomb, Datadog, New Relic, or Grafana Tempo. |
OTEL_EXPORTER_OTLP_TRACES_PROTOCOL | OTLP transport protocol, usually http/protobuf or grpc. |
OTEL_EXPORTER_OTLP_TRACES_HEADERS | Optional authentication headers for your OTLP backend. |
View Backend Conversations and Events
Agent Canvas includes a backend API for conversations and events. This is built in and uses the sameLOCAL_BACKEND_API_KEY that the UI uses. It is separate from observability tracing.
Use this API if you need to inspect conversations stored in the Docker backend, including a conversation that is not visible in the left panel.
Observability exporters do not backfill old conversations. Set up tracing before starting the conversations you want to observe.
Built-in Tracing vs. External Backends
Built into Agent Canvas Docker:- The OpenHands Agent Server runs inside the container and uses the OpenHands SDK.
- The SDK automatically emits traces when Laminar or OTEL environment variables are present.
- The backend conversation and event APIs are available behind
LOCAL_BACKEND_API_KEY.
- A Prometheus
/metricsendpoint for scraping agent execution metrics. - A Grafana connector that authenticates into Agent Canvas or makes conversations appear in the left panel.
- Hosted Laminar, Jaeger, Tempo, Prometheus, Grafana, Datadog, Honeycomb, or New Relic services. Those are external observability systems you run or subscribe to separately.
Enable SDK Tracing
The Docker image starts the OpenHands Agent Server inside the container, and the Agent Server uses the OpenHands SDK. To enable tracing for Agent Canvas conversations, pass Laminar or OpenTelemetry environment variables todocker run.
Laminar example
OTLP collector example
If your collector runs on your host machine, remember thatlocalhost inside the container means the Agent Canvas container itself. Use host.docker.internal on Docker Desktop, or add the host gateway alias on Linux.
http://jaeger:4317.
Connect from the Frontend
Start the frontend separately and point it at the container:- Click the backend switcher → Manage Backends → Add Backend.
- Fill in:
- Name — e.g.
docker-backend - Host / Base URL —
http://localhost:8000 - API Key — the
LOCAL_BACKEND_API_KEYvalue (check container logs if auto-generated)
- Name — e.g.
- Save and select it as the active backend.

