Skip to content

How to Use OpenHands Agent Canvas (2026): Install, Local Models and Coding Agents

7–10 minutes
Smiling woman with a layered bob and bangs in a dusty-pink blazer in a cosy library holding a card reading OPENHANDS, with the text OpenHands AI Coding Agent

OpenHands is a free, open source AI coding agent that can read your code, run commands, edit files and open pull requests. In 2026 it grew into Agent Canvas, a self-hosted control center where you can run the OpenHands agent, or Claude Code, Codex, Gemini CLI, Pi and OpenCode, from one browser window.

You can run it on your laptop, in Docker, on a Mac Mini or on a cloud server, and point it at a paid model API or a local model from LM Studio or Ollama.

This guide shows how to install Agent Canvas, pick the safest setup, connect a model (including a fully local one), use other agents through ACP, set up automations and fix common problems. It follows the official OpenHands README and docs as of November 2026 (Agent Canvas 1.45).

TL;DR

  • What: an open source coding agent plus Agent Canvas, a self-hosted UI for many agents.
  • Quick install: npm install -g @openhands/agent-canvas then agent-canvas (needs Node.js 24+ and uv).
  • Safer install: the Docker image, so the agent only sees your projects folder.
  • Open: http://localhost:8000 (or /canvas for Docker).
  • Local model: Settings, LLM, Advanced: openai/<model-id> plus your server’s base URL.
  • Other agents: Claude Code, Codex, Gemini CLI, Pi and OpenCode via ACP.

What OpenHands and Agent Canvas Are

  • OpenHands agent: the open source coding agent. It plans, writes code, runs tests and uses a browser.
  • Agent Canvas: the web UI and control center for starting conversations and automations.
  • Agent Server: the REST backend that actually runs agents. You can run several and switch between them.
  • Automation Server: runs agents on a schedule or in response to webhooks from Slack, GitHub, Linear and more.
  • OpenHands Cloud and Enterprise: optional paid hosting if you don’t want to run servers yourself.

Any model supported by LiteLLM can power the OpenHands agent, but the docs warn it needs a capable model to work properly.

Choose an Install Option

Option Needs Agent can access Best for
1. npm, no sandbox Node.js 24+, uv Your whole filesystem Quick tests on a spare machine
2. Docker sandbox Docker Only your projects folder Most people
3. Multiple Docker sandboxes Node.js 24+, uv, Docker One container per conversation Several agents at once
4. From source Node.js 24+, npm 11.12.1, uv Your whole filesystem Contributors

The project recommends a cloud server for the most powerful setup, because agents keep running when your laptop is closed. Its self-hosting guide covers security hardening.

Install With npm (No Sandbox)

The README warns that this option gives the agent full access to your filesystem, so use it on a machine you’re comfortable with.

  1. Install Node.js 24 or later and uv (the Python tool runner).
  2. Install Agent Canvas:
    npm install -g @openhands/agent-canvas
  3. Start it:
    agent-canvas
  4. Open http://localhost:8000 and follow the onboarding steps.
  5. Split parts if needed: agent-canvas --frontend-only or agent-canvas --backend-only.

For per-conversation containers, start it with OH_CONVERSATION_RUNTIME=docker agent-canvas while Docker is running.

Install With Docker (Sandboxed)

  1. Install Docker Desktop (Mac or Windows) or Docker Engine (Linux). Windows users can follow the official PowerShell quickstart in the repo.
  2. Make a projects folder:
    export PROJECTS_PATH="$HOME/projects"
    mkdir -p "$PROJECTS_PATH"
  3. Start Agent Canvas:
    docker run -it --rm \
      -p 127.0.0.1:8000:8000 \
      -e AGENT_CANVAS_ALLOW_LAN_SESSION_KEY=true \
      -v openhands-state:/home/openhands/.openhands \
      -v "${PROJECTS_PATH}:/projects" \
      ghcr.io/openhands/agent-canvas:1.45.0
  4. Open http://localhost:8000/canvas.
  5. Keep your settings by reusing the openhands-state volume next time.

The agent can access any project under PROJECTS_PATH, and nothing else. On Linux Docker Engine, user ID 10001 inside the container needs read and write access to that folder. For auto-restart after a crash, replace --rm with --restart unless-stopped.

Connect a Model

You have Where to set it
An Anthropic, OpenAI, Google or other API key Settings, LLM, Basic
An OpenHands LLM key Settings, LLM, Basic
A local OpenAI-compatible server Settings, LLM, Advanced
A LiteLLM proxy Settings, LLM, Advanced
A Claude Code, Codex or Gemini CLI login Settings, Agent (ACP)
  1. Open Settings, LLM.
  2. Choose the provider and model, then paste your API key.
  3. Save. Each save creates an LLM profile, up to 10 per account.
  4. Start a new conversation and send a short message to check it works.

Profiles let you switch models mid-conversation, for example a cheap model for exploring and a stronger one for hard fixes. A Provider Connection stores one API key for several profiles, and a Model Router can pick the right profile for each task. Turn on memory condensation to summarize long histories and save tokens.

Use a Local Model (LM Studio or Ollama)

As of May 2026 the docs recommend Qwen3.6-35B-A3B as the first local model to try. It needs a GPU with at least 24 GB of VRAM for quantized versions, or an Apple Silicon Mac with 64 GB of unified memory.

  1. Load the model in LM Studio with a context length of at least 22,000 tokens (32,768 recommended) and Flash Attention on.
  2. Start the LM Studio server and note the model API identifier. On Linux with Docker, enable Serve on Local Network.
  3. In OpenHands, open Settings, LLM and switch to Advanced.
  4. Custom Model: openai/qwen/qwen3.6-35b-a3b (your model ID with openai/ in front).
  5. Base URL: http://host.docker.internal:1234/v1 if OpenHands runs in Docker, or http://127.0.0.1:1234/v1 if not.
  6. API Key: any placeholder, such as local-llm. Save and test.

Using Ollama instead? The docs warn the default 4,096-token context is far too small. Start it with a bigger context:

OLLAMA_CONTEXT_LENGTH=32768 OLLAMA_HOST=0.0.0.0:11434 ollama serve
ollama pull qwen3.6:35b-a3b

Then use base URL http://host.docker.internal:11434/v1 and model openai/qwen3.6:35b-a3b. New to these servers? See our LM Studio guide or Ollama in Docker guide.

Run Claude Code, Codex or Gemini CLI Inside Canvas

Agent Canvas can drive other coding agents through the Agent Client Protocol (ACP). The Agent Server launches each agent’s own CLI and passes your messages to it.

Agent Login it can reuse API key option
Claude Code Claude Pro/Max login ANTHROPIC_API_KEY
Codex ChatGPT login (codex login) OPENAI_API_KEY
Gemini CLI Google login GEMINI_API_KEY
Pi Login saved by pi ANTHROPIC_API_KEY
OpenCode opencode auth login OPENCODE_API_KEY

Pick the agent in the Choose your agent onboarding step, or later under Settings, Agent. If the CLI is already signed in on the same machine, Canvas reuses that login.

Docker backends have no host login, so you paste the credential (such as CLAUDE_CODE_OAUTH_TOKEN) instead. Pi and OpenCode only run on local or self-hosted backends.

Automations and Backends

  • Automations: run agents on a schedule or on webhook events, for example daily dependency updates or splitting GitHub issues into tasks.
  • Integrations: Slack, GitHub, Linear, Notion and Datadog are named in the docs.
  • Multiple backends: keep a shared team Agent Server for code review and a personal one on your laptop, and switch between them in the same UI.
  • Per-backend agent choice: switching backends can switch which agent runs.

Security Tips

  • Prefer Docker so the agent can’t touch files outside your projects folder.
  • Keep it on loopback. Local listeners bind to 127.0.0.1 by default; only use --host 0.0.0.0 if you know why.
  • Don’t publish Docker on a LAN or public IP without the hardening steps in SELF_HOSTING.md.
  • Use a separate workspace away from ~/.openhands, SSH keys and other secrets.
  • Review every pull request the agent opens before merging.

Troubleshooting

Problem Likely cause Fix
agent-canvas fails to start Old Node.js or missing uv Install Node.js 24+ and uv, then reinstall
Permission denied in Docker (Linux) UID 10001 can’t access the folder Fix ownership or ACLs; on SELinux add :z to the mount
502 errors or container exits Agent Server stopped answering Check logs; use --restart unless-stopped
Can’t reach local model from Docker Server bound to 127.0.0.1 Use host.docker.internal and enable LAN serving in LM Studio
Agent acts like a chatbot, no tools Weak model or tiny context Use a stronger model and 22k+ context
“Model not found” Wrong model ID Match openai/ plus the exact ID from /v1/models
Profile won’t save Validation failed Check the key, model name and base URL shown in the error
Pi says “Authentication required” No credential Log in with pi or add a key

Having trouble with the agents themselves? See our Claude Code not working fix and Codex not working fix.

FAQ

Is OpenHands free?

Yes. It’s open source and free to self-host. You pay only for the model API you use, or nothing with a local model. OpenHands Cloud is a paid option.

What is Agent Canvas?

The self-hosted control center for OpenHands. It runs the OpenHands agent and other ACP agents across local, Docker, VM and cloud backends.

Can OpenHands run fully offline with a local model?

Yes, with LM Studio, Ollama, vLLM or SGLang. Use a strong coding model with at least 22k tokens of context.

Which local model works best with OpenHands?

The docs recommend Qwen3.6-35B-A3B as the first local model to try.

Can I use my Claude Pro or ChatGPT subscription?

Yes, through ACP. Claude Code and Codex can reuse their existing logins on the same machine.

What port does Agent Canvas use?

8000. The Docker image serves the UI at /canvas.

Is it safe to let OpenHands edit my code?

Use the Docker sandbox, a separate projects folder and Git, and review changes before merging.

Sources

Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Smiling woman with a layered bob and bangs in a dusty-pink blazer in a cosy library holding a card reading OPENHANDS, with the text OpenHands AI Coding Agent