Skip to content

Commit f936674

Browse files
committed
docs(readme): features for MCP + delegation; update roadmap
Made-with: Cursor
1 parent 1a96f0d commit f936674

1 file changed

Lines changed: 46 additions & 1 deletion

File tree

README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ Demo mode:
5656
AGENTOS_DEMO_MODE=true python examples/run_web_builder.py
5757
```
5858

59-
## MCP Setup (Claude Desktop + Cursor)
59+
## Features
60+
61+
### MCP server with stdio/SSE transport (Claude Desktop + Cursor)
6062

6163
Install the MCP extra:
6264

@@ -127,6 +129,45 @@ Add to Cursor `.cursor/mcp.json`:
127129
}
128130
```
129131

132+
### Agent delegation (delegate tool + SharedContext + chaining)
133+
134+
AgentOS includes a structured delegation system that lets a “parent” agent offload subtasks to “child” agents while propagating rich context through a shared, in-memory key/value store.
135+
136+
Key pieces:
137+
138+
- `delegate_subtask` tool: LLM-facing tool that accepts structured fields like `task`, `context_json`, `constraints_json`, `expected_output_schema_json`, and `timeout`.
139+
- `SharedContext`: a key/value store child agents can read/write during the delegation chain (avoids lossy prompt compression).
140+
- Delegation chaining: if a child agent delegates again, the same shared context key is reused automatically.
141+
142+
Minimal wiring example:
143+
144+
```python
145+
from agentos.core.agent import Agent
146+
from agentos.core.delegation import DelegationManager
147+
148+
# Define your child agents however you like.
149+
child_agent_a = Agent(name="child-a", model="gpt-4o-mini", tools=[])
150+
child_agent_b = Agent(name="child-b", model="gpt-4o-mini", tools=[])
151+
152+
manager = DelegationManager()
153+
manager.register_agent("child-a", child_agent_a)
154+
manager.register_agent("child-b", child_agent_b)
155+
156+
# Create your parent agent and attach the delegate tool.
157+
parent = Agent(name="parent", model="gpt-4o-mini", tools=[])
158+
manager.attach_delegate_tool(parent) # adds `delegate_subtask` to the toolset
159+
160+
# Now the parent agent can call `delegate_subtask`.
161+
parent.run("Delegate a subtask and use shared context for details.")
162+
```
163+
164+
SharedContext tools available to delegated agents:
165+
166+
- `shared_context_key()`
167+
- `shared_context_get(key)`
168+
- `shared_context_set(key, value_json)`
169+
- `shared_context_dump()`
170+
130171
## Core Modules
131172

132173
| Module | What it does |
@@ -201,3 +242,7 @@ Contributions are welcome: [CONTRIBUTING.md](CONTRIBUTING.md)
201242
## Roadmap
202243

203244
Roadmap and upcoming work are tracked in [GitHub Issues](https://github.com/sukethrp/agentos/issues).
245+
246+
- [ ] Agent-to-Agent mesh protocol
247+
- [x] MCP server with stdio/SSE transport
248+
- [x] Agent-to-agent delegation with shared context

0 commit comments

Comments
 (0)