@octavus/docs 3.0.0 → 3.2.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 (59) hide show
  1. package/content/01-getting-started/01-introduction.md +15 -15
  2. package/content/01-getting-started/02-quickstart.md +2 -2
  3. package/content/02-server-sdk/01-overview.md +6 -6
  4. package/content/02-server-sdk/02-sessions.md +1 -1
  5. package/content/02-server-sdk/03-tools.md +4 -4
  6. package/content/02-server-sdk/04-streaming.md +1 -1
  7. package/content/02-server-sdk/05-cli.md +15 -15
  8. package/content/02-server-sdk/06-workers.md +8 -8
  9. package/content/02-server-sdk/07-debugging.md +7 -7
  10. package/content/02-server-sdk/08-computer.md +4 -4
  11. package/content/03-client-sdk/01-overview.md +11 -11
  12. package/content/03-client-sdk/02-messages.md +28 -1
  13. package/content/03-client-sdk/03-streaming.md +3 -3
  14. package/content/03-client-sdk/04-execution-blocks.md +1 -1
  15. package/content/03-client-sdk/05-socket-transport.md +5 -5
  16. package/content/03-client-sdk/06-http-transport.md +5 -5
  17. package/content/03-client-sdk/07-structured-output.md +3 -3
  18. package/content/03-client-sdk/08-file-uploads.md +2 -2
  19. package/content/03-client-sdk/09-error-handling.md +3 -3
  20. package/content/03-client-sdk/10-client-tools.md +3 -3
  21. package/content/04-protocol/01-overview.md +19 -18
  22. package/content/04-protocol/02-input-resources.md +1 -1
  23. package/content/04-protocol/03-triggers.md +1 -1
  24. package/content/04-protocol/04-tools.md +6 -6
  25. package/content/04-protocol/05-skills.md +5 -5
  26. package/content/04-protocol/06-handlers.md +3 -0
  27. package/content/04-protocol/07-agent-config.md +114 -21
  28. package/content/04-protocol/09-skills-advanced.md +18 -18
  29. package/content/04-protocol/10-types.md +22 -22
  30. package/content/04-protocol/11-workers.md +31 -30
  31. package/content/04-protocol/12-references.md +10 -10
  32. package/content/04-protocol/13-mcp-servers.md +95 -6
  33. package/content/05-api-reference/02-sessions.md +2 -2
  34. package/content/06-examples/02-nextjs-chat.md +3 -3
  35. package/content/06-examples/03-socket-chat.md +3 -3
  36. package/dist/chunk-R4UMXGAC.js +1523 -0
  37. package/dist/chunk-R4UMXGAC.js.map +1 -0
  38. package/dist/content.js +1 -1
  39. package/dist/docs.json +40 -40
  40. package/dist/index.js +1 -1
  41. package/dist/search-index.json +1 -1
  42. package/dist/search.js +1 -1
  43. package/dist/search.js.map +1 -1
  44. package/dist/sections.json +40 -40
  45. package/package.json +1 -1
  46. package/dist/chunk-4XCEGHY7.js +0 -1549
  47. package/dist/chunk-4XCEGHY7.js.map +0 -1
  48. package/dist/chunk-BKMROUXE.js +0 -1523
  49. package/dist/chunk-BKMROUXE.js.map +0 -1
  50. package/dist/chunk-HMRAGEPN.js +0 -1523
  51. package/dist/chunk-HMRAGEPN.js.map +0 -1
  52. package/dist/chunk-HQCOEPPD.js +0 -1523
  53. package/dist/chunk-HQCOEPPD.js.map +0 -1
  54. package/dist/chunk-J5MPASK3.js +0 -1523
  55. package/dist/chunk-J5MPASK3.js.map +0 -1
  56. package/dist/chunk-TFR7YOK2.js +0 -1523
  57. package/dist/chunk-TFR7YOK2.js.map +0 -1
  58. package/dist/chunk-XVO2F2JU.js +0 -1523
  59. package/dist/chunk-XVO2F2JU.js.map +0 -1
@@ -77,7 +77,7 @@ In prompts, reference variables with `{{VARIABLE_NAME}}`:
77
77
  You are a support agent for {{COMPANY_NAME}}.
78
78
  ```
79
79
 
80
- To use a variable in a prompt, pass it through the `input` mapping on the [agent config](/docs/protocol/agent-config#system-prompt) or [block](/docs/protocol/handlers#block-input-mapping). Variables not listed in the `input` mapping won't be interpolated the `{{VARIABLE}}` placeholder will be preserved as-is.
80
+ To use a variable in a prompt, pass it through the `input` mapping on the [agent config](/docs/protocol/agent-config#system-prompt) or [block](/docs/protocol/handlers#block-input-mapping). Variables not listed in the `input` mapping won't be interpolated - the `{{VARIABLE}}` placeholder will be preserved as-is.
81
81
 
82
82
  > **Note:** Variables must be `UPPER_SNAKE_CASE`. Nested properties (dot notation like `{{VAR.property}}`) are not supported. Objects are serialized as JSON when interpolated.
83
83
 
@@ -11,7 +11,7 @@ Triggers define how an agent can be invoked. Each trigger has a name, optional i
11
11
 
12
12
  ### User Message
13
13
 
14
- The most common trigger when a user sends a chat message:
14
+ The most common trigger - when a user sends a chat message:
15
15
 
16
16
  ```yaml
17
17
  triggers:
@@ -7,13 +7,13 @@ description: Defining external tools implemented in your backend.
7
7
 
8
8
  Tools extend what agents can do. Octavus supports multiple types:
9
9
 
10
- 1. **External Tools** Defined in the protocol, implemented in your backend (this page)
11
- 2. **MCP Tools** Auto-discovered from MCP servers (see [MCP Servers](/docs/protocol/mcp-servers))
12
- 3. **Built-in Tools** Provider-agnostic tools managed by Octavus (web search, image generation)
13
- 4. **Provider Tools** Provider-specific tools executed by the provider (e.g., Anthropic's code execution)
14
- 5. **Skills** Code execution and knowledge packages (see [Skills](/docs/protocol/skills))
10
+ 1. **External Tools** - Defined in the protocol, implemented in your backend (this page)
11
+ 2. **MCP Tools** - Auto-discovered from MCP servers (see [MCP Servers](/docs/protocol/mcp-servers))
12
+ 3. **Built-in Tools** - Provider-agnostic tools managed by Octavus (web search, image generation)
13
+ 4. **Provider Tools** - Provider-specific tools executed by the provider (e.g., Anthropic's code execution)
14
+ 5. **Skills** - Code execution and knowledge packages (see [Skills](/docs/protocol/skills))
15
15
 
16
- This page covers external tools. For MCP-based tools from services like Figma, Sentry, or device capabilities like browser and filesystem, see [MCP Servers](/docs/protocol/mcp-servers). Built-in tools are enabled via agent config see [Web Search](/docs/protocol/agent-config#web-search) and [Image Generation](/docs/protocol/agent-config#image-generation). For provider-specific tools, see [Provider Options](/docs/protocol/provider-options). For code execution, see [Skills](/docs/protocol/skills).
16
+ This page covers external tools. For MCP-based tools from services like Figma, Sentry, or device capabilities like browser and filesystem, see [MCP Servers](/docs/protocol/mcp-servers). Built-in tools are enabled via agent config - see [Web Search](/docs/protocol/agent-config#web-search) and [Image Generation](/docs/protocol/agent-config#image-generation). For provider-specific tools, see [Provider Options](/docs/protocol/provider-options). For code execution, see [Skills](/docs/protocol/skills).
17
17
 
18
18
  ## External Tools
19
19
 
@@ -413,7 +413,7 @@ When a skill has secrets configured for the organization, it automatically runs
413
413
 
414
414
  - The skill gets its own **isolated sandbox** (separate from other skills)
415
415
  - Secrets are injected as **environment variables** available to all scripts
416
- - Only `octavus_skill_read`, `octavus_skill_list`, and `octavus_skill_run` are available `octavus_code_run`, `octavus_file_write`, and `octavus_file_read` are blocked
416
+ - Only `octavus_skill_read`, `octavus_skill_list`, and `octavus_skill_run` are available - `octavus_code_run`, `octavus_file_write`, and `octavus_file_read` are blocked
417
417
  - Scripts receive input as **JSON via stdin** (using the `input` parameter on `octavus_skill_run`) instead of CLI args
418
418
  - All output (stdout/stderr) is **automatically redacted** for secret values before being returned to the LLM
419
419
 
@@ -442,10 +442,10 @@ Skills run in isolated sandbox environments:
442
442
  - **No persistent storage** (sandbox destroyed after each `next-message` execution)
443
443
  - **File output only** via `/output/` directory
444
444
  - **Time limits** enforced (5-minute default, configurable via `sandboxTimeout`)
445
- - **Secret redaction** output from secure skills is automatically scanned for secret values
445
+ - **Secret redaction** - output from secure skills is automatically scanned for secret values
446
446
 
447
447
  ## Next Steps
448
448
 
449
- - [Agent Config](/docs/protocol/agent-config) Configuring skills in agent settings
450
- - [Provider Options](/docs/protocol/provider-options) Anthropic's built-in skills
451
- - [Skills Advanced Guide](/docs/protocol/skills-advanced) Best practices and advanced patterns
449
+ - [Agent Config](/docs/protocol/agent-config) - Configuring skills in agent settings
450
+ - [Provider Options](/docs/protocol/provider-options) - Anthropic's built-in skills
451
+ - [Skills Advanced Guide](/docs/protocol/skills-advanced) - Best practices and advanced patterns
@@ -146,6 +146,7 @@ Start summary thread:
146
146
  model: anthropic/claude-sonnet-4-5 # Optional: different model
147
147
  backupModel: openai/gpt-4o # Failover on provider errors
148
148
  thinking: low # Extended reasoning level
149
+ cache: auto # auto (default) | extended | off
149
150
  maxSteps: 1 # Tool call limit
150
151
  system: escalation-summary # System prompt
151
152
  input: [COMPANY_NAME] # Variables for prompt
@@ -155,6 +156,8 @@ Start summary thread:
155
156
  imageModel: google/gemini-2.5-flash-image # Image generation model
156
157
  ```
157
158
 
159
+ The `cache` field controls prompt caching for this thread and defaults to `auto` when omitted. Threads do not inherit the agent's `cache` value - see [Prompt Caching](/docs/protocol/agent-config#prompt-caching).
160
+
158
161
  The `model` field can also reference a variable for dynamic model selection. The `backupModel` field follows the same format and supports variable references.
159
162
 
160
163
  ```yaml
@@ -38,6 +38,7 @@ agent:
38
38
  | `maxSteps` | No | Maximum agentic steps (default: 10) |
39
39
  | `temperature` | No | Model temperature (0-2) |
40
40
  | `thinking` | No | Extended reasoning level |
41
+ | `cache` | No | Prompt caching mode: `auto` (default), `extended`, or `off` |
41
42
  | `anthropic` | No | Anthropic-specific options (tools, skills) |
42
43
 
43
44
  ## Models
@@ -46,11 +47,11 @@ Specify models in `provider/model-id` format. Any model supported by the provide
46
47
 
47
48
  ### Supported Providers
48
49
 
49
- | Provider | Format | Examples |
50
- | --------- | ---------------------- | -------------------------------------------------------------------- |
51
- | Anthropic | `anthropic/{model-id}` | `claude-opus-4-5`, `claude-sonnet-4-5`, `claude-haiku-4-5` |
52
- | Google | `google/{model-id}` | `gemini-3-pro-preview`, `gemini-3-flash-preview`, `gemini-2.5-flash` |
53
- | OpenAI | `openai/{model-id}` | `gpt-5`, `gpt-4o`, `o4-mini`, `o3`, `o3-mini`, `o1` |
50
+ | Provider | Format | Examples |
51
+ | --------- | ---------------------- | -------------------------------------------------------------------------------------------------- |
52
+ | Anthropic | `anthropic/{model-id}` | `claude-opus-4-7`, `claude-opus-4-6`, `claude-sonnet-4-6`, `claude-sonnet-4-5`, `claude-haiku-4-5` |
53
+ | Google | `google/{model-id}` | `gemini-3-pro-preview`, `gemini-3-flash-preview`, `gemini-2.5-flash` |
54
+ | OpenAI | `openai/{model-id}` | `gpt-5`, `gpt-4o`, `o4-mini`, `o3`, `o3-mini`, `o1` |
54
55
 
55
56
  ### Examples
56
57
 
@@ -99,9 +100,9 @@ const sessionId = await client.agentSessions.create('my-agent', {
99
100
 
100
101
  This enables:
101
102
 
102
- - **Multi-provider support** Same agent works with different providers
103
- - **A/B testing** Test different models without protocol changes
104
- - **User preferences** Let users choose their preferred model
103
+ - **Multi-provider support** - Same agent works with different providers
104
+ - **A/B testing** - Test different models without protocol changes
105
+ - **User preferences** - Let users choose their preferred model
105
106
 
106
107
  The model value is validated at runtime to ensure it's in the correct `provider/model-id` format.
107
108
 
@@ -122,7 +123,7 @@ When a provider error occurs, the system retries once with the backup model. If
122
123
 
123
124
  **Key behaviors:**
124
125
 
125
- - Only transient provider errors trigger fallback authentication and validation errors are not retried
126
+ - Only transient provider errors trigger fallback - authentication and validation errors are not retried
126
127
  - Provider-specific options (like `anthropic:`) are only forwarded to the backup model if it uses the same provider
127
128
  - For streaming responses, fallback only occurs if no content has been sent to the client yet
128
129
 
@@ -144,7 +145,7 @@ agent:
144
145
 
145
146
  ## System Prompt
146
147
 
147
- The system prompt sets the agent's persona and instructions. The `input` field controls which variables are available to the prompt only variables listed in `input` are interpolated.
148
+ The system prompt sets the agent's persona and instructions. The `input` field controls which variables are available to the prompt - only variables listed in `input` are interpolated.
148
149
 
149
150
  ```yaml
150
151
  agent:
@@ -224,14 +225,81 @@ agent:
224
225
  thinking: medium # low | medium | high
225
226
  ```
226
227
 
227
- | Level | Token Budget | Use Case |
228
- | -------- | ------------ | ------------------- |
229
- | `low` | ~5,000 | Simple reasoning |
230
- | `medium` | ~10,000 | Moderate complexity |
231
- | `high` | ~20,000 | Complex analysis |
228
+ | Level | Use Case |
229
+ | -------- | ------------------- |
230
+ | `low` | Simple reasoning |
231
+ | `medium` | Moderate complexity |
232
+ | `high` | Complex analysis |
232
233
 
233
234
  Thinking content streams to the UI and can be displayed to users.
234
235
 
236
+ ### How levels are applied
237
+
238
+ Each provider translates `thinking` into its own reasoning controls:
239
+
240
+ | Provider | Level mapping |
241
+ | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
242
+ | Anthropic 4.6+ (`claude-opus-4-7`, `claude-opus-4-6`, `claude-sonnet-4-6`) | Adaptive thinking - the model decides how much to reason, guided by `effort: low / medium / high` |
243
+ | Anthropic older (4.5 and earlier) | Fixed token budgets: `low` ~5,000, `medium` ~10,000, `high` ~20,000 |
244
+ | OpenAI (GPT-5.x, o-series) | `reasoningEffort: low / medium / high` |
245
+ | Google (Gemini 3.x) | `thinkingLevel: low / high` (`medium` rounds up to `high`) |
246
+ | Google (Gemini 1.x / 2.x) | Token budgets: `low` 1,024, `medium` 8,192, `high` 24,576 |
247
+ | OpenRouter | Unified `reasoning.max_tokens` (translated upstream) |
248
+ | Vercel AI Gateway | Forwards the underlying provider's options |
249
+
250
+ ## Prompt Caching
251
+
252
+ Providers charge less for tokens served from their prompt cache (often 10% of the uncached rate). Octavus exposes a single `cache` field that picks the right retention policy per provider, so the stable prefix of your agent - tools, system prompt, and historical messages - gets billed at the cache-read rate on repeat requests.
253
+
254
+ ```yaml
255
+ agent:
256
+ model: anthropic/claude-sonnet-4-5
257
+ cache: auto # auto (default) | extended | off
258
+ ```
259
+
260
+ | Mode | Behavior | When to use |
261
+ | ---------- | ----------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
262
+ | `auto` | Short-TTL caching. Default when omitted. | Most agents. Free on all supported providers and pays for itself within the same session. |
263
+ | `extended` | Long-TTL caching. Trades a higher cache-write cost for much longer residency. | Agents triggered with gaps (daily reports, on-call assistants) where the prefix is reused across hours. |
264
+ | `off` | No opt-in caching emitted. | When you explicitly want to skip caching - e.g. debugging a non-deterministic prefix. |
265
+
266
+ ### Per-provider behavior
267
+
268
+ The `cache` field is provider-agnostic at the protocol level - each provider translates it into its own cache retention policy:
269
+
270
+ | Provider | `auto` TTL | `extended` TTL |
271
+ | --------- | ------------------------- | -------------- |
272
+ | Anthropic | 5 minutes | 1 hour |
273
+ | OpenAI | in-memory (~5–10 minutes) | 24 hours |
274
+ | Google | Implicit (Gemini 2.5+) | Implicit |
275
+
276
+ On `off`, Octavus emits no explicit cache options. Providers that auto-cache (OpenAI on prefixes ≥ 1,024 tokens, Gemini 2.5+) may still cache transparently - `off` just disables Octavus's opt-in behavior.
277
+
278
+ ### Threads don't inherit
279
+
280
+ Named threads (created with `start-thread`) read their own `cache` field independently - they **do not** inherit the agent's cache value:
281
+
282
+ ```yaml
283
+ agent:
284
+ cache: extended # 1-hour TTL on the main thread
285
+
286
+ handlers:
287
+ summarize:
288
+ Start summary:
289
+ block: start-thread
290
+ thread: summary
291
+ # No cache field → defaults to 'auto' (5-minute TTL), NOT 'extended'
292
+ system: summary-system
293
+ ```
294
+
295
+ This is intentional: named threads are often used for short, one-shot work (summarization, classification) where the long TTL would be wasted. Set `cache` explicitly on `start-thread` when you do want it.
296
+
297
+ ### Cost trade-offs
298
+
299
+ - **Cache reads** are always much cheaper than uncached input on any provider - caching is effectively free if your prefix is stable.
300
+ - **Cache writes** on Anthropic cost ~1.25× input for `auto` and 2× input for `extended`. OpenAI and Google don't charge separately for cache writes.
301
+ - Use `extended` only when the same prefix is genuinely reused across sessions that span hours; otherwise the higher write cost dominates the savings.
302
+
235
303
  ## Skills
236
304
 
237
305
  Enable Octavus skills for code execution and file generation:
@@ -297,9 +365,9 @@ When `imageModel` is configured, the `octavus_generate_image` tool becomes avail
297
365
 
298
366
  The tool supports three image sizes:
299
367
 
300
- - `1024x1024` (default) Square
301
- - `1792x1024` Landscape (16:9)
302
- - `1024x1792` Portrait (9:16)
368
+ - `1024x1024` (default) - Square
369
+ - `1792x1024` - Landscape (16:9)
370
+ - `1024x1792` - Portrait (9:16)
303
371
 
304
372
  ### Image Editing with Reference Images
305
373
 
@@ -338,7 +406,7 @@ agent:
338
406
 
339
407
  When `webSearch` is enabled, the `octavus_web_search` tool becomes available. The LLM can decide when to search the web based on the conversation. Search results include source URLs that are emitted as citations in the UI.
340
408
 
341
- This is a **provider-agnostic** built-in tool it works with any LLM provider (Anthropic, Google, OpenAI, etc.). For Anthropic's own web search implementation, see [Provider Options](/docs/protocol/provider-options).
409
+ This is a **provider-agnostic** built-in tool - it works with any LLM provider (Anthropic, Google, OpenAI, etc.). For Anthropic's own web search implementation, see [Provider Options](/docs/protocol/provider-options).
342
410
 
343
411
  Use cases:
344
412
 
@@ -346,6 +414,28 @@ Use cases:
346
414
  - Fact verification and documentation lookups
347
415
  - Any information that may have changed since the model's training
348
416
 
417
+ ## TODO List
418
+
419
+ Enable the LLM to maintain a structured task list while it works:
420
+
421
+ ```yaml
422
+ agent:
423
+ model: anthropic/claude-sonnet-4-5
424
+ system: system
425
+ todoList: true
426
+ agentic: true
427
+ ```
428
+
429
+ When `todoList` is enabled, the `octavus_todo_write` tool becomes available. The LLM creates and updates a list of items - each with `id`, `content`, and `status` (`pending`, `in_progress`, `completed`, `cancelled`) - and the platform emits a `todo-update` stream event with the resolved snapshot. The Client SDK accumulates updates into a single `UITodoPart` per assistant message, so consumers render an evolving "Plan" card without managing state themselves.
430
+
431
+ The list persists across messages: the LLM can use `merge=true` to update items by id (sending only the changed fields), or `merge=false` to replace the list entirely.
432
+
433
+ Use cases:
434
+
435
+ - Multi-step tasks where the user benefits from seeing progress
436
+ - Long-running agentic loops that should communicate intent
437
+ - Workflows where the agent plans before acting
438
+
349
439
  ## Temperature
350
440
 
351
441
  Control response randomness:
@@ -381,7 +471,7 @@ agent:
381
471
  description: Processing PDF
382
472
  ```
383
473
 
384
- Provider options are validated against the modelusing `anthropic:` with a non-Anthropic model will fail validation.
474
+ Provider options are validated against the model - using `anthropic:` with a non-Anthropic model will fail validation.
385
475
 
386
476
  See [Provider Options](/docs/protocol/provider-options) for full documentation.
387
477
 
@@ -398,6 +488,7 @@ handlers:
398
488
  model: anthropic/claude-sonnet-4-5 # Different model
399
489
  backupModel: openai/gpt-4o # Failover model
400
490
  thinking: low # Different thinking
491
+ cache: off # Different cache mode (does not inherit from agent)
401
492
  maxSteps: 1 # Limit tool calls
402
493
  system: escalation-summary # Different prompt
403
494
  mcpServers: [figma, browser] # Thread-specific MCP servers
@@ -405,9 +496,10 @@ handlers:
405
496
  references: [escalation-policy] # Thread-specific references
406
497
  imageModel: google/gemini-2.5-flash-image # Thread-specific image model
407
498
  webSearch: true # Thread-specific web search
499
+ todoList: true # Thread-specific task list
408
500
  ```
409
501
 
410
- Each thread can have its own model, backup model, MCP servers, skills, references, image model, and web search setting. Skills must be defined in the protocol's `skills:` section. References must exist in the agent's `references/` directory. Workers use this same pattern since they don't have a global `agent:` section.
502
+ Each thread can have its own model, backup model, cache mode, MCP servers, skills, references, image model, web search setting, and task list setting. Skills must be defined in the protocol's `skills:` section. References must exist in the agent's `references/` directory. Workers use this same pattern since they don't have a global `agent:` section.
411
503
 
412
504
  ## Full Example
413
505
 
@@ -465,6 +557,7 @@ agent:
465
557
  skills: [qr-code] # Octavus skills
466
558
  references: [support-policies] # On-demand context
467
559
  webSearch: true # Built-in web search
560
+ todoList: true # Structured task tracking
468
561
  agentic: true
469
562
  maxSteps: 10
470
563
  thinking: medium
@@ -28,7 +28,7 @@ Use external tools instead when:
28
28
 
29
29
  Define all skills in the `skills:` section, then reference which skills are available where they're used:
30
30
 
31
- **Interactive agents** reference in `agent.skills`:
31
+ **Interactive agents** - reference in `agent.skills`:
32
32
 
33
33
  ```yaml
34
34
  skills:
@@ -45,7 +45,7 @@ agent:
45
45
  skills: [qr-code]
46
46
  ```
47
47
 
48
- **Workers and named threads** reference per-thread in `start-thread.skills`:
48
+ **Workers and named threads** - reference per-thread in `start-thread.skills`:
49
49
 
50
50
  ```yaml
51
51
  skills:
@@ -348,8 +348,8 @@ print(result.stdout)
348
348
  Key patterns:
349
349
 
350
350
  - **Read stdin**: `json.load(sys.stdin)` to get the `input` object from the `octavus_skill_run` call
351
- - **Access secrets**: `os.environ["SECRET_NAME"]` secrets are injected as env vars
352
- - **Print output**: Write results to stdout the LLM sees the (redacted) stdout
351
+ - **Access secrets**: `os.environ["SECRET_NAME"]` - secrets are injected as env vars
352
+ - **Print output**: Write results to stdout - the LLM sees the (redacted) stdout
353
353
  - **Error handling**: Write errors to stderr and exit with non-zero code
354
354
 
355
355
  ### Declaring Secrets in SKILL.md
@@ -447,10 +447,10 @@ The LLM sees these errors and can retry or explain to users.
447
447
 
448
448
  For skills with configured secrets:
449
449
 
450
- - **Isolated sandbox** each secure skill gets its own sandbox, preventing cross-skill secret leakage
451
- - **No arbitrary code** `octavus_code_run`, `octavus_file_write`, and `octavus_file_read` are blocked for secure skills, so only pre-built scripts can execute
452
- - **Output redaction** all stdout and stderr are scanned for secret values before being returned to the LLM
453
- - **Encrypted at rest** secrets are encrypted using AES-256-GCM and only decrypted at execution time
450
+ - **Isolated sandbox** - each secure skill gets its own sandbox, preventing cross-skill secret leakage
451
+ - **No arbitrary code** - `octavus_code_run`, `octavus_file_write`, and `octavus_file_read` are blocked for secure skills, so only pre-built scripts can execute
452
+ - **Output redaction** - all stdout and stderr are scanned for secret values before being returned to the LLM
453
+ - **Encrypted at rest** - secrets are encrypted using AES-256-GCM and only decrypted at execution time
454
454
 
455
455
  ### Input Validation
456
456
 
@@ -534,16 +534,16 @@ Check execution logs in the platform debug view:
534
534
 
535
535
  ## Best Practices Summary
536
536
 
537
- 1. **Enable only needed skills** Don't overwhelm the LLM
538
- 2. **Choose appropriate display modes** Match user experience needs
539
- 3. **Write clear skill descriptions** Help LLM understand when to use
540
- 4. **Handle errors gracefully** Provide helpful error messages
541
- 5. **Test skills locally** Verify before uploading
542
- 6. **Monitor execution** Check logs for issues
543
- 7. **Combine with tools** Use tools for data, skills for processing
544
- 8. **Consider performance** Be aware of timeouts and limits
545
- 9. **Use secrets for credentials** Declare secrets in frontmatter instead of hardcoding tokens
546
- 10. **Design scripts for stdin input** Secure skills receive JSON via stdin, so plan for both input methods if the skill might be used in either mode
537
+ 1. **Enable only needed skills** - Don't overwhelm the LLM
538
+ 2. **Choose appropriate display modes** - Match user experience needs
539
+ 3. **Write clear skill descriptions** - Help LLM understand when to use
540
+ 4. **Handle errors gracefully** - Provide helpful error messages
541
+ 5. **Test skills locally** - Verify before uploading
542
+ 6. **Monitor execution** - Check logs for issues
543
+ 7. **Combine with tools** - Use tools for data, skills for processing
544
+ 8. **Consider performance** - Be aware of timeouts and limits
545
+ 9. **Use secrets for credentials** - Declare secrets in frontmatter instead of hardcoding tokens
546
+ 10. **Design scripts for stdin input** - Secure skills receive JSON via stdin, so plan for both input methods if the skill might be used in either mode
547
547
 
548
548
  ## Next Steps
549
549
 
@@ -9,11 +9,11 @@ Types let you define reusable data structures for your agent. Use them in inputs
9
9
 
10
10
  ## Why Types?
11
11
 
12
- - **Reusability** Define once, use in multiple places
13
- - **Validation** Catch errors at protocol validation time
14
- - **Documentation** Clear data contracts for your agent
15
- - **Tool Parameters** Use complex types in tool parameters
16
- - **Structured Output** Get typed JSON responses from the LLM
12
+ - **Reusability** - Define once, use in multiple places
13
+ - **Validation** - Catch errors at protocol validation time
14
+ - **Documentation** - Clear data contracts for your agent
15
+ - **Tool Parameters** - Use complex types in tool parameters
16
+ - **Structured Output** - Get typed JSON responses from the LLM
17
17
 
18
18
  ## Defining Types
19
19
 
@@ -504,9 +504,9 @@ The tool receives: `{ cartItems: [{ productId: "...", quantity: 1 }, ...] }`
504
504
 
505
505
  Named array types provide:
506
506
 
507
- - **Reusability** Use the same array type in multiple tools
508
- - **Clear schema** The array structure is validated
509
- - **Clean tool calls** No unnecessary wrapper objects
507
+ - **Reusability** - Use the same array type in multiple tools
508
+ - **Clear schema** - The array structure is validated
509
+ - **Clean tool calls** - No unnecessary wrapper objects
510
510
 
511
511
  ## Structured Output
512
512
 
@@ -602,9 +602,9 @@ The `responseType` must be an **object type** (regular custom type with properti
602
602
 
603
603
  The following cannot be used directly as `responseType`:
604
604
 
605
- - **Discriminated unions** LLM providers don't allow `anyOf` at the schema root ([OpenAI docs](https://platform.openai.com/docs/guides/structured-outputs#root-objects-must-not-be-anyof-and-must-be-an-object))
606
- - **Array types** Must be wrapped in an object
607
- - **Primitives** `string`, `number`, etc. are not valid
605
+ - **Discriminated unions** - LLM providers don't allow `anyOf` at the schema root ([OpenAI docs](https://platform.openai.com/docs/guides/structured-outputs#root-objects-must-not-be-anyof-and-must-be-an-object))
606
+ - **Array types** - Must be wrapped in an object
607
+ - **Primitives** - `string`, `number`, etc. are not valid
608
608
 
609
609
  ```yaml
610
610
  types:
@@ -695,23 +695,23 @@ Types are validated when the protocol is loaded:
695
695
 
696
696
  ### Type Definition Limits
697
697
 
698
- - **No standalone `array` or `object`** Define a custom type instead, or use `unknown` for untyped data
699
- - **No recursive types** A type cannot reference itself (directly or indirectly)
700
- - **No generic types** Types are concrete, not parameterized
701
- - **String enums only** `enum` values must be strings
702
- - **No array constraints** `minItems` and `maxItems` are not supported (LLM providers don't enforce them)
698
+ - **No standalone `array` or `object`** - Define a custom type instead, or use `unknown` for untyped data
699
+ - **No recursive types** - A type cannot reference itself (directly or indirectly)
700
+ - **No generic types** - Types are concrete, not parameterized
701
+ - **String enums only** - `enum` values must be strings
702
+ - **No array constraints** - `minItems` and `maxItems` are not supported (LLM providers don't enforce them)
703
703
 
704
704
  ### Tool Limitations
705
705
 
706
- - **Tool parameters are always objects** Each tool call is `{ param1: value1, param2: value2, ... }`
707
- - **Array parameters need named types** Use top-level array types for array parameters
706
+ - **Tool parameters are always objects** - Each tool call is `{ param1: value1, param2: value2, ... }`
707
+ - **Array parameters need named types** - Use top-level array types for array parameters
708
708
 
709
709
  ### Structured Output Limitations
710
710
 
711
- - **responseType must be an object type** Only object types can be used as responseType
712
- - **Discriminated unions need object wrapper** Unions (`anyOf`) are not allowed at the schema root
713
- - **Array types need object wrapper** Arrays cannot be used directly as responseType
714
- - **Primitives are not allowed** `string`, `number`, etc. cannot be used as responseType
711
+ - **responseType must be an object type** - Only object types can be used as responseType
712
+ - **Discriminated unions need object wrapper** - Unions (`anyOf`) are not allowed at the schema root
713
+ - **Array types need object wrapper** - Arrays cannot be used directly as responseType
714
+ - **Primitives are not allowed** - `string`, `number`, etc. cannot be used as responseType
715
715
 
716
716
  These limitations exist because LLM providers (OpenAI, Anthropic) require the root schema to be an object:
717
717
 
@@ -11,16 +11,16 @@ Workers are agents designed for task-based execution. Unlike interactive agents
11
11
 
12
12
  Workers are ideal for:
13
13
 
14
- - **Background processing** Long-running tasks that don't need conversation
15
- - **Composable tasks** Reusable units of work called by other agents
16
- - **Pipelines** Multi-step processing with structured output
17
- - **Parallel execution** Tasks that can run independently
14
+ - **Background processing** - Long-running tasks that don't need conversation
15
+ - **Composable tasks** - Reusable units of work called by other agents
16
+ - **Pipelines** - Multi-step processing with structured output
17
+ - **Parallel execution** - Tasks that can run independently
18
18
 
19
19
  Use interactive agents instead when:
20
20
 
21
- - **Conversation is needed** Multi-turn dialogue with users
22
- - **Persistence matters** State should survive across interactions
23
- - **Session context** User context needs to persist
21
+ - **Conversation is needed** - Multi-turn dialogue with users
22
+ - **Persistence matters** - State should survive across interactions
23
+ - **Session context** - User context needs to persist
24
24
 
25
25
  ## Worker vs Interactive
26
26
 
@@ -124,7 +124,7 @@ Workers are identified by the `format` field:
124
124
 
125
125
  ### No Global Agent Config
126
126
 
127
- Interactive agents have a global `agent:` section that configures a main thread. Workers don't have this every thread must be explicitly created via `start-thread`:
127
+ Interactive agents have a global `agent:` section that configures a main thread. Workers don't have this - every thread must be explicitly created via `start-thread`:
128
128
 
129
129
  ```yaml
130
130
  # Interactive agent: Global config
@@ -219,20 +219,21 @@ steps:
219
219
 
220
220
  All LLM configuration goes here:
221
221
 
222
- | Field | Description |
223
- | ------------- | ------------------------------------------------- |
224
- | `thread` | Thread name (defaults to block name) |
225
- | `model` | LLM model to use |
226
- | `system` | System prompt filename (required) |
227
- | `input` | Variables for system prompt |
228
- | `tools` | Tools available in this thread |
229
- | `skills` | Octavus skills available in this thread |
230
- | `mcpServers` | MCP servers available in this thread |
231
- | `imageModel` | Image generation model |
232
- | `webSearch` | Enable built-in web search tool |
233
- | `thinking` | Extended reasoning level |
234
- | `temperature` | Model temperature |
235
- | `maxSteps` | Maximum tool call cycles (enables agentic if > 1) |
222
+ | Field | Description |
223
+ | ------------- | ----------------------------------------------------------- |
224
+ | `thread` | Thread name (defaults to block name) |
225
+ | `model` | LLM model to use |
226
+ | `system` | System prompt filename (required) |
227
+ | `input` | Variables for system prompt |
228
+ | `tools` | Tools available in this thread |
229
+ | `skills` | Octavus skills available in this thread |
230
+ | `mcpServers` | MCP servers available in this thread |
231
+ | `imageModel` | Image generation model |
232
+ | `webSearch` | Enable built-in web search tool |
233
+ | `thinking` | Extended reasoning level |
234
+ | `cache` | Prompt caching mode: `auto` (default), `extended`, or `off` |
235
+ | `temperature` | Model temperature |
236
+ | `maxSteps` | Maximum tool call cycles (enables agentic if > 1) |
236
237
 
237
238
  ## Simple Example
238
239
 
@@ -389,7 +390,7 @@ steps:
389
390
  maxSteps: 10
390
391
  ```
391
392
 
392
- Workers resolve their own MCP connections independently they don't inherit MCP servers from a parent interactive agent. Remote MCP connections are project-scoped, so a worker in the same project automatically has access to the same OAuth connections.
393
+ Workers resolve their own MCP connections independently - they don't inherit MCP servers from a parent interactive agent. Remote MCP connections are project-scoped, so a worker in the same project automatically has access to the same OAuth connections.
393
394
 
394
395
  See [MCP Servers](/docs/protocol/mcp-servers) for full documentation.
395
396
 
@@ -423,8 +424,8 @@ See [Skills](/docs/protocol/skills) for full documentation.
423
424
 
424
425
  Workers support the same tool handling as interactive agents:
425
426
 
426
- - **Server tools** Handled by tool handlers you provide
427
- - **Client tools** Pause execution, return tool request to caller
427
+ - **Server tools** - Handled by tool handlers you provide
428
+ - **Client tools** - Pause execution, return tool request to caller
428
429
 
429
430
  ```typescript
430
431
  // Non-streaming: get the output directly
@@ -467,8 +468,8 @@ All standard events (text-delta, tool calls, etc.) are also emitted.
467
468
 
468
469
  Interactive agents can call workers in two ways:
469
470
 
470
- 1. **Deterministically** Using the `run-worker` block
471
- 2. **Agentically** LLM calls worker as a tool
471
+ 1. **Deterministically** - Using the `run-worker` block
472
+ 2. **Agentically** - LLM calls worker as a tool
472
473
 
473
474
  ### Worker Declaration
474
475
 
@@ -542,6 +543,6 @@ When the worker calls its `search` tool, your `web-search` handler executes.
542
543
 
543
544
  ## Next Steps
544
545
 
545
- - [Server SDK Workers](/docs/server-sdk/workers) Executing workers from code
546
- - [Handlers](/docs/protocol/handlers) Block reference for steps
547
- - [Agent Config](/docs/protocol/agent-config) Model and settings
546
+ - [Server SDK Workers](/docs/server-sdk/workers) - Executing workers from code
547
+ - [Handlers](/docs/protocol/handlers) - Block reference for steps
548
+ - [Agent Config](/docs/protocol/agent-config) - Model and settings
@@ -11,9 +11,9 @@ References are markdown documents that agents can fetch on demand. Instead of lo
11
11
 
12
12
  References are useful for:
13
13
 
14
- - **Large context** Documents too long to include in every system prompt
15
- - **Selective loading** Let the agent decide which context is relevant
16
- - **Shared knowledge** Reusable documents across threads
14
+ - **Large context** - Documents too long to include in every system prompt
15
+ - **Selective loading** - Let the agent decide which context is relevant
16
+ - **Shared knowledge** - Reusable documents across threads
17
17
 
18
18
  ### How References Work
19
19
 
@@ -165,10 +165,10 @@ When a user asks the agent to review code, the agent will:
165
165
 
166
166
  The CLI and platform validate references during sync and deployment:
167
167
 
168
- - **Undefined references** Referencing a name that doesn't have a matching file in `references/`
169
- - **Unused references** A reference file exists but isn't listed in any `agent.references` or `start-thread.references`
170
- - **Invalid names** Names that don't follow the `lowercase-with-dashes` convention
171
- - **Missing description** Reference files without the required `description` in frontmatter
168
+ - **Undefined references** - Referencing a name that doesn't have a matching file in `references/`
169
+ - **Unused references** - A reference file exists but isn't listed in any `agent.references` or `start-thread.references`
170
+ - **Invalid names** - Names that don't follow the `lowercase-with-dashes` convention
171
+ - **Missing description** - Reference files without the required `description` in frontmatter
172
172
 
173
173
  ## References vs Skills
174
174
 
@@ -184,6 +184,6 @@ Use **references** when the agent needs access to text-based knowledge. Use **sk
184
184
 
185
185
  ## Next Steps
186
186
 
187
- - [Agent Config](/docs/protocol/agent-config) Configuring references in agent settings
188
- - [Skills](/docs/protocol/skills) Code execution and knowledge packages
189
- - [Workers](/docs/protocol/workers) Using references in worker agents
187
+ - [Agent Config](/docs/protocol/agent-config) - Configuring references in agent settings
188
+ - [Skills](/docs/protocol/skills) - Code execution and knowledge packages
189
+ - [Workers](/docs/protocol/workers) - Using references in worker agents