@octavus/docs 2.9.0 → 2.11.0

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.
Files changed (38) hide show
  1. package/content/02-server-sdk/01-overview.md +16 -0
  2. package/content/02-server-sdk/06-workers.md +218 -143
  3. package/content/04-protocol/01-overview.md +26 -4
  4. package/content/04-protocol/05-skills.md +43 -7
  5. package/content/04-protocol/06-handlers.md +3 -0
  6. package/content/04-protocol/07-agent-config.md +18 -13
  7. package/content/04-protocol/09-skills-advanced.md +50 -29
  8. package/content/04-protocol/11-workers.md +40 -5
  9. package/dist/{chunk-RZZE5BMI.js → chunk-6TO62UOU.js} +19 -19
  10. package/dist/chunk-6TO62UOU.js.map +1 -0
  11. package/dist/{chunk-5BKWDS3E.js → chunk-EIUCL4CP.js} +43 -25
  12. package/dist/chunk-EIUCL4CP.js.map +1 -0
  13. package/dist/{chunk-PFMT3U55.js → chunk-H6M6M3MY.js} +23 -23
  14. package/dist/chunk-H6M6M3MY.js.map +1 -0
  15. package/dist/{chunk-NDIOULJV.js → chunk-NCTX3Y2J.js} +27 -27
  16. package/dist/chunk-NCTX3Y2J.js.map +1 -0
  17. package/dist/content.js +1 -1
  18. package/dist/docs.json +12 -12
  19. package/dist/index.js +1 -1
  20. package/dist/search-index.json +1 -1
  21. package/dist/search.js +1 -1
  22. package/dist/search.js.map +1 -1
  23. package/dist/sections.json +12 -12
  24. package/package.json +1 -1
  25. package/dist/chunk-5BKWDS3E.js.map +0 -1
  26. package/dist/chunk-7AGGVMRQ.js +0 -1471
  27. package/dist/chunk-7AGGVMRQ.js.map +0 -1
  28. package/dist/chunk-BZVKHJ67.js +0 -1489
  29. package/dist/chunk-BZVKHJ67.js.map +0 -1
  30. package/dist/chunk-H2LJXLPP.js +0 -1471
  31. package/dist/chunk-H2LJXLPP.js.map +0 -1
  32. package/dist/chunk-NDIOULJV.js.map +0 -1
  33. package/dist/chunk-PFMT3U55.js.map +0 -1
  34. package/dist/chunk-RZZE5BMI.js.map +0 -1
  35. package/dist/chunk-UUHIDMKX.js +0 -1489
  36. package/dist/chunk-UUHIDMKX.js.map +0 -1
  37. package/dist/chunk-VO3TYJ7M.js +0 -1471
  38. package/dist/chunk-VO3TYJ7M.js.map +0 -1
@@ -19,19 +19,20 @@ agent:
19
19
 
20
20
  ## Configuration Options
21
21
 
22
- | Field | Required | Description |
23
- | ------------- | -------- | --------------------------------------------------------- |
24
- | `model` | Yes | Model identifier or variable reference |
25
- | `system` | Yes | System prompt filename (without .md) |
26
- | `input` | No | Variables to pass to the system prompt |
27
- | `tools` | No | List of tools the LLM can call |
28
- | `skills` | No | List of Octavus skills the LLM can use |
29
- | `imageModel` | No | Image generation model (enables agentic image generation) |
30
- | `agentic` | No | Allow multiple tool call cycles |
31
- | `maxSteps` | No | Maximum agentic steps (default: 10) |
32
- | `temperature` | No | Model temperature (0-2) |
33
- | `thinking` | No | Extended reasoning level |
34
- | `anthropic` | No | Anthropic-specific options (tools, skills) |
22
+ | Field | Required | Description |
23
+ | ---------------- | -------- | --------------------------------------------------------- |
24
+ | `model` | Yes | Model identifier or variable reference |
25
+ | `system` | Yes | System prompt filename (without .md) |
26
+ | `input` | No | Variables to pass to the system prompt |
27
+ | `tools` | No | List of tools the LLM can call |
28
+ | `skills` | No | List of Octavus skills the LLM can use |
29
+ | `sandboxTimeout` | No | Skill sandbox timeout in ms (default: 5 min, max: 1 hour) |
30
+ | `imageModel` | No | Image generation model (enables agentic image generation) |
31
+ | `agentic` | No | Allow multiple tool call cycles |
32
+ | `maxSteps` | No | Maximum agentic steps (default: 10) |
33
+ | `temperature` | No | Model temperature (0-2) |
34
+ | `thinking` | No | Extended reasoning level |
35
+ | `anthropic` | No | Anthropic-specific options (tools, skills) |
35
36
 
36
37
  ## Models
37
38
 
@@ -319,8 +320,12 @@ handlers:
319
320
  thinking: low # Different thinking
320
321
  maxSteps: 1 # Limit tool calls
321
322
  system: escalation-summary # Different prompt
323
+ skills: [data-analysis] # Thread-specific skills
324
+ imageModel: google/gemini-2.5-flash-image # Thread-specific image model
322
325
  ```
323
326
 
327
+ Each thread can have its own skills and image model. Skills referenced here must be defined in the protocol's `skills:` section. Workers use this same pattern since they don't have a global `agent:` section.
328
+
324
329
  ## Full Example
325
330
 
326
331
  ```yaml
@@ -26,10 +26,11 @@ Use external tools instead when:
26
26
 
27
27
  ### Defining Available Skills
28
28
 
29
- Define all skills available to this agent in the `skills:` section. Then specify which skills are available for the chat thread in `agent.skills`:
29
+ Define all skills in the `skills:` section, then reference which skills are available where they're used:
30
+
31
+ **Interactive agents** — reference in `agent.skills`:
30
32
 
31
33
  ```yaml
32
- # All skills available to this agent (defined once at protocol level)
33
34
  skills:
34
35
  qr-code:
35
36
  display: description
@@ -37,23 +38,39 @@ skills:
37
38
  pdf-processor:
38
39
  display: description
39
40
  description: Processing PDFs
40
- data-analysis:
41
- display: description
42
- description: Analyzing data
43
41
 
44
- # Skills available for this chat thread
45
42
  agent:
46
43
  model: anthropic/claude-sonnet-4-5
47
44
  system: system
48
- skills: [qr-code] # Skills available for this thread
45
+ skills: [qr-code]
46
+ ```
47
+
48
+ **Workers and named threads** — reference per-thread in `start-thread.skills`:
49
+
50
+ ```yaml
51
+ skills:
52
+ qr-code:
53
+ display: description
54
+ description: Generating QR codes
55
+ data-analysis:
56
+ display: description
57
+ description: Analyzing data
58
+
59
+ steps:
60
+ Start analysis:
61
+ block: start-thread
62
+ thread: analysis
63
+ model: anthropic/claude-sonnet-4-5
64
+ system: system
65
+ skills: [qr-code, data-analysis]
66
+ maxSteps: 10
49
67
  ```
50
68
 
51
69
  ### Match Skills to Use Cases
52
70
 
53
- Define all skills available to this agent in the `skills:` section. Then specify which skills are available for the chat thread based on use case:
71
+ Different threads can have different skills. Define all skills at the protocol level, then scope them to each thread:
54
72
 
55
73
  ```yaml
56
- # All skills available to this agent (defined once at protocol level)
57
74
  skills:
58
75
  qr-code:
59
76
  display: description
@@ -65,14 +82,13 @@ skills:
65
82
  display: description
66
83
  description: Creating charts and visualizations
67
84
 
68
- # Skills available for this chat thread (support use case)
69
85
  agent:
70
86
  model: anthropic/claude-sonnet-4-5
71
87
  system: system
72
- skills: [qr-code] # Skills available for this thread
88
+ skills: [qr-code]
73
89
  ```
74
90
 
75
- For a data analysis thread, you would specify `[data-analysis, visualization]` in `agent.skills`, but still define all available skills in the `skills:` section above.
91
+ For a data analysis thread, you would specify `[data-analysis, visualization]` in `agent.skills` or in a `start-thread` block's `skills` field.
76
92
 
77
93
  ## Display Mode Strategy
78
94
 
@@ -207,43 +223,48 @@ with open(f'{output_dir}/metadata.json', 'w') as f:
207
223
  Sandboxes are created only when a skill tool is first called:
208
224
 
209
225
  ```yaml
210
- # Sandbox not created until LLM calls a skill tool
211
226
  agent:
212
- skills: [qr-code] # Sandbox created on first use
227
+ skills: [qr-code] # Sandbox created on first skill tool call
213
228
  ```
214
229
 
215
230
  This means:
216
231
 
217
232
  - No cost if skills aren't used
218
233
  - Fast startup (no sandbox creation delay)
219
- - Sandbox reused for all skill calls in a trigger
234
+ - Each `next-message` execution gets its own sandbox with only the skills it needs
220
235
 
221
236
  ### Timeout Limits
222
237
 
223
- Sandboxes have a 5-minute default timeout, which can be configured via `sandboxTimeout`:
238
+ Sandboxes default to a 5-minute timeout. Configure `sandboxTimeout` on the agent config or per thread:
224
239
 
225
240
  ```yaml
241
+ # Agent-level
226
242
  agent:
227
243
  model: anthropic/claude-sonnet-4-5
228
244
  skills: [data-analysis]
229
- sandboxTimeout: 1800000 # 30 minutes for long-running analysis
245
+ sandboxTimeout: 1800000 # 30 minutes
230
246
  ```
231
247
 
232
- `sandboxTimeout` Maximum: 1 hour (3,600,000 ms)
233
-
234
- **Timeout guidelines:**
248
+ ```yaml
249
+ # Thread-level (overrides agent-level)
250
+ steps:
251
+ Start thread:
252
+ block: start-thread
253
+ thread: analysis
254
+ skills: [data-analysis]
255
+ sandboxTimeout: 3600000 # 1 hour for long-running analysis
256
+ ```
235
257
 
236
- - **Short operations** (default 5 min): QR codes, simple calculations
237
- - **Medium operations** (10-30 min): Data analysis, report generation
238
- - **Long operations** (30+ min): Complex processing, large dataset analysis
258
+ Thread-level `sandboxTimeout` takes priority. Maximum: 1 hour (3,600,000 ms).
239
259
 
240
260
  ### Sandbox Lifecycle
241
261
 
242
- Each trigger execution gets a fresh sandbox:
262
+ Each `next-message` execution gets its own sandbox:
243
263
 
244
- - **Clean state** - No leftover files from previous executions
245
- - **Isolated** - No interference between sessions
246
- - **Destroyed** - Sandbox cleaned up after trigger completes
264
+ - **Scoped** - Only contains the skills available to that thread
265
+ - **Isolated** - Interactive agents and workers don't share sandboxes
266
+ - **Resilient** - If a sandbox expires, it's transparently recreated
267
+ - **Cleaned up** - Sandbox destroyed when the LLM call completes
247
268
 
248
269
  ## Combining Skills with Tools
249
270
 
@@ -348,7 +369,7 @@ The LLM sees these errors and can retry or explain to users.
348
369
  ### Sandbox Isolation
349
370
 
350
371
  - **No network access** (unless explicitly configured)
351
- - **No persistent storage** (sandbox destroyed after execution)
372
+ - **No persistent storage** (sandbox destroyed after each `next-message` execution)
352
373
  - **File output only** via `/output/` directory
353
374
  - **Time limits** enforced (5-minute default, configurable via `sandboxTimeout`)
354
375
 
@@ -373,7 +394,7 @@ if len(data) > 1000:
373
394
  Be aware of:
374
395
 
375
396
  - **File size limits** - Large files may fail to upload
376
- - **Execution time** - 5-minute sandbox timeout
397
+ - **Execution time** - Sandbox timeout (5-minute default, 1-hour maximum)
377
398
  - **Memory limits** - Sandbox environment constraints
378
399
 
379
400
  ## Debugging Skills
@@ -148,7 +148,7 @@ steps:
148
148
  tools: [tool-b]
149
149
  ```
150
150
 
151
- This gives workers flexibility to use different models, tools, and settings at different stages.
151
+ This gives workers flexibility to use different models, tools, skills, and settings at different stages.
152
152
 
153
153
  ### Steps Instead of Handlers
154
154
 
@@ -226,7 +226,7 @@ All LLM configuration goes here:
226
226
  | `system` | System prompt filename (required) |
227
227
  | `input` | Variables for system prompt |
228
228
  | `tools` | Tools available in this thread |
229
- | `workers` | Workers available to this thread (as LLM tools) |
229
+ | `skills` | Octavus skills available in this thread |
230
230
  | `imageModel` | Image generation model |
231
231
  | `thinking` | Extended reasoning level |
232
232
  | `temperature` | Model temperature |
@@ -362,6 +362,31 @@ steps:
362
362
  output: CONVERSATION_SUMMARY
363
363
  ```
364
364
 
365
+ ## Skills and Image Generation
366
+
367
+ Workers can use Octavus skills and image generation, configured per-thread via `start-thread`:
368
+
369
+ ```yaml
370
+ skills:
371
+ qr-code:
372
+ display: description
373
+ description: Generate QR codes
374
+
375
+ steps:
376
+ Start thread:
377
+ block: start-thread
378
+ thread: worker
379
+ model: anthropic/claude-sonnet-4-5
380
+ system: system
381
+ skills: [qr-code]
382
+ imageModel: google/gemini-2.5-flash-image
383
+ maxSteps: 10
384
+ ```
385
+
386
+ Workers define their own skills independently -- they don't inherit skills from a parent interactive agent. Each thread gets its own sandbox scoped to only its listed skills.
387
+
388
+ See [Skills](/docs/protocol/skills) for full documentation.
389
+
365
390
  ## Tool Handling
366
391
 
367
392
  Workers support the same tool handling as interactive agents:
@@ -370,14 +395,24 @@ Workers support the same tool handling as interactive agents:
370
395
  - **Client tools** — Pause execution, return tool request to caller
371
396
 
372
397
  ```typescript
398
+ // Non-streaming: get the output directly
399
+ const { output } = await client.workers.generate(
400
+ agentId,
401
+ { TOPIC: 'AI safety' },
402
+ {
403
+ tools: {
404
+ 'web-search': async (args) => await searchWeb(args.query),
405
+ },
406
+ },
407
+ );
408
+
409
+ // Streaming: observe events in real-time
373
410
  const events = client.workers.execute(
374
411
  agentId,
375
412
  { TOPIC: 'AI safety' },
376
413
  {
377
414
  tools: {
378
- 'web-search': async (args) => {
379
- return await searchWeb(args.query);
380
- },
415
+ 'web-search': async (args) => await searchWeb(args.query),
381
416
  },
382
417
  },
383
418
  );