@robota-sdk/agent-sdk 3.0.0-beta.31 → 3.0.0-beta.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -53,6 +53,31 @@ agent-sdk (assembly layer)
53
53
 
54
54
  `agent-sdk` assembles existing packages -- it does not re-implement functionality that belongs in lower layers.
55
55
 
56
+ ## Subagent Sessions
57
+
58
+ `createSubagentSession()` creates a child session for delegating subtasks. The subagent forks the parent's context, inherits hooks and permissions, and runs with its own conversation history.
59
+
60
+ ```typescript
61
+ import { createSubagentSession } from '@robota-sdk/agent-sdk';
62
+
63
+ const subSession = createSubagentSession({
64
+ parentSession: session,
65
+ agentDefinition: 'explore',
66
+ prompt: 'Analyze the test coverage gaps',
67
+ });
68
+ const result = await subSession.run();
69
+ ```
70
+
71
+ ### Agent Definitions
72
+
73
+ `IAgentDefinition` describes a reusable agent configuration (system prompt, allowed tools, permission mode). `AgentDefinitionLoader` discovers definitions from `.claude/agents/` and built-in defaults.
74
+
75
+ Built-in agents: `explore` (read-only), `plan` (read-only planning), and a general-purpose agent with full tool access.
76
+
77
+ ### createAgentTool
78
+
79
+ `createAgentTool()` wraps subagent creation into a tool that the AI can invoke directly. The parent session's hooks, permissions, and context are forwarded to the child. The tool assembles the subagent prompt from the agent definition and the caller's instructions.
80
+
56
81
  ## Session Usage
57
82
 
58
83
  ```typescript