You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(docs/sdk): fix stale examples and add sessionId/autoSave to SessionOptions
Documentation fixes:
- README Quick Start TypeScript: defaultSecurity → securityProvider: new DefaultSecurityProvider()
- README Quick Start Python: fix constructor misuse and removed default_security field
- README Node.js/Python SDK sections: add typed class imports, show sessionId/autoSave persistence flow
- SUBAGENT_PERMISSIVE_MODE.md: add missing await on all Agent.create() calls (3 occurrences)
SDK additions (Node.js + Python):
- SessionOptions.sessionId / session_id: set a stable ID for save-and-resume workflows
- SessionOptions.autoSave / auto_save: persist session after each turn automatically
- Both fields wired through js_session_options_to_rust() and build_rust_session_options()
Example files updated to use current API:
- memoryDir/memory_dir → memoryStore: new FileMemoryStore(dir) / opts.memory_store = FileMemoryStore(dir)
- defaultSecurity/default_security → securityProvider: new DefaultSecurityProvider() / opts.security_provider = DefaultSecurityProvider()
- Imports updated in all four files
result = session.send("Refactor auth + update tests")
117
116
print(result.text)
@@ -135,6 +134,7 @@ print(result.text)
135
134
|**Git**|`git_worktree`| Create/list/remove/status git worktrees for parallel work |
136
135
|**Subagents**|`task`| Delegate to a named agent; blocks until the child agent replies |
137
136
|**Parallel subagents**|`parallel_task`| Fan-out to multiple named agents concurrently |
137
+
|**Team workflow**|`run_team`| Lead → Worker → Reviewer team with dynamic decomposition and quality review |
138
138
|**Parallel tools**|`batch`| Execute multiple tools concurrently in one call |
139
139
140
140
---
@@ -556,6 +556,28 @@ for task in result.done_tasks:
556
556
557
557
Supports Lead/Worker/Reviewer roles, `mpsc` peer messaging, broadcast, and a full task lifecycle (Open → InProgress → InReview → Done/Rejected).
558
558
559
+
**`run_team` built-in tool** — The LLM can also trigger the same Lead → Worker → Reviewer workflow autonomously at runtime via the `run_team` tool (no SDK wiring required):
560
+
561
+
```python
562
+
# Python — call directly from SDK code
563
+
result = session.tool("run_team", {
564
+
"goal": "Audit the auth module for security issues and produce a remediation plan",
565
+
"max_steps": 10, # per-member agent; lead/worker/reviewer all default to "general"
566
+
})
567
+
print(result.output)
568
+
```
569
+
570
+
```typescript
571
+
// TypeScript — call directly from SDK code
572
+
const result =awaitsession.tool('run_team', {
573
+
goal: 'Audit the auth module for security issues and produce a remediation plan',
574
+
maxSteps: 10,
575
+
});
576
+
console.log(result.output);
577
+
```
578
+
579
+
The LLM can also call `run_team` on its own when the `delegate-task` skill is loaded — it selects it automatically for goals with an unknown number of subtasks or that require reviewer sign-off.
0 commit comments