@robota-sdk/agent-sdk 3.0.0-beta.32 → 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 +25 -0
- package/package.json +5 -5
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robota-sdk/agent-sdk",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.33",
|
|
4
4
|
"description": "Programmatic SDK for building AI agents with Robota — provides Session, query(), built-in tools, permissions, hooks, and context loading",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/node/index.js",
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"chalk": "^5.3.0",
|
|
26
26
|
"zod": "^3.24.0",
|
|
27
|
-
"@robota-sdk/agent-
|
|
28
|
-
"@robota-sdk/agent-
|
|
29
|
-
"@robota-sdk/agent-
|
|
30
|
-
"@robota-sdk/agent-tools": "3.0.0-beta.
|
|
27
|
+
"@robota-sdk/agent-provider-anthropic": "3.0.0-beta.33",
|
|
28
|
+
"@robota-sdk/agent-sessions": "3.0.0-beta.33",
|
|
29
|
+
"@robota-sdk/agent-core": "3.0.0-beta.33",
|
|
30
|
+
"@robota-sdk/agent-tools": "3.0.0-beta.33"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"rimraf": "^5.0.5",
|