Rohit Malhotraandopenhands e6e61b0fa6 refactor(e2e): drive mock-LLM test interactions through the UI (#1222)
Replace direct API calls for seeding/configuring state in mock-LLM E2E
tests with UI-driven interactions wherever possible, ensuring downstream
API calls are covered by the test.

Changes:

- mock-llm-profile-management.spec.ts: All three scenarios (active
  profile deletion, same-model identity, litellm_proxy base_url
  preservation) now create and activate profiles through the Settings →
  LLM Profiles UI instead of raw POST/activate API calls. Cleanup in
  afterAll uses the UI delete flow via exported deleteProfileIfExists.

- mock-llm-model-switch.spec.ts: The switch-target profile B is now
  created through the Settings UI (createProfileViaUI) instead of a
  raw POST to /api/profiles. Cleanup uses UI-driven deletion.

- mock-llm-skills.spec.ts: Replaced the inlined configureMockLLM()
  helper (which did a raw PATCH to /api/settings) with the UI-driven
  ensureMockLLMProfile(page) that creates and activates the profile
  through the Settings screen.

- mock-llm-acp-agent.spec.ts: afterAll cleanup now resets agent type
  back to OpenHands via the Settings → Agent UI (resetToOpenHandsAgentViaUI)
  instead of a raw PATCH to /api/settings. The local selectDropdownOption
  is removed in favor of the shared export from mock-llm-helpers.

- mock-llm-conversation.spec.ts: Removed the redundant API pre-check
  in step 3 that verified the profile was active via GET /api/profiles.
  Steps 1+2 already verified this through the UI (Active badge check).

- mock-llm-helpers.ts:
  - Extracted createProfileViaUI() from ensureMockLLMProfile() as a
    standalone exported helper for tests that need to create profiles
    without activating them.
  - Exported deleteProfileIfExists() and activateProfileViaUI() so
    tests can compose profile lifecycle operations through the UI.
  - Added selectDropdownOption() (consolidated from ACP spec's local copy).
  - Added resetToOpenHandsAgentViaUI() for UI-driven agent type reset.
  - Marked the API-based resetToOpenHandsAgent() as @deprecated.

Co-authored-by: openhands <openhands@all-hands.dev>
2026-06-08 15:50:50 +00:00
2026-04-24 17:33:22 -04:00

agent-canvas

Warning

This project is in the Beta phase. It may be vibecoded, untested, or out of date. OpenHands takes no responsibility for the code or its support. Learn more.

Project Status: Beta

OpenHands is a platform for orchestrating coding agents across different environments. You can:

  • ⌨️ prompt agents manually
  • 🕐 run agents on a schedule
  • ⚡ trigger agents automatically — e.g. from Slack, GitHub, or Datadog.

Agents can run anywhere:

  • 🧑‍💻 on your laptop
  • 🖥️ on a remote virtual machine
  • ☁️ in our hosted cloud
  • 🏢 or inside your company’s infrastructure

The same Agent Canvas frontend can swap between each of these environments, so you can see everything in one place.

OpenHands works with any agent harness (e.g. Claude Code, Codex) or connect directly to an LLM (e.g. Anthropic, OpenAI, Gemini, Mistral, Minimax, Kimi).

If you have questions or feedback, please open a GitHub issue or join the #proj-agent-canvas channel in Slack.

Screenshot 2026-05-11 at 10 13 19 AM

Project ownership and support

  • Current status: Beta.
  • Support channel: #proj-agent-canvas.
  • Support level: Best effort while the project remains in Beta.

Quickstart

You can install OpenHands to run agents on any machine: on your laptop, on a dedicated computer like a Mac Mini, or on a server in the cloud.

The most powerful way to run OpenHands is on a server in the cloud. This allows your agents to continue running even when your laptop is shut, and makes it easier to trigger your agents through third-party services like Slack, GitHub, and Datadog. See SELF_HOSTING.md for details, especially with respect to security hardening.

Notably, you can run the backend in multiple different environments, and switch between them from the same Agent Canvas frontend. E.g. you can share an Agent Server with your team for agents doing code review and dependency updates, then have your personal agents running on your laptop.

Option 1: Without a Sandbox

Warning

This runs the agent-server directly on the machine you're installing on — the agent will have full access to your filesystem!

Prerequisites: Node.js 22.12.x or later, uv

npm install -g @openhands/agent-canvas
agent-canvas

The agent-canvas command starts the full local stack by default. You can also split it when you want to run pieces separately:

agent-canvas --frontend-only  # static frontend + ingress only
agent-canvas --backend-only   # agent server + automation backend + ingress only

Option 2: With a Docker Sandbox

Prerequisites:

  • Docker: Docker Desktop on macOS/Windows, or Docker Engine/Docker Desktop on Linux.
  • A host directory for PROJECTS_PATH containing the project folders you want the agent to access. Create it before starting the container.

macOS / Linux:

export PROJECTS_PATH="$HOME/projects"  # directory containing your project folders
mkdir -p "$PROJECTS_PATH" "$HOME/.openhands"

docker run -it --rm \
  -p 8000:8000 \
  -v "$HOME/.openhands:/home/openhands/.openhands" \
  -v "${PROJECTS_PATH}:/projects" \
  ghcr.io/openhands/agent-canvas:1.0.0-rc.3

Windows (PowerShell / Windows Terminal): See README.windows.md for the equivalent commands.

The agent will be able to access any project under PROJECTS_PATH.

Option 3: From Source

Warning

This runs the agent-server directly on the machine you're installing on — the agent will have full access to your filesystem!

Prerequisites: Node.js 22.12.x or later, npm, uv (for running the agent server via uvx)

git clone https://github.com/OpenHands/agent-canvas.git
cd agent-canvas
npm install
npm run dev

Access the UI at http://localhost:8000. You can add additional backends directly from the UI.

Architecture

Agent Canvas is powered by the OpenHands Agent Server, a REST API for running multiple agents on a single machine. Each Agent Server runs on a single host/port; the Agent Canvas can connect to multiple Agent Servers and easily flip between them.

You can run an Agent Server anywhere:

  • Directly on your laptop (be careful!)
  • On a dedicated machine like a Mac Mini
  • On a virtual machine in the cloud
  • Inside OpenHands Cloud (our commercial offering)

The Agent Server is often paired with an Automation Server, which lets you set up agents that run on a schedule or in response to events.

image

More documentation

S
Languages
TypeScript 93.7%
JavaScript 4.7%
Python 0.9%
Shell 0.3%
CSS 0.2%
Other 0.1%