Skip to content

design(agent-server): REST LLM profiles for conversation start and restore#2485

Draft
enyst wants to merge 12 commits intomainfrom
design/llm-profiles-agent-server
Draft

design(agent-server): REST LLM profiles for conversation start and restore#2485
enyst wants to merge 12 commits intomainfrom
design/llm-profiles-agent-server

Conversation

@enyst
Copy link
Copy Markdown
Collaborator

@enyst enyst commented Mar 17, 2026

Summary

  • add a design document for wiring SDK LLM profiles into agent-server
  • recommend exposing /api/llm-profiles as REST CRUD over the existing LLMProfileStore instead of reviving per-conversation /llm
  • keep A1 non-redundant by using that same store for REST CRUD, conversation start/switch, and restore
  • cover start, runtime switch, restore-time re-resolution, and RemoteConversation follow-up

Context investigated

Artifact

  • .pr/design-llm-profiles-agent-server.md

Recommendation in brief

  • expose /api/llm-profiles CRUD as a thin wrapper over the existing LLMProfileStore
  • let conversation start accept llm_profile_id
  • add a dedicated conversation profile switch endpoint
  • restore from profile when available, with persisted snapshot fallback
  • reuse that same store for REST CRUD, conversation start/switch, and restore

Refs #1451


Agent Server images for this PR

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 amd64, arm64 nikolaik/python-nodejs:python3.13-nodejs22 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:08aad25-python

Run

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

All tags pushed for this build

ghcr.io/openhands/agent-server:08aad25-golang-amd64
ghcr.io/openhands/agent-server:08aad25-golang_tag_1.21-bookworm-amd64
ghcr.io/openhands/agent-server:08aad25-golang-arm64
ghcr.io/openhands/agent-server:08aad25-golang_tag_1.21-bookworm-arm64
ghcr.io/openhands/agent-server:08aad25-java-amd64
ghcr.io/openhands/agent-server:08aad25-eclipse-temurin_tag_17-jdk-amd64
ghcr.io/openhands/agent-server:08aad25-java-arm64
ghcr.io/openhands/agent-server:08aad25-eclipse-temurin_tag_17-jdk-arm64
ghcr.io/openhands/agent-server:08aad25-python-amd64
ghcr.io/openhands/agent-server:08aad25-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-amd64
ghcr.io/openhands/agent-server:08aad25-python-arm64
ghcr.io/openhands/agent-server:08aad25-nikolaik_s_python-nodejs_tag_python3.13-nodejs22-arm64
ghcr.io/openhands/agent-server:08aad25-golang
ghcr.io/openhands/agent-server:08aad25-java
ghcr.io/openhands/agent-server:08aad25-python

About Multi-Architecture Support

  • Each variant tag (e.g., 08aad25-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., 08aad25-python-amd64) are also available if needed

Co-authored-by: openhands <openhands@all-hands.dev>
@github-actions
Copy link
Copy Markdown
Contributor

📁 PR Artifacts Notice

This PR contains a .pr/ directory with PR-specific documents. This directory will be automatically removed when the PR is approved.

For fork PRs: Manual removal is required before merging.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 17, 2026

Python API breakage checks — ✅ PASSED

Result:PASSED

Action log

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 17, 2026

REST API breakage checks (OpenAPI) — ✅ PASSED

Result:PASSED

Action log

Comment thread .pr/design-llm-profiles-agent-server.md Outdated
Comment thread .pr/design-llm-profiles-agent-server.md Outdated
Comment thread .pr/design-llm-profiles-agent-server.md Outdated
enyst and others added 4 commits March 19, 2026 14:11
Co-authored-by: openhands <openhands@all-hands.dev>
ACPAgent uses a sentinel agent.llm and ACP-native model selection, so mirroring the llm_profile start/switch flow on ACP contracts would be a no-op. Scope the design doc to standard conversations and call out ACP as a separate future design space.

Co-authored-by: openhands <openhands@all-hands.dev>
Accept the review suggestion to keep the agent-server default LLM profile
store aligned with the SDK's existing ~/.openhands/profiles location, and
clarify that OH_LLM_PROFILES_PATH is still available for explicit overrides.

Co-authored-by: openhands <openhands@all-hands.dev>
Explain the agent-server start-model inheritance explicitly and add the
tradeoffs for placing llm_profile_id on the shared/base ACP path versus
on the standard start request plus StoredConversation.

Co-authored-by: openhands <openhands@all-hands.dev>
Comment thread .pr/design-llm-profiles-agent-server.md Outdated
enyst and others added 3 commits March 19, 2026 20:19
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Comment thread .pr/design-llm-profiles-agent-server.md Outdated
Comment thread .pr/design-llm-profiles-agent-server.md Outdated
enyst and others added 2 commits March 22, 2026 12:26
Rework the design doc so A1 reuses the existing LLMProfileStore directly for conversation start, switch, and restore. Treat /api/llm-profiles, cipher-aware profile writes, and an explicit profile-store path override as optional follow-up layers rather than new required server abstractions.

Co-authored-by: openhands <openhands@all-hands.dev>
Rewrite the design so A1 clearly requires /api/llm-profiles CRUD for REST clients while still reusing the existing LLMProfileStore as the only backing store. Clarify that conversation start, switch, and restore all use that same store, and keep the no-redundant-store constraint explicit.

Co-authored-by: openhands <openhands@all-hands.dev>
@all-hands-bot
Copy link
Copy Markdown
Collaborator

[Automatic Post]: It has been a while since there was any activity on this PR. @enyst, are you still working on it? If so, please go ahead, if not then please request review, close it, or request that someone else follow up.

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.

3 participants