Skip to content

feat(sdk): let Agent Profiles select public skills, read them locally and use the global critic key - #5981

Merged
simonrosenberg merged 3 commits into
mainfrom
agent-profile-public-skills
Oct 14, 2026
Merged

simonrosenberg merged 3 commits into
mainfrom
agent-profile-public-skills

Conversation

@simonrosenberg

@simonrosenberg simonrosenberg commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

HUMAN:

Needed so Agent Canvas can launch its default profile by id (OpenHands/OpenHands#17991). I checked it end to end on my machine with Canvas dev:minimal and the mock LLM: an inline default launch and the same profile launched by id gave the model the same skills and tools. The global critic key now also reaches profile launches.


AGENT:

Why

Agent Canvas still launches its seeded default profile from inline agent_settings, because a profile launch cannot express Canvas's skill selection (OpenHands/OpenHands#17991). Canvas allow-lists public-catalog skills and deny-lists user and project skills. A profile launch keeps the server's whole catalog minus a deny-list, and that catalog is a clone of extensions@main rather than the package Canvas ships.

Measured on main with the Canvas mock LLM: inline default gets 17 skills, and an identical profile launched by id gets 72.

Summary

  • OpenHandsAgentProfile.public_skills: null keeps every public-catalog skill, as today; [] keeps none; a list keeps only those names, and unknown names are ignored. User and project skills are unaffected, and disabled_skills still applies to everything.
  • LaunchStores.public_skill_names tells the resolver which catalog skills are public. The agent-server derives it from the same loaders as the catalog, so a user skill that shadows a public one stays a user skill. It is read only for a profile that sets public_skills. Materialize, preview and the legacy resolve_agent_profile / dry-run apply the same selection.
  • EXTENSIONS_PATH makes load_public_skills() read a local copy of the extensions repository, such as an installed @openhands/extensions package, instead of cloning it. A custom repo_url is unaffected.
  • The critic API key saved in the server's global verification settings now reaches every OpenHands profile launch through LaunchStores.critic_api_key. Before, the critic fell back to the LLM key. Profiles stay secret-free. The key is applied when the profile is resolved, so a Docker host forwards it encrypted to the conversation container. Materialize still redacts it.
  • /server_info reports profile_public_skills_v1.

A skill a single launch adds, such as one invoked by slash command, already rides agent_launch_additions.skills from #4960.

REST API contract changes

Compared with base OpenAPI c3ecd82c7807 for public /api/** paths.

--- base public OpenAPI
+++ head public OpenAPI
@@ -1097,0 +1098 @@
+schema AgentProfileDiagnostics property public_skills optional schema=anyOf=[type="array" items=type="string",type="null"]
@@ -2429,0 +2431 @@
+schema OpenHandsAgentProfile property public_skills optional schema=anyOf=[type="array" items=type="string",type="null"]

Issue Number

Closes #5980

How to Test

Unit tests: the new cases cover tier filtering, null/[]/list, user shadowing, the dry-run and preview reports, the server launch with and without agent_launch_additions.skills, and EXTENSIONS_PATH with and without a custom repository. For the critic key, a server test saves it globally and launches a profile. It checks that the key reaches the resolved agent and the container side of a Docker hand-off, and that it appears in neither the forwarded payload nor the materialize response. That test fails when the server stops passing the key.

uv run pytest -n 8 tests/sdk/launch tests/sdk/profiles tests/sdk/skills tests/sdk/context tests/sdk/conversation tests/agent_server

That command fails the same 18 macOS-environment tests on this branch and on main (6e7a8532e), and nothing else. 4,518 pass on the branch.

End to end, I ran Agent Canvas dev:minimal with OH_AGENT_SERVER_LOCAL_PATH set to this branch and EXTENSIONS_PATH set to Canvas's installed @openhands/extensions 0.30.0, using the Canvas mock LLM. For each case:

  • A is today's Canvas home launch of default, sent as inline agent_settings.
  • B is the same configuration migrated onto a profile. It sets public_skills to the Skills page allow-list and disabled_skills to its user deny-list. B is launched by agent_profile_id, with A's suffix in agent_launch_additions.system_message_suffix_append and any invoked skill in agent_launch_additions.skills.
Case A skills B skills Same skill set Same tools
Plain message 17 17 yes yes, 23
/agent-creator (off by default) 18 18 yes yes, 23
Skills page customized 17 17 yes yes, 23

The system prompts are identical except that one user skill is listed in a different position. No clone appeared under the server's persistence directory.

Video/Screenshots

API-level change.

Type

  • Bug fix
  • Feature
  • Refactor
  • Breaking change
  • Docs / chore

Notes

  • clients/typescript is not updated. Its hand-written profile models already lag main.

🤖 Generated with Claude Code


🐳 Agent Server images for this PR — GHCR package, pull/run commands, and all pushed tags (click to expand)

• GHCR package: https://github.com/OpenHands/agent-sdk/pkgs/container/agent-server

Variants & Base Images

Variant Architectures Base Image Docs / Tags
java amd64, arm64 eclipse-temurin:17-jdk Link
python-slim amd64, arm64 python-node-runtime Link
python-minimal amd64, arm64 python-node-runtime Link
python amd64, arm64 python-node-runtime Link
golang amd64, arm64 golang:1.21-bookworm Link

Pull (multi-arch manifest)

# Each variant is a multi-arch manifest supporting both amd64 and arm64
docker pull ghcr.io/openhands/agent-server:37110ec-python

Run

docker run -it --rm \
  -p 8000:8000 \
  --name agent-server-37110ec-python \
  ghcr.io/openhands/agent-server:37110ec-python

All tags pushed for this build

ghcr.io/openhands/agent-server:37110ec-golang-amd64
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-golang-amd64
ghcr.io/openhands/agent-server:agent-profile-public-skills-golang-amd64
ghcr.io/openhands/agent-server:37110ec-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:37110ec-golang-arm64
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-golang-arm64
ghcr.io/openhands/agent-server:agent-profile-public-skills-golang-arm64
ghcr.io/openhands/agent-server:37110ec-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:37110ec-java-amd64
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-java-amd64
ghcr.io/openhands/agent-server:agent-profile-public-skills-java-amd64
ghcr.io/openhands/agent-server:37110ec-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:37110ec-java-arm64
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-java-arm64
ghcr.io/openhands/agent-server:agent-profile-public-skills-java-arm64
ghcr.io/openhands/agent-server:37110ec-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:37110ec-python-amd64
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-python-amd64
ghcr.io/openhands/agent-server:agent-profile-public-skills-python-amd64
ghcr.io/openhands/agent-server:37110ec-python-node-runtime-amd64
ghcr.io/openhands/agent-server:37110ec-python-arm64
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-python-arm64
ghcr.io/openhands/agent-server:agent-profile-public-skills-python-arm64
ghcr.io/openhands/agent-server:37110ec-python-node-runtime-arm64
ghcr.io/openhands/agent-server:37110ec-python-minimal-amd64
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-python-minimal-amd64
ghcr.io/openhands/agent-server:agent-profile-public-skills-python-minimal-amd64
ghcr.io/openhands/agent-server:37110ec-python-node-runtime-minimal-amd64
ghcr.io/openhands/agent-server:37110ec-python-minimal-arm64
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-python-minimal-arm64
ghcr.io/openhands/agent-server:agent-profile-public-skills-python-minimal-arm64
ghcr.io/openhands/agent-server:37110ec-python-node-runtime-minimal-arm64
ghcr.io/openhands/agent-server:37110ec-python-slim-amd64
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-python-slim-amd64
ghcr.io/openhands/agent-server:agent-profile-public-skills-python-slim-amd64
ghcr.io/openhands/agent-server:37110ec-python-node-runtime-slim-amd64
ghcr.io/openhands/agent-server:37110ec-python-slim-arm64
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-python-slim-arm64
ghcr.io/openhands/agent-server:agent-profile-public-skills-python-slim-arm64
ghcr.io/openhands/agent-server:37110ec-python-node-runtime-slim-arm64
ghcr.io/openhands/agent-server:37110ec-golang
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-golang
ghcr.io/openhands/agent-server:agent-profile-public-skills-golang
ghcr.io/openhands/agent-server:37110ec-golang_tag_1.21-bookworm
ghcr.io/openhands/agent-server:37110ec-java
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-java
ghcr.io/openhands/agent-server:agent-profile-public-skills-java
ghcr.io/openhands/agent-server:37110ec-eclipse-temurin_tag_17-jdk
ghcr.io/openhands/agent-server:37110ec-python-minimal
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-python-minimal
ghcr.io/openhands/agent-server:agent-profile-public-skills-python-minimal
ghcr.io/openhands/agent-server:37110ec-python-node-runtime-minimal
ghcr.io/openhands/agent-server:37110ec-python-slim
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-python-slim
ghcr.io/openhands/agent-server:agent-profile-public-skills-python-slim
ghcr.io/openhands/agent-server:37110ec-python-node-runtime-slim
ghcr.io/openhands/agent-server:37110ec-python
ghcr.io/openhands/agent-server:37110ec7b25f19b30125ff666a5edbf80e72e66b-python
ghcr.io/openhands/agent-server:agent-profile-public-skills-python
ghcr.io/openhands/agent-server:37110ec-python-node-runtime

About Multi-Architecture Support

  • Each variant tag (e.g., 37110ec-python) is a multi-arch manifest supporting both amd64 and arm64
  • Docker automatically pulls the correct architecture for your platform
  • Individual architecture tags (e.g., 37110ec-python-amd64) are also available if needed

- OpenHandsAgentProfile.public_skills: null = every public-catalog skill
  (unchanged behavior), [] = none, a list = only those names. User and
  project skills are unaffected and disabled_skills still applies.
- LaunchStores.public_skill_names names the public tier; the agent-server
  derives it from the same public and user loaders as the catalog, so a user
  skill shadowing a public one stays a user skill.
- EXTENSIONS_PATH reads public skills from a local copy of the extensions
  repository, such as an installed @openhands/extensions package, instead of
  cloning it.
- /server_info reports profile_public_skills_v1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

REST API breakage checks (OpenAPI) — ✅ PASSED

Result: ✅ PASSED

Action log

@github-actions

github-actions Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Coverage

Coverage Report •
FileStmtsMissCoverMissing
openhands-agent-server/openhands/agent_server
   launch.py125497%161, 164–165, 190
   server_details_router.py66297%27–28
   skills_service.py2397270%172, 175–178, 181–183, 186–187, 190–194, 197–201, 203, 207–208, 210, 221–222, 302, 309–310, 315, 337–338, 406–407, 531, 554, 571, 588, 605, 622, 639, 725–726, 730–732, 734–737, 739–741, 743–746, 749–751, 756, 758–759, 764–768, 770–772, 778
openhands-sdk/openhands/sdk/launch
   preview.py56493%68, 101, 118–119
   resolve.py1472086%117, 132, 178–179, 186, 194–195, 198–201, 218–219, 244, 249–252, 268–269
openhands-sdk/openhands/sdk/profiles
   agent_profile.py131596%403, 481, 487, 492, 520
   resolver.py160299%167, 552
openhands-sdk/openhands/sdk/skills
   skill.py5532795%153–154, 330, 333–334, 343, 594, 663, 993–994, 1068–1069, 1128–1129, 1244–1245, 1346, 1374, 1397, 1404–1405, 1455–1456, 1462–1463, 1469–1470
TOTAL50052840783% 

A profile stays secret-free, so the critic key saved in the server's global
verification settings now reaches every OpenHands profile launch through
LaunchStores.critic_api_key, instead of the critic falling back to the LLM
key. It is applied at resolve time, so a Docker host forwards it encrypted to
the conversation container, and materialize keeps redacting it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@simonrosenberg simonrosenberg changed the title feat(sdk): let Agent Profiles select public skills and read them locally feat(sdk): let Agent Profiles select public skills, read them locally and use the global critic key Oct 14, 2026
@simonrosenberg
simonrosenberg marked this pull request as ready for review October 14, 2026 10:11

@all-hands-bot all-hands-bot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This review was posted by an AI agent (OpenHands).

APPROVE — feat(sdk): let Agent Profiles select public skills, read them locally and use the global critic key

Reviewed head 37110ec7b25f19b30125ff666a5edbf80e72e66b. All check runs completed with no failures (sdk-tests, agent-server-tests, tools-tests, cross-tests, integration-test, pre-commit, OpenAPI/REST breakage, endpoint-audit, validate-acp-providers, windows/macos binary builds, security).

What I verified against the diff:

  • public_skills semantics. _select_skills treats null as the whole catalog, [] as none, and a list as an allow-list applied only to the public tier; a name absent from the catalog is a no-op, so the #4017 no-dangle property is preserved. disabled_skills still applies to every tier.
  • Tier separation is sound. discover_public_skill_names computes public_names - user_names over the same load_available_skills loaders, so a user skill that shadows a public one stays user-tier, and keep() keeps non-public skills unless explicitly denied. Covered by test_a_user_skill_shadowing_a_public_one_is_not_public and the tiered cases in test_resolve.py / test_resolver.py.
  • Critic key. The value comes from the server's global verification settings via LaunchStores.critic_api_key, never from the profile (ProfileVerificationSettings stays secret-free). It reaches the resolved agent and the in-container launch, and test_the_global_critic_key_reaches_profile_launches_but_no_response asserts it appears in neither the forwarded payload nor the materialize response. test_field_ownership.py was extended with a Stores owner so this is enforced structurally.
  • EXTENSIONS_PATH. _local_public_skills_path returns a path only for the default PUBLIC_SKILLS_REPO, so a custom repo_url keeps cloning; the cache key includes the local path. Both branches are tested.
  • Contract surface. The REST change is additive and optional (public_skills on OpenHandsAgentProfile and AgentProfileDiagnostics), plus the profile_public_skills_v1 capability, and preview/dry-run apply the same selection as the real launch.

The clients/typescript models are not updated; the PR states this explicitly and those hand-written profile models already lag main, so I do not treat it as a blocking gap here.

No material correctness, security, compatibility, or acceptance-criterion defect found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Agent Profile] Let a profile select public skills and read the catalog from a local extensions copy

2 participants