agent-canvas-environment
Work effectively inside a local Agent Canvas environment, including local agent-server auth, frontend/backend port discovery, safe workspace hygiene, and…
Skill by OpenHands
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/openhands-agent-canvas-environment
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, frontend, backend, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/agent-canvas-environment
What's inside
- Skill name
agent-canvas-environment- Description
- Work effectively inside a local Agent Canvas environment, including local agent-server auth, frontend/backend port discovery, safe workspace hygiene, and delegating work to a new local conversation through POST /api/conversations.
- License
- MIT
- Instructions
- 191 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (5)
- .claude-plugin
- .codex-plugin
- plugin.json · .plugin/
- README.md
- SKILL.md
SKILL.md (first lines)
# Agent Canvas Environment
Use this skill when running inside or alongside a local Agent Canvas stack, especially when the user asks to inspect the local backend, create or monitor local conversations, or delegate work to another local conversation.
## Core rules
- Treat the local Agent Canvas backend as an agent-server API, usually `http://localhost:8001`.
- Treat the local UI as a separate frontend, usually `http://localhost:8000`.
- Do not print session API keys. Pass them directly in `X-Session-API-Key`.
- Trust any runtime-services block or explicit user-provided host over default ports.
- Before mutating a repository, check `git status -sb`. If a worktree has unrelated changes, use a separate worktree or clone.
- When delegating, write a self-contained prompt. The new conversation does not inherit the current chat context.
## Find the session key
Use the first available value, without echoing it:
```bash
KEY="${SESSION_API_KEY:-${OH_SESSION_API_KEYS_0:-${LOCAL_BACKEND_API_KEY:-}}}"
if [ -z "$KEY" ] && [ -f "$HOME/.openhands/agent-canvas/api-key.txt" ]; then
KEY="$(tr -d '\n' < "$HOME/.openhands/agent-canvas/api-key.txt")"
fi
test -n "$KEY" || { echo "No Agent Canvas session API key found" >&2; exit 1; }
```
Validate backend access:
```bash
curl -sS -o /tmp/agent-canvas-conversations.json -w '%{http_code}\n' \
-H "X-Session-API-Key: $KEY" \
http://localhost:8001/api/conversations/search
```
HTTP `200` means the backend and key work.
## Delegate to a local conversation
Use `POST /api/conversations` with:
- the **encrypted** `agent_settings` from `GET /api/settings` (with `X-Expose-Secrets: encrypted`), which carries the real Fernet-encrypted `llm.api_key`, the existing `agent_context`, and the agent kind — so you never handle plaintext credentials and you don't drop the caller's skill/context config
- `secrets_encrypted: true` so the agent-server decrypts that `api_key` server-side
- the exec tool set merged into `agent_settings.tools` (and `task_tool_set` when you enable sub-agents)
- `tool_module_qualnames` for any non-SDK tools (e.g. `canvas_ui`)
- `agent_context.load_public_skills`/`load_user_skills`/`load_project_skills` set to `true` if the delegated agent should inherit bundled/user/project skills
- a fresh absolute workspace directory
- `initial_message.run: true`
- `worktree: false` when the workspace is already isolated
### Credential handling — important
`GET /api/settings` (default) **masks** every credential — `llm.api_key` comes back as the literal string `"**********"`. If you forward that verbatim, the new conversation authenticates with the placeholder and fails immediately with `LLMAuthenticationError` (`You must provide an API key`).
The supported way to obtain forwardable credentials is the **`X-Expose-Secrets: encrypted`** request header. With it, `/api/settings` returns the real `llm.api_key` as a **Fernet-encrypted token** (starts with `gAAAAA`) intended to be sent back to the server with `secrets_encrypted: true`; the agent-server's `decrypt_incoming_llm_secrets` decrypts it server-side. Do **not** read `~/.openhands/profiles/*.json` directly — that is brittle (the caller may not share the backend's home directory, `active_profile` may be null, the profile store may live elsewhere).
Two working approaches:
1. **`agent_profile_id` (simplest, but no tools)** — send only `agent_profile_id: "<uuid>"` (from `GET /api/agent-profiles` → the profile whose `id` equals `active_agent_profile_id` from `/api/settings`). The server resolves the LLM key + agent kind from the profile. Mutually exclusive with `agent`/`agent_settings`, and the `openhands` agent-profile schema forbids `tools`/`include_default_tools`, so the conversation gets **zero exec tools** this way. Use only when the task needs no tools.
2. **Encrypted `agent_settings` (full tools, preserves context)** — start from the encrypted `/api/settings` `agent_settings` payload, drop `schema_version` and `mcp_config` (to avoid MCP-connection failures at creation time), merge in the exec tool set and `load_*_skills` flags, and send with `secrets_encrypted: true`. This is the pattern for real delegated work.
Template (full tools, preserves context):
```bash
set -euo pipefail
BASE="${AGENT_CANVAS_BACKEND:-http://localhost:8001}"
KEY="${SESSION_API_KEY:-${OH_SESSION_API_KEYS_0:-${LOCAL_BACKEND_API_KEY:-}}}"
if [ -z "$KEY" ] && [ -f "$HOME/.openhands/agent-canvas/api-key.txt" ]; then
KEY="$(tr -d '\n' < "$HOME/.openhands/agent-canvas/api-key.txt")"
fi
test -n "$KEY" || { echo "No Agent Canvas session API key found" >&2; exit 1; }
WORKDIR="${WORKDIR:-$HOME/workspace/delegated/$(date +%Y%m%d-%H%M%S)}"
mkdir -p "$WORKDIR"
# Fetch the agent_settings with ENCRYPTED secrets exposed. This returns the
# real llm.api_key as a Fernet token (gAAAAA...) plus the existing
# agent_context/agent kind, so we preserve the caller's config and never
# handle plaintext credentials.
SETTINGS_JSON="$(curl -sS -H "X-Session-API-Key: $KEY" -H "X-Expose-Secrets: encrypted" "$BASE/api/settings")"
PROMPT='Write a complete, task-specific prompt here. Include repo, branch, constraints, validation, and expected report.'
PAYLOAD="$(jq -n --argjson settings "$SETTINGS_JSON" --arg prompt "$PROMPT" --arg workdir "$WORKDIR" '
# Start from the encrypted agent_settings so llm.api_key (Fernet token),
# agent_kind, and agent_context are preserved. Drop schema_version and
# mcp_config (MCP servers can fail to connect at creation time; the profile
# can be re-resolved later if needed).
def base_agent_settings:
($settings.agent_settings // {})
| del(.schema_version)
| del(.mcp_config);
# Merge the exec tool set into the existing tools list. Include task_tool_set
# when sub-agents are enabled — enable_sub_agents alone does not expose the
# delegation tool; Agent Canvas adds task_tool_set for that.
def with_tools:
.tools = ((.tools // []) + [
{name: "terminal", params: {}},
{name: "file_editor", params: {}},
{name: "task_tracker", params: {}},
{name: "browser_tool_set", params: {}},
{name: "canvas_ui", params: {}}
] + (if .enable_sub_agents then [{name: "task_tool_set", params: {}}] else [] end)
| unique_by(.name));
# Preserve the existing agent_context and enable skill loading for the
# delegated agent (defaults are false, so set these explicitly).
def with_skill_loading:
.agent_context = ((.agent_context // {}) + {
load_public_skills: true,
load_user_skills: true,
load_project_skills: true
});
($settings.conversation_settings // {}) as $conv |
{
secrets_encrypted: true,
agent_settings: (base_agent_settings | with_tools | with_skill_loading),From OpenHands/extensions, MIT.
More from OpenHands/extensions
- 0.721score
deno
OpenHands
If the project uses deno, use this skill.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
discord
OpenHands
Build and automate Discord integrations (bots, webhooks, slash commands, and REST API workflows).
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
code-simplifier
OpenHands
Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
datadog
OpenHands
Query and analyze Datadog logs, metrics, APM traces, and monitors using the Datadog API.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
add-skill
OpenHands
Import an existing skill from a GitHub repository URL into the current workspace.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
add-javadoc
OpenHands
Add comprehensive JavaDoc documentation to Java classes and methods.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
runtime-api-configs
OpenHands
Manage warm sandbox pools on OpenHands Enterprise by driving the runtime-api admin endpoints (list, save, delete warm runtime configurations) from a Python CLI.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
agent-creator
OpenHands
Create file-based sub-agents as Markdown files following the OpenHands SDK format.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
openhands
OpenHands
Unified OpenHands plugin — bundles the OpenHands Cloud CLI, Cloud REST API (openhands-api), Automations (openhands-automation), and Software Agent SDK…
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
agent-readiness-report
OpenHands
Evaluate how well a codebase supports autonomous AI-assisted development.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
release-notes
OpenHands
Generate consistent, well-structured release notes from git history.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
github
OpenHands
Interact with GitHub repositories, pull requests, issues, and workflows using the GITHUB_TOKEN environment variable and GitHub CLI.
SkillAFreshness: A★ 173Claude Code +9
Signals
- Stars
- 173
- Forks
- 118
- Open issues
- 84
- Last commit (this folder)
- Jun 27, 2026 (4 months ago)
- Last release
- Oct 23, 2026 (6 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/OpenHands/extensions
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from OpenHands
- 0.721score
release-notes
OpenHands
Generate consistent, well-structured release notes from git history.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
add-javadoc
OpenHands
Add comprehensive JavaDoc documentation to Java classes and methods.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
agent-readiness-report
OpenHands
Evaluate how well a codebase supports autonomous AI-assisted development.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
openhands
OpenHands
Unified OpenHands plugin — bundles the OpenHands Cloud CLI, Cloud REST API (openhands-api), Automations (openhands-automation), and Software Agent SDK…
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
runtime-api-configs
OpenHands
Manage warm sandbox pools on OpenHands Enterprise by driving the runtime-api admin endpoints (list, save, delete warm runtime configurations) from a Python CLI.
SkillAFreshness: A★ 173Claude Code +9 - 0.721score
add-skill
OpenHands
Import an existing skill from a GitHub repository URL into the current workspace.
SkillAFreshness: A★ 173Claude Code +9
Cite this page
agent-canvas-environment skill. Agent Mart. https://agentmart.dev/skills/openhands-agent-canvas-environment (last updated 2026-10-24)