@octavus/docs 2.10.0 → 2.12.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.
- package/content/02-server-sdk/01-overview.md +16 -0
- package/content/02-server-sdk/05-cli.md +9 -3
- package/content/02-server-sdk/06-workers.md +218 -143
- package/content/03-client-sdk/08-file-uploads.md +57 -3
- package/content/04-protocol/01-overview.md +33 -6
- package/content/04-protocol/05-skills.md +43 -7
- package/content/04-protocol/06-handlers.md +3 -0
- package/content/04-protocol/07-agent-config.md +38 -13
- package/content/04-protocol/09-skills-advanced.md +50 -29
- package/content/04-protocol/11-workers.md +40 -5
- package/content/04-protocol/12-references.md +189 -0
- package/content/05-api-reference/03-agents.md +31 -9
- package/dist/{chunk-HPVIPOLY.js → chunk-PQ5AGOPY.js} +27 -27
- package/dist/chunk-PQ5AGOPY.js.map +1 -0
- package/dist/chunk-RRXIH3DI.js +1507 -0
- package/dist/chunk-RRXIH3DI.js.map +1 -0
- package/dist/{chunk-RZZE5BMI.js → chunk-SAB5XUB6.js} +49 -31
- package/dist/chunk-SAB5XUB6.js.map +1 -0
- package/dist/content.js +1 -1
- package/dist/docs.json +24 -15
- package/dist/index.js +1 -1
- package/dist/search-index.json +1 -1
- package/dist/search.js +1 -1
- package/dist/search.js.map +1 -1
- package/dist/sections.json +24 -15
- package/package.json +1 -1
- package/dist/chunk-HPVIPOLY.js.map +0 -1
- package/dist/chunk-RZZE5BMI.js.map +0 -1
|
@@ -61,24 +61,48 @@ skills:
|
|
|
61
61
|
|
|
62
62
|
## Enabling Skills
|
|
63
63
|
|
|
64
|
-
After defining skills in the `skills:` section, specify which skills are available
|
|
64
|
+
After defining skills in the `skills:` section, specify which skills are available. Skills work in both interactive agents and workers.
|
|
65
|
+
|
|
66
|
+
### Interactive Agents
|
|
67
|
+
|
|
68
|
+
Reference skills in `agent.skills`:
|
|
65
69
|
|
|
66
70
|
```yaml
|
|
67
|
-
# All skills available to this agent (defined once at protocol level)
|
|
68
71
|
skills:
|
|
69
72
|
qr-code:
|
|
70
73
|
display: description
|
|
71
74
|
description: Generating QR codes
|
|
72
75
|
|
|
73
|
-
# Skills available for this chat thread
|
|
74
76
|
agent:
|
|
75
77
|
model: anthropic/claude-sonnet-4-5
|
|
76
78
|
system: system
|
|
77
79
|
tools: [get-user-account]
|
|
78
|
-
skills: [qr-code]
|
|
80
|
+
skills: [qr-code]
|
|
79
81
|
agentic: true
|
|
80
82
|
```
|
|
81
83
|
|
|
84
|
+
### Workers and Named Threads
|
|
85
|
+
|
|
86
|
+
Reference skills per-thread in `start-thread.skills`:
|
|
87
|
+
|
|
88
|
+
```yaml
|
|
89
|
+
skills:
|
|
90
|
+
qr-code:
|
|
91
|
+
display: description
|
|
92
|
+
description: Generating QR codes
|
|
93
|
+
|
|
94
|
+
steps:
|
|
95
|
+
Start thread:
|
|
96
|
+
block: start-thread
|
|
97
|
+
thread: worker
|
|
98
|
+
model: anthropic/claude-sonnet-4-5
|
|
99
|
+
system: system
|
|
100
|
+
skills: [qr-code]
|
|
101
|
+
maxSteps: 10
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
This also works for named threads in interactive agents, allowing different threads to have different skills.
|
|
105
|
+
|
|
82
106
|
## Skill Tools
|
|
83
107
|
|
|
84
108
|
When skills are enabled, the LLM has access to these tools:
|
|
@@ -290,23 +314,35 @@ agent:
|
|
|
290
314
|
|
|
291
315
|
## Sandbox Timeout
|
|
292
316
|
|
|
293
|
-
The default sandbox timeout is 5 minutes.
|
|
317
|
+
The default sandbox timeout is 5 minutes. You can configure a custom timeout using `sandboxTimeout` in the agent config or on individual `start-thread` blocks:
|
|
294
318
|
|
|
295
319
|
```yaml
|
|
320
|
+
# Agent-level timeout (applies to main thread)
|
|
296
321
|
agent:
|
|
297
322
|
model: anthropic/claude-sonnet-4-5
|
|
298
323
|
skills: [data-analysis]
|
|
299
324
|
sandboxTimeout: 1800000 # 30 minutes (in milliseconds)
|
|
300
325
|
```
|
|
301
326
|
|
|
302
|
-
|
|
327
|
+
```yaml
|
|
328
|
+
# Thread-level timeout (overrides agent-level for this thread)
|
|
329
|
+
steps:
|
|
330
|
+
Start thread:
|
|
331
|
+
block: start-thread
|
|
332
|
+
thread: analysis
|
|
333
|
+
model: anthropic/claude-sonnet-4-5
|
|
334
|
+
skills: [data-analysis]
|
|
335
|
+
sandboxTimeout: 3600000 # 1 hour
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
Thread-level `sandboxTimeout` takes priority over agent-level. Maximum: 1 hour (3,600,000 ms).
|
|
303
339
|
|
|
304
340
|
## Security
|
|
305
341
|
|
|
306
342
|
Skills run in isolated sandbox environments:
|
|
307
343
|
|
|
308
344
|
- **No network access** (unless explicitly configured)
|
|
309
|
-
- **No persistent storage** (sandbox destroyed after execution)
|
|
345
|
+
- **No persistent storage** (sandbox destroyed after each `next-message` execution)
|
|
310
346
|
- **File output only** via `/output/` directory
|
|
311
347
|
- **Time limits** enforced (5-minute default, configurable via `sandboxTimeout`)
|
|
312
348
|
|
|
@@ -148,6 +148,9 @@ Start summary thread:
|
|
|
148
148
|
maxSteps: 1 # Tool call limit
|
|
149
149
|
system: escalation-summary # System prompt
|
|
150
150
|
input: [COMPANY_NAME] # Variables for prompt
|
|
151
|
+
skills: [qr-code] # Octavus skills for this thread
|
|
152
|
+
sandboxTimeout: 600000 # Skill sandbox timeout (default: 5 min, max: 1 hour)
|
|
153
|
+
imageModel: google/gemini-2.5-flash-image # Image generation model
|
|
151
154
|
```
|
|
152
155
|
|
|
153
156
|
The `model` field can also reference a variable for dynamic model selection:
|
|
@@ -15,23 +15,26 @@ agent:
|
|
|
15
15
|
system: system # References prompts/system.md
|
|
16
16
|
tools: [get-user-account] # Available tools
|
|
17
17
|
skills: [qr-code] # Available skills
|
|
18
|
+
references: [api-guidelines] # On-demand context documents
|
|
18
19
|
```
|
|
19
20
|
|
|
20
21
|
## Configuration Options
|
|
21
22
|
|
|
22
|
-
| Field
|
|
23
|
-
|
|
|
24
|
-
| `model`
|
|
25
|
-
| `system`
|
|
26
|
-
| `input`
|
|
27
|
-
| `tools`
|
|
28
|
-
| `skills`
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
23
|
+
| Field | Required | Description |
|
|
24
|
+
| ---------------- | -------- | --------------------------------------------------------- |
|
|
25
|
+
| `model` | Yes | Model identifier or variable reference |
|
|
26
|
+
| `system` | Yes | System prompt filename (without .md) |
|
|
27
|
+
| `input` | No | Variables to pass to the system prompt |
|
|
28
|
+
| `tools` | No | List of tools the LLM can call |
|
|
29
|
+
| `skills` | No | List of Octavus skills the LLM can use |
|
|
30
|
+
| `references` | No | List of references the LLM can fetch on demand |
|
|
31
|
+
| `sandboxTimeout` | No | Skill sandbox timeout in ms (default: 5 min, max: 1 hour) |
|
|
32
|
+
| `imageModel` | No | Image generation model (enables agentic image generation) |
|
|
33
|
+
| `agentic` | No | Allow multiple tool call cycles |
|
|
34
|
+
| `maxSteps` | No | Maximum agentic steps (default: 10) |
|
|
35
|
+
| `temperature` | No | Model temperature (0-2) |
|
|
36
|
+
| `thinking` | No | Extended reasoning level |
|
|
37
|
+
| `anthropic` | No | Anthropic-specific options (tools, skills) |
|
|
35
38
|
|
|
36
39
|
## Models
|
|
37
40
|
|
|
@@ -211,6 +214,22 @@ Skills provide provider-agnostic code execution in isolated sandboxes. When enab
|
|
|
211
214
|
|
|
212
215
|
See [Skills](/docs/protocol/skills) for full documentation.
|
|
213
216
|
|
|
217
|
+
## References
|
|
218
|
+
|
|
219
|
+
Enable on-demand context loading via reference documents:
|
|
220
|
+
|
|
221
|
+
```yaml
|
|
222
|
+
agent:
|
|
223
|
+
model: anthropic/claude-sonnet-4-5
|
|
224
|
+
system: system
|
|
225
|
+
references: [api-guidelines, error-codes]
|
|
226
|
+
agentic: true
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
References are markdown files stored in the agent's `references/` directory. When enabled, the LLM can list available references and read their content using `octavus_reference_list` and `octavus_reference_read` tools.
|
|
230
|
+
|
|
231
|
+
See [References](/docs/protocol/references) for full documentation.
|
|
232
|
+
|
|
214
233
|
## Image Generation
|
|
215
234
|
|
|
216
235
|
Enable the LLM to generate images autonomously:
|
|
@@ -319,8 +338,13 @@ handlers:
|
|
|
319
338
|
thinking: low # Different thinking
|
|
320
339
|
maxSteps: 1 # Limit tool calls
|
|
321
340
|
system: escalation-summary # Different prompt
|
|
341
|
+
skills: [data-analysis] # Thread-specific skills
|
|
342
|
+
references: [escalation-policy] # Thread-specific references
|
|
343
|
+
imageModel: google/gemini-2.5-flash-image # Thread-specific image model
|
|
322
344
|
```
|
|
323
345
|
|
|
346
|
+
Each thread can have its own skills, references, and image model. 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.
|
|
347
|
+
|
|
324
348
|
## Full Example
|
|
325
349
|
|
|
326
350
|
```yaml
|
|
@@ -367,6 +391,7 @@ agent:
|
|
|
367
391
|
- search-docs
|
|
368
392
|
- create-support-ticket
|
|
369
393
|
skills: [qr-code] # Octavus skills
|
|
394
|
+
references: [support-policies] # On-demand context
|
|
370
395
|
agentic: true
|
|
371
396
|
maxSteps: 10
|
|
372
397
|
thinking: medium
|
|
@@ -26,10 +26,11 @@ Use external tools instead when:
|
|
|
26
26
|
|
|
27
27
|
### Defining Available Skills
|
|
28
28
|
|
|
29
|
-
Define all 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]
|
|
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
|
-
|
|
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]
|
|
88
|
+
skills: [qr-code]
|
|
73
89
|
```
|
|
74
90
|
|
|
75
|
-
For a data analysis thread, you would specify `[data-analysis, visualization]` in `agent.skills
|
|
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
|
|
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
|
-
-
|
|
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
|
|
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
|
|
245
|
+
sandboxTimeout: 1800000 # 30 minutes
|
|
230
246
|
```
|
|
231
247
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
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
|
-
-
|
|
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
|
|
262
|
+
Each `next-message` execution gets its own sandbox:
|
|
243
263
|
|
|
244
|
-
- **
|
|
245
|
-
- **Isolated** -
|
|
246
|
-
- **
|
|
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
|
|
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
|
-
| `
|
|
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
|
);
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: References
|
|
3
|
+
description: Using references for on-demand context loading in agents.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# References
|
|
7
|
+
|
|
8
|
+
References are markdown documents that agents can fetch on demand. Instead of loading everything into the system prompt upfront, references let the agent decide what context it needs and load it when relevant.
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
References are useful for:
|
|
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
|
|
17
|
+
|
|
18
|
+
### How References Work
|
|
19
|
+
|
|
20
|
+
1. **Definition**: Reference files live in the `references/` directory alongside your agent
|
|
21
|
+
2. **Configuration**: List available references in `agent.references` or `start-thread.references`
|
|
22
|
+
3. **Discovery**: The agent sees reference names and descriptions in its system prompt
|
|
23
|
+
4. **Fetching**: The agent calls reference tools to read the full content when needed
|
|
24
|
+
|
|
25
|
+
## Creating References
|
|
26
|
+
|
|
27
|
+
Each reference is a markdown file with YAML frontmatter in the `references/` directory:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
my-agent/
|
|
31
|
+
├── settings.json
|
|
32
|
+
├── protocol.yaml
|
|
33
|
+
├── prompts/
|
|
34
|
+
│ └── system.md
|
|
35
|
+
└── references/
|
|
36
|
+
├── api-guidelines.md
|
|
37
|
+
└── error-codes.md
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Reference Format
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
---
|
|
44
|
+
description: >
|
|
45
|
+
API design guidelines including naming conventions,
|
|
46
|
+
error handling patterns, and pagination standards.
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
# API Guidelines
|
|
50
|
+
|
|
51
|
+
## Naming Conventions
|
|
52
|
+
|
|
53
|
+
Use lowercase with dashes for URL paths...
|
|
54
|
+
|
|
55
|
+
## Error Handling
|
|
56
|
+
|
|
57
|
+
All errors return a standard error envelope...
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
The `description` field is required. It tells the agent what the reference contains so it can decide when to fetch it.
|
|
61
|
+
|
|
62
|
+
### Naming Convention
|
|
63
|
+
|
|
64
|
+
Reference filenames use `lowercase-with-dashes`:
|
|
65
|
+
|
|
66
|
+
- `api-guidelines.md`
|
|
67
|
+
- `error-codes.md`
|
|
68
|
+
- `coding-standards.md`
|
|
69
|
+
|
|
70
|
+
The filename (without `.md`) becomes the reference name used in the protocol.
|
|
71
|
+
|
|
72
|
+
## Enabling References
|
|
73
|
+
|
|
74
|
+
After creating reference files, specify which references are available in the protocol.
|
|
75
|
+
|
|
76
|
+
### Interactive Agents
|
|
77
|
+
|
|
78
|
+
List references in `agent.references`:
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
agent:
|
|
82
|
+
model: anthropic/claude-sonnet-4-5
|
|
83
|
+
system: system
|
|
84
|
+
references: [api-guidelines, error-codes]
|
|
85
|
+
agentic: true
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Workers and Named Threads
|
|
89
|
+
|
|
90
|
+
List references per-thread in `start-thread.references`:
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
steps:
|
|
94
|
+
Start thread:
|
|
95
|
+
block: start-thread
|
|
96
|
+
thread: worker
|
|
97
|
+
model: anthropic/claude-sonnet-4-5
|
|
98
|
+
system: system
|
|
99
|
+
references: [api-guidelines]
|
|
100
|
+
maxSteps: 10
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Different threads can have different references.
|
|
104
|
+
|
|
105
|
+
## Reference Tools
|
|
106
|
+
|
|
107
|
+
When references are enabled, the agent has access to two tools:
|
|
108
|
+
|
|
109
|
+
| Tool | Purpose |
|
|
110
|
+
| ------------------------ | ----------------------------------------------- |
|
|
111
|
+
| `octavus_reference_list` | List all available references with descriptions |
|
|
112
|
+
| `octavus_reference_read` | Read the full content of a specific reference |
|
|
113
|
+
|
|
114
|
+
The agent also sees reference names and descriptions in its system prompt, so it knows what's available without calling `octavus_reference_list`.
|
|
115
|
+
|
|
116
|
+
## Example
|
|
117
|
+
|
|
118
|
+
```yaml
|
|
119
|
+
agent:
|
|
120
|
+
model: anthropic/claude-sonnet-4-5
|
|
121
|
+
system: system
|
|
122
|
+
tools: [review-pull-request]
|
|
123
|
+
references: [coding-standards, api-guidelines]
|
|
124
|
+
agentic: true
|
|
125
|
+
|
|
126
|
+
handlers:
|
|
127
|
+
user-message:
|
|
128
|
+
Add message:
|
|
129
|
+
block: add-message
|
|
130
|
+
role: user
|
|
131
|
+
prompt: user-message
|
|
132
|
+
input: [USER_MESSAGE]
|
|
133
|
+
|
|
134
|
+
Respond:
|
|
135
|
+
block: next-message
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
With `references/coding-standards.md`:
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
---
|
|
142
|
+
description: >
|
|
143
|
+
Team coding standards including naming conventions,
|
|
144
|
+
code organization, and review checklist.
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
# Coding Standards
|
|
148
|
+
|
|
149
|
+
## Naming Conventions
|
|
150
|
+
|
|
151
|
+
- Files: kebab-case
|
|
152
|
+
- Variables: camelCase
|
|
153
|
+
- Constants: UPPER_SNAKE_CASE
|
|
154
|
+
...
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
When a user asks the agent to review code, the agent will:
|
|
158
|
+
|
|
159
|
+
1. See "coding-standards" and "api-guidelines" in its system prompt
|
|
160
|
+
2. Decide which references are relevant to the review
|
|
161
|
+
3. Call `octavus_reference_read` to load the relevant reference
|
|
162
|
+
4. Use the loaded context to provide an informed review
|
|
163
|
+
|
|
164
|
+
## Validation
|
|
165
|
+
|
|
166
|
+
The CLI and platform validate references during sync and deployment:
|
|
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
|
|
172
|
+
|
|
173
|
+
## References vs Skills
|
|
174
|
+
|
|
175
|
+
| Aspect | References | Skills |
|
|
176
|
+
| ------------- | ----------------------------- | ------------------------------- |
|
|
177
|
+
| **Purpose** | On-demand context documents | Code execution and file output |
|
|
178
|
+
| **Content** | Markdown text | Documentation + scripts |
|
|
179
|
+
| **Execution** | Synchronous text retrieval | Sandboxed code execution (E2B) |
|
|
180
|
+
| **Scope** | Per-agent (stored with agent) | Per-organization (shared) |
|
|
181
|
+
| **Tools** | List and read (2 tools) | Read, list, run, code (6 tools) |
|
|
182
|
+
|
|
183
|
+
Use **references** when the agent needs access to text-based knowledge. Use **skills** when the agent needs to execute code or generate files.
|
|
184
|
+
|
|
185
|
+
## Next Steps
|
|
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
|
|
@@ -5,7 +5,7 @@ description: Agent management API endpoints.
|
|
|
5
5
|
|
|
6
6
|
# Agents API
|
|
7
7
|
|
|
8
|
-
Manage agent definitions including protocols and
|
|
8
|
+
Manage agent definitions including protocols, prompts, and references.
|
|
9
9
|
|
|
10
10
|
## Permissions
|
|
11
11
|
|
|
@@ -82,6 +82,13 @@ GET /api/agents/:id
|
|
|
82
82
|
"name": "user-message",
|
|
83
83
|
"content": "{{USER_MESSAGE}}"
|
|
84
84
|
}
|
|
85
|
+
],
|
|
86
|
+
"references": [
|
|
87
|
+
{
|
|
88
|
+
"name": "api-guidelines",
|
|
89
|
+
"description": "API design guidelines and conventions",
|
|
90
|
+
"content": "# API Guidelines\n\nUse lowercase with dashes..."
|
|
91
|
+
}
|
|
85
92
|
]
|
|
86
93
|
}
|
|
87
94
|
```
|
|
@@ -119,18 +126,26 @@ POST /api/agents
|
|
|
119
126
|
"name": "system",
|
|
120
127
|
"content": "You are a support agent..."
|
|
121
128
|
}
|
|
129
|
+
],
|
|
130
|
+
"references": [
|
|
131
|
+
{
|
|
132
|
+
"name": "api-guidelines",
|
|
133
|
+
"description": "API design guidelines and conventions",
|
|
134
|
+
"content": "# API Guidelines\n..."
|
|
135
|
+
}
|
|
122
136
|
]
|
|
123
137
|
}
|
|
124
138
|
```
|
|
125
139
|
|
|
126
|
-
| Field | Type | Required | Description
|
|
127
|
-
| ---------------------- | ------ | -------- |
|
|
128
|
-
| `settings.slug` | string | Yes | URL-safe identifier
|
|
129
|
-
| `settings.name` | string | Yes | Display name
|
|
130
|
-
| `settings.description` | string | No | Agent description
|
|
131
|
-
| `settings.format` | string | Yes | `interactive` or `worker`
|
|
132
|
-
| `protocol` | string | Yes | YAML protocol definition
|
|
133
|
-
| `prompts` | array | Yes | Prompt files
|
|
140
|
+
| Field | Type | Required | Description |
|
|
141
|
+
| ---------------------- | ------ | -------- | ------------------------------------------------ |
|
|
142
|
+
| `settings.slug` | string | Yes | URL-safe identifier |
|
|
143
|
+
| `settings.name` | string | Yes | Display name |
|
|
144
|
+
| `settings.description` | string | No | Agent description |
|
|
145
|
+
| `settings.format` | string | Yes | `interactive` or `worker` |
|
|
146
|
+
| `protocol` | string | Yes | YAML protocol definition |
|
|
147
|
+
| `prompts` | array | Yes | Prompt files |
|
|
148
|
+
| `references` | array | No | Reference documents (name, description, content) |
|
|
134
149
|
|
|
135
150
|
### Response
|
|
136
151
|
|
|
@@ -178,6 +193,13 @@ PATCH /api/agents/:id
|
|
|
178
193
|
"name": "system",
|
|
179
194
|
"content": "Updated system prompt..."
|
|
180
195
|
}
|
|
196
|
+
],
|
|
197
|
+
"references": [
|
|
198
|
+
{
|
|
199
|
+
"name": "api-guidelines",
|
|
200
|
+
"description": "Updated description",
|
|
201
|
+
"content": "Updated content..."
|
|
202
|
+
}
|
|
181
203
|
]
|
|
182
204
|
}
|
|
183
205
|
```
|