anthropics / anthropics/claude-agent-sdk-python
[Proposal] New sub-agent model(1Agent=1Process=1UnixServer)
- Dominant language
- Python
- Stars
- 8.1k
- Forks
- 1.3k
- Avg merge
- 2d 31m
- Merged PRs (30d)
- 1
Description
## Code
> https://github.com/JinTanba/claude-agent-sdk-python/tree/feat/add-unix-agent-server
### Background
The current default sub-agent model is difficult to use, limited in reusability, and lacks the flexibility required for complex orchestration. This proposal introduces a new sub-agent implementation to address these issues.
### Core Concept: *1 Agent = 1 Process = 1 UnixAgentServer*
By enforcing the principle of **1 Agent = 1 Process** and implementing multi-agent orchestration through **inter-process communication (IPC)** over **Unix Domain Sockets**, we can achieve a system that is far more modular, extensible, and stable than existing solutions.
This architecture allows each agent to operate as an independent process, communicating with others efficiently via Unix sockets. As a result, the ClaudeCode ecosystem can leverage its full potential.
### Overview
- **[UnixAgentServer](https://github.com/JinTanba/claude-agent-sdk-python/blob/feat/add-unix-agent-server/src/claude_agent_sdk/unix_agent_server.py)** manages the lifecycle of an agent process.
Each instance can be launched independently and communicates through a dedicated Unix Domain Socket.
- Agents are initialized with an instance implementing the **IAgent** specification, abstracting client implementations such as `ClaudeSDKClient`.
- Agents can control other agents by issuing commands via **Bash**, or alternatively by using **UnixAgentMCP** for structured communication.
### Monitoring & Communication
For observing the progress or state of sub-agents:
- Prefer using **standard output**, compatible with ClaudeCode’s `BashOutput` tool.
- Caution: Without an automatic timeout mechanism, synchronous communication may cause blocking and halt the entire orchestration process.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.