OpenHands / OpenHands/software-agent-sdk
feat(llm): investigate hosted Multi-agent (GPT-5.6 subagents) vs our client-side subagent system
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 539
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 137
Description
📄 Study page: Hosted Multi-agent vs the OpenHands SDK's client-side subagents
Summary
OpenAI's Multi-agent (beta, GPT‑5.6) lets a model spin up and coordinate subagents in parallel inside a single Responses request — the "subagents" behind GPT‑5.6's ultra mode. Orchestration (spawn/message/wait/synthesize) is hosted by OpenAI, not the client. This issue tracks investigating it and deciding how it relates to the SDK's existing client-side subagent system.
What the feature needs (from the OpenAI docs)
multi_agent.enabled: true+max_concurrent_subagents(default/recommended 3), beta headerOpenAI-Beta: responses_multi_agent=v1(orbetas=["responses_multi_agent=v1"]).- Six hosted collaboration actions surfaced as
multi_agent_callitems (do not execute client-side):spawn_agent,send_message,followup_task,wait_agent,interrupt_agent,list_agents. - New output items:
multi_agent_call,multi_agent_call_output,agent_message(encrypted). Items carry anagentattribute (/root,/root/researcher, …); final answer is the/rootmessagewithphase == "final_answer". - Client-defined
function_calls still work: any agent may emit one; the app executes it and returnsfunction_call_outputas usual. - Server-side compaction is auto-enabled;
/responses/compact,reasoning.summary, andmax_tool_callsare not supported when enabled. WebSocket recommended for tool-heavy runs.
The interesting delta: hosted vs client-orchestrated subagents
The SDK already has a subagent story, but it's client-orchestrated:
openhands-sdk/openhands/sdk/subagent/— markdown agent definitions + registryopenhands-tools/openhands/tools/delegate/—spawn/delegatetoolopenhands-tools/openhands/tools/task/—TaskTool/TaskToolSetbacked by aTaskManageropenhands-tools/openhands/tools/task_tracker/
So the core question is who orchestrates: our SDK spawns and drives full sub-conversations (portable across models, fully observable/controllable), whereas OpenAI's multi-agent hides orchestration server-side (less code, GPT‑5.6-only, beta, opaque encrypted inter-agent messages). This is a design choice, not just a parsing gap.
Gaps if we wanted to support the hosted mode
- No
multi_agentrequest param plumbing or beta-header handling. →select_responses_options(openhands-sdk/openhands/sdk/llm/options/responses_options.py),_build_responses_call_kwargs(openhands-sdk/openhands/sdk/llm/llm.py:916) - No parsing of
multi_agent_call/multi_agent_call_output/agent_message, and noagent/phaseattribution on parsed messages. →openhands-sdk/openhands/sdk/llm/message.py:541
Proposed scope
- Write up the hosted-vs-client comparison and get a maintainer decision on whether hosted multi-agent is worth supporting at all (given we already have a portable client-side system).
- If yes: minimal plumbing for
multi_agent.enabled+ beta header, and parse/preserve the three new item types withagent/phaseattribution behind a feature flag.
Notes / open questions
- Beta, schemas may change; GPT‑5.6-only. Encrypted
agent_messagecontent limits observability compared to our client-side delegation. - Recommend keeping the client-side subagent system as the default and treating hosted multi-agent as an optional, model-specific accelerator.
Investigation for GPT‑5.6 feature parity. Companion issues: programmatic tool calling, tool search, WebSocket mode.
Companion investigation issues (GPT‑5.6 Responses features): #4082 (Programmatic Tool Calling) · #4083 (Tool search) · #4084 (WebSocket mode) · #4085 (Multi-agent)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked hosted-vs-client comparison, then read the existing subagent directories and the named entry points in responses_options.py, llm.py, and message.py. Confirm how current client-side delegation works and identify the maintainer decision needed before implementation. Done means a documented comparison and decision; if approved, the issue's proposed request plumbing and item attribution are defined behind a feature flag.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai-infra-agents
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100