#15976·OpenHands

Add OpenHands login flow for LLM setup secrets

Author: xingyaowwCreated May 13, 2026Updated Sep 17, 2026

Problem

Users configuring LLM settings in agent-canvas currently need to manually provide an OpenHands key. We should make this easier by reusing the OpenHands CLI login flow so users can authenticate with their OpenHands credentials and have the relevant OpenHands key/secrets populated automatically.

Proposal

Copy/adapt the login flow from the OpenHands/OpenHands CLI repository into OpenHands/agent-canvas, with special focus on the Setup LLM page/onboarding path.

The UI should:

  • Offer a clear "Log in with OpenHands" path on the Setup LLM page.
  • Explain that signing in with OpenHands credentials can retrieve/populate the needed OpenHands key/secrets automatically.
  • Detect when the user has already authenticated through the OpenHands CLI.
  • When existing CLI authentication is present, surface that state in the UI and tell the user they can use the existing authenticated credentials instead of creating/pasting a new key.

Suggested implementation notes

  • Review the OpenHands CLI authentication flow in OpenHands/OpenHands and reuse as much of the behavior/UX as makes sense for agent-canvas.
  • Consider where CLI auth material is stored and how agent-canvas can safely detect/read it without exposing secrets in the UI.
  • Ensure the Setup LLM/onboarding flow still supports manual key entry as a fallback.
  • Avoid logging or rendering raw secret values.

Acceptance criteria

  • Setup LLM page includes an OpenHands login option.
  • Successful login results in the required OpenHands key/secrets being available to agent-canvas without manual copy/paste.
  • If valid OpenHands CLI authentication already exists, the UI indicates that and offers to use it.
  • Manual API-key configuration remains available.
  • Sensitive token/key values are not displayed or logged.

This issue was created by an AI agent (OpenHands) on behalf of the user.