@octavus/docs 0.0.9 → 1.0.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/README.md +127 -0
- package/content/01-getting-started/01-introduction.md +3 -3
- package/content/01-getting-started/02-quickstart.md +40 -17
- package/content/02-server-sdk/01-overview.md +54 -11
- package/content/02-server-sdk/02-sessions.md +166 -15
- package/content/02-server-sdk/03-tools.md +21 -21
- package/content/02-server-sdk/04-streaming.md +50 -20
- package/content/02-server-sdk/05-cli.md +247 -0
- package/content/03-client-sdk/01-overview.md +65 -35
- package/content/03-client-sdk/02-messages.md +116 -8
- package/content/03-client-sdk/03-streaming.md +36 -17
- package/content/03-client-sdk/04-execution-blocks.md +8 -12
- package/content/03-client-sdk/05-socket-transport.md +161 -45
- package/content/03-client-sdk/06-http-transport.md +48 -24
- package/content/03-client-sdk/07-structured-output.md +412 -0
- package/content/03-client-sdk/08-file-uploads.md +473 -0
- package/content/03-client-sdk/09-error-handling.md +274 -0
- package/content/04-protocol/01-overview.md +24 -14
- package/content/04-protocol/02-input-resources.md +35 -35
- package/content/04-protocol/03-triggers.md +9 -11
- package/content/04-protocol/04-tools.md +63 -29
- package/content/04-protocol/05-skills.md +304 -0
- package/content/04-protocol/06-handlers.md +304 -0
- package/content/04-protocol/07-agent-config.md +334 -0
- package/content/04-protocol/{07-provider-options.md → 08-provider-options.md} +54 -35
- package/content/04-protocol/09-skills-advanced.md +439 -0
- package/content/04-protocol/10-types.md +719 -0
- package/content/05-api-reference/01-overview.md +20 -21
- package/content/05-api-reference/02-sessions.md +192 -37
- package/content/05-api-reference/03-agents.md +25 -37
- package/content/06-examples/01-overview.md +6 -4
- package/content/06-examples/02-nextjs-chat.md +28 -18
- package/content/06-examples/03-socket-chat.md +53 -30
- package/content/06-examples/_meta.md +0 -1
- package/dist/chunk-WJ2W3DUC.js +663 -0
- package/dist/chunk-WJ2W3DUC.js.map +1 -0
- package/dist/content.js +1 -1
- package/dist/docs.json +99 -36
- 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 +99 -36
- package/package.json +12 -2
- package/content/04-protocol/05-handlers.md +0 -251
- package/content/04-protocol/06-agent-config.md +0 -242
- package/dist/chunk-232K4EME.js +0 -439
- package/dist/chunk-232K4EME.js.map +0 -1
- package/dist/chunk-2JDZLMS3.js +0 -439
- package/dist/chunk-2JDZLMS3.js.map +0 -1
- package/dist/chunk-2YMRODFE.js +0 -421
- package/dist/chunk-2YMRODFE.js.map +0 -1
- package/dist/chunk-2ZBPX5QB.js +0 -421
- package/dist/chunk-2ZBPX5QB.js.map +0 -1
- package/dist/chunk-3PIIST4D.js +0 -421
- package/dist/chunk-3PIIST4D.js.map +0 -1
- package/dist/chunk-42JETGDO.js +0 -421
- package/dist/chunk-42JETGDO.js.map +0 -1
- package/dist/chunk-4WWUKU4V.js +0 -421
- package/dist/chunk-4WWUKU4V.js.map +0 -1
- package/dist/chunk-5M7DS4DF.js +0 -519
- package/dist/chunk-5M7DS4DF.js.map +0 -1
- package/dist/chunk-6JQ3OMGF.js +0 -421
- package/dist/chunk-6JQ3OMGF.js.map +0 -1
- package/dist/chunk-7AOWCJHW.js +0 -421
- package/dist/chunk-7AOWCJHW.js.map +0 -1
- package/dist/chunk-7AS4ST73.js +0 -421
- package/dist/chunk-7AS4ST73.js.map +0 -1
- package/dist/chunk-7F5WOCIL.js +0 -421
- package/dist/chunk-7F5WOCIL.js.map +0 -1
- package/dist/chunk-7FPUAWSX.js +0 -421
- package/dist/chunk-7FPUAWSX.js.map +0 -1
- package/dist/chunk-7KXF63FV.js +0 -537
- package/dist/chunk-7KXF63FV.js.map +0 -1
- package/dist/chunk-APASMJBS.js +0 -421
- package/dist/chunk-APASMJBS.js.map +0 -1
- package/dist/chunk-BCEV3WV2.js +0 -421
- package/dist/chunk-BCEV3WV2.js.map +0 -1
- package/dist/chunk-CHGY4G27.js +0 -421
- package/dist/chunk-CHGY4G27.js.map +0 -1
- package/dist/chunk-CI7JDWKU.js +0 -421
- package/dist/chunk-CI7JDWKU.js.map +0 -1
- package/dist/chunk-CVFWWRL7.js +0 -421
- package/dist/chunk-CVFWWRL7.js.map +0 -1
- package/dist/chunk-EPDM2NIJ.js +0 -421
- package/dist/chunk-EPDM2NIJ.js.map +0 -1
- package/dist/chunk-ESGSYVGK.js +0 -421
- package/dist/chunk-ESGSYVGK.js.map +0 -1
- package/dist/chunk-GDCTM2SV.js +0 -421
- package/dist/chunk-GDCTM2SV.js.map +0 -1
- package/dist/chunk-GJ6FMIPD.js +0 -421
- package/dist/chunk-GJ6FMIPD.js.map +0 -1
- package/dist/chunk-H6JGSSAJ.js +0 -519
- package/dist/chunk-H6JGSSAJ.js.map +0 -1
- package/dist/chunk-IKQHGGUZ.js +0 -421
- package/dist/chunk-IKQHGGUZ.js.map +0 -1
- package/dist/chunk-IUKE3XDN.js +0 -421
- package/dist/chunk-IUKE3XDN.js.map +0 -1
- package/dist/chunk-J26MLMLN.js +0 -421
- package/dist/chunk-J26MLMLN.js.map +0 -1
- package/dist/chunk-J7BMB3ZW.js +0 -421
- package/dist/chunk-J7BMB3ZW.js.map +0 -1
- package/dist/chunk-JCBQRD5N.js +0 -421
- package/dist/chunk-JCBQRD5N.js.map +0 -1
- package/dist/chunk-JOB6YWEF.js +0 -421
- package/dist/chunk-JOB6YWEF.js.map +0 -1
- package/dist/chunk-JZRABTHU.js +0 -519
- package/dist/chunk-JZRABTHU.js.map +0 -1
- package/dist/chunk-K3GFQUMC.js +0 -421
- package/dist/chunk-K3GFQUMC.js.map +0 -1
- package/dist/chunk-LWYMRXBF.js +0 -421
- package/dist/chunk-LWYMRXBF.js.map +0 -1
- package/dist/chunk-M2R2NDPR.js +0 -421
- package/dist/chunk-M2R2NDPR.js.map +0 -1
- package/dist/chunk-MA3P7WCA.js +0 -421
- package/dist/chunk-MA3P7WCA.js.map +0 -1
- package/dist/chunk-MDMRCS4W.mjs +0 -421
- package/dist/chunk-MDMRCS4W.mjs.map +0 -1
- package/dist/chunk-MJXTA2R6.js +0 -421
- package/dist/chunk-MJXTA2R6.js.map +0 -1
- package/dist/chunk-NFVJQNDP.js +0 -421
- package/dist/chunk-NFVJQNDP.js.map +0 -1
- package/dist/chunk-O5TLYMQP.js +0 -421
- package/dist/chunk-O5TLYMQP.js.map +0 -1
- package/dist/chunk-OECAPVSX.js +0 -439
- package/dist/chunk-OECAPVSX.js.map +0 -1
- package/dist/chunk-OL5QDJ42.js +0 -483
- package/dist/chunk-OL5QDJ42.js.map +0 -1
- package/dist/chunk-PMOVVTHO.js +0 -519
- package/dist/chunk-PMOVVTHO.js.map +0 -1
- package/dist/chunk-QCHDPR2D.js +0 -421
- package/dist/chunk-QCHDPR2D.js.map +0 -1
- package/dist/chunk-R5MTVABN.js +0 -439
- package/dist/chunk-R5MTVABN.js.map +0 -1
- package/dist/chunk-RJ4H4YVA.js +0 -519
- package/dist/chunk-RJ4H4YVA.js.map +0 -1
- package/dist/chunk-S5U4IWCR.js +0 -439
- package/dist/chunk-S5U4IWCR.js.map +0 -1
- package/dist/chunk-SCKIOGKI.js +0 -421
- package/dist/chunk-SCKIOGKI.js.map +0 -1
- package/dist/chunk-TGJSIJYP.js +0 -421
- package/dist/chunk-TGJSIJYP.js.map +0 -1
- package/dist/chunk-TQJG6EBM.js +0 -537
- package/dist/chunk-TQJG6EBM.js.map +0 -1
- package/dist/chunk-TQZRBMU7.js +0 -421
- package/dist/chunk-TQZRBMU7.js.map +0 -1
- package/dist/chunk-TRL4RSEO.js +0 -421
- package/dist/chunk-TRL4RSEO.js.map +0 -1
- package/dist/chunk-TWUMRHQ7.js +0 -421
- package/dist/chunk-TWUMRHQ7.js.map +0 -1
- package/dist/chunk-UCJE36LL.js +0 -519
- package/dist/chunk-UCJE36LL.js.map +0 -1
- package/dist/chunk-VCASA6KL.js +0 -421
- package/dist/chunk-VCASA6KL.js.map +0 -1
- package/dist/chunk-VWPQ6ORV.js +0 -421
- package/dist/chunk-VWPQ6ORV.js.map +0 -1
- package/dist/chunk-WPXKIHLT.js +0 -421
- package/dist/chunk-WPXKIHLT.js.map +0 -1
- package/dist/chunk-WUNFFJ32.js +0 -421
- package/dist/chunk-WUNFFJ32.js.map +0 -1
- package/dist/chunk-WW7TRC7S.js +0 -519
- package/dist/chunk-WW7TRC7S.js.map +0 -1
- package/dist/chunk-XVSMRXBJ.js +0 -421
- package/dist/chunk-XVSMRXBJ.js.map +0 -1
- package/dist/chunk-YPPXXV3I.js +0 -421
- package/dist/chunk-YPPXXV3I.js.map +0 -1
- package/dist/chunk-ZKZVV4OQ.js +0 -421
- package/dist/chunk-ZKZVV4OQ.js.map +0 -1
- package/dist/chunk-ZOFEX73I.js +0 -421
- package/dist/chunk-ZOFEX73I.js.map +0 -1
- package/dist/content.mjs +0 -17
- package/dist/content.mjs.map +0 -1
- package/dist/index.mjs +0 -11
- package/dist/index.mjs.map +0 -1
- package/dist/search.mjs +0 -30
- package/dist/search.mjs.map +0 -1
- package/dist/types-BltYGlWI.d.ts +0 -36
|
@@ -7,6 +7,8 @@ description: Configuring provider-specific tools and features.
|
|
|
7
7
|
|
|
8
8
|
Provider options let you enable provider-specific features like Anthropic's built-in tools and skills. These features run server-side on the provider's infrastructure.
|
|
9
9
|
|
|
10
|
+
> **Note**: For provider-agnostic code execution, use [Octavus Skills](/docs/protocol/skills) instead. Octavus Skills work with any LLM provider and run in isolated sandbox environments.
|
|
11
|
+
|
|
10
12
|
## Anthropic Options
|
|
11
13
|
|
|
12
14
|
Configure Anthropic-specific features when using `anthropic/*` models:
|
|
@@ -41,9 +43,9 @@ Provider tools are executed server-side by the provider (Anthropic). Unlike exte
|
|
|
41
43
|
|
|
42
44
|
### Available Tools
|
|
43
45
|
|
|
44
|
-
| Tool
|
|
45
|
-
|
|
46
|
-
| `web-search`
|
|
46
|
+
| Tool | Description |
|
|
47
|
+
| ---------------- | -------------------------------------------- |
|
|
48
|
+
| `web-search` | Search the web for current information |
|
|
47
49
|
| `code-execution` | Execute Python/Bash in a sandboxed container |
|
|
48
50
|
|
|
49
51
|
### Tool Configuration
|
|
@@ -52,14 +54,14 @@ Provider tools are executed server-side by the provider (Anthropic). Unlike exte
|
|
|
52
54
|
anthropic:
|
|
53
55
|
tools:
|
|
54
56
|
web-search:
|
|
55
|
-
display: description
|
|
57
|
+
display: description # How to show in UI
|
|
56
58
|
description: Searching... # Custom display text
|
|
57
59
|
```
|
|
58
60
|
|
|
59
|
-
| Field
|
|
60
|
-
|
|
61
|
-
| `display`
|
|
62
|
-
| `description` | No
|
|
61
|
+
| Field | Required | Description |
|
|
62
|
+
| ------------- | -------- | --------------------------------------------------------------------- |
|
|
63
|
+
| `display` | No | `hidden`, `name`, `description`, or `stream` (default: `description`) |
|
|
64
|
+
| `description` | No | Custom text shown to users during execution |
|
|
63
65
|
|
|
64
66
|
### Web Search
|
|
65
67
|
|
|
@@ -76,6 +78,7 @@ agent:
|
|
|
76
78
|
```
|
|
77
79
|
|
|
78
80
|
Use cases:
|
|
81
|
+
|
|
79
82
|
- Current events and news
|
|
80
83
|
- Real-time data (prices, weather)
|
|
81
84
|
- Fact verification
|
|
@@ -96,6 +99,7 @@ agent:
|
|
|
96
99
|
```
|
|
97
100
|
|
|
98
101
|
Use cases:
|
|
102
|
+
|
|
99
103
|
- Data analysis and calculations
|
|
100
104
|
- File processing
|
|
101
105
|
- Chart generation
|
|
@@ -105,7 +109,9 @@ Use cases:
|
|
|
105
109
|
|
|
106
110
|
## Skills
|
|
107
111
|
|
|
108
|
-
|
|
112
|
+
> **Important**: This section covers **Anthropic's built-in skills** (provider-specific). For provider-agnostic skills that work with any LLM, see [Octavus Skills](/docs/protocol/skills).
|
|
113
|
+
|
|
114
|
+
Anthropic skills are knowledge packages that give the agent specialized capabilities. They're loaded into Anthropic's code execution container at `/skills/{skill-id}/` and only work with Anthropic models.
|
|
109
115
|
|
|
110
116
|
### Skill Configuration
|
|
111
117
|
|
|
@@ -113,29 +119,29 @@ Skills are knowledge packages that give the agent specialized capabilities. They
|
|
|
113
119
|
anthropic:
|
|
114
120
|
skills:
|
|
115
121
|
pdf:
|
|
116
|
-
type: anthropic
|
|
117
|
-
version: latest
|
|
122
|
+
type: anthropic # 'anthropic' or 'custom'
|
|
123
|
+
version: latest # Optional version
|
|
118
124
|
display: description
|
|
119
125
|
description: Processing PDF
|
|
120
126
|
```
|
|
121
127
|
|
|
122
|
-
| Field
|
|
123
|
-
|
|
124
|
-
| `type`
|
|
125
|
-
| `version`
|
|
126
|
-
| `display`
|
|
127
|
-
| `description` | No
|
|
128
|
+
| Field | Required | Description |
|
|
129
|
+
| ------------- | -------- | --------------------------------------------------------------------- |
|
|
130
|
+
| `type` | Yes | `anthropic` (built-in) or `custom` (uploaded) |
|
|
131
|
+
| `version` | No | Skill version (default: `latest`) |
|
|
132
|
+
| `display` | No | `hidden`, `name`, `description`, or `stream` (default: `description`) |
|
|
133
|
+
| `description` | No | Custom text shown to users |
|
|
128
134
|
|
|
129
135
|
### Built-in Skills
|
|
130
136
|
|
|
131
137
|
Anthropic provides several built-in skills:
|
|
132
138
|
|
|
133
|
-
| Skill ID | Purpose
|
|
134
|
-
|
|
135
|
-
| `pdf`
|
|
136
|
-
| `xlsx`
|
|
137
|
-
| `docx`
|
|
138
|
-
| `pptx`
|
|
139
|
+
| Skill ID | Purpose |
|
|
140
|
+
| -------- | ----------------------------------------------- |
|
|
141
|
+
| `pdf` | PDF manipulation, text extraction, form filling |
|
|
142
|
+
| `xlsx` | Excel spreadsheet operations and analysis |
|
|
143
|
+
| `docx` | Word document creation and editing |
|
|
144
|
+
| `pptx` | PowerPoint presentation creation |
|
|
139
145
|
|
|
140
146
|
### Using Skills
|
|
141
147
|
|
|
@@ -154,6 +160,7 @@ agent:
|
|
|
154
160
|
```
|
|
155
161
|
|
|
156
162
|
When skills are configured:
|
|
163
|
+
|
|
157
164
|
1. Code execution is automatically enabled
|
|
158
165
|
2. Skill files are loaded into the container
|
|
159
166
|
3. The agent can read skill instructions and execute scripts
|
|
@@ -165,26 +172,39 @@ You can create and upload custom skills to Anthropic:
|
|
|
165
172
|
```yaml
|
|
166
173
|
anthropic:
|
|
167
174
|
skills:
|
|
168
|
-
|
|
175
|
+
custom-analysis:
|
|
169
176
|
type: custom
|
|
170
177
|
version: latest
|
|
171
178
|
description: Running custom analysis
|
|
172
179
|
```
|
|
173
180
|
|
|
174
181
|
Custom skills follow the [Agent Skills standard](https://agentskills.io) and contain:
|
|
182
|
+
|
|
175
183
|
- `SKILL.md` with instructions and metadata
|
|
176
184
|
- Optional `scripts/`, `references/`, and `assets/` directories
|
|
177
185
|
|
|
186
|
+
### Octavus Skills vs Anthropic Skills
|
|
187
|
+
|
|
188
|
+
| Feature | Anthropic Skills | Octavus Skills |
|
|
189
|
+
| ----------------- | ------------------------ | ----------------------------- |
|
|
190
|
+
| **Provider** | Anthropic only | Any (agnostic) |
|
|
191
|
+
| **Execution** | Anthropic's container | Isolated sandbox |
|
|
192
|
+
| **Configuration** | `agent.anthropic.skills` | `agent.skills` |
|
|
193
|
+
| **Definition** | `anthropic:` section | `skills:` section |
|
|
194
|
+
| **Use Case** | Claude-specific features | Cross-provider code execution |
|
|
195
|
+
|
|
196
|
+
For provider-agnostic code execution, use Octavus Skills defined in the protocol's `skills:` section and enabled via `agent.skills`. See [Skills](/docs/protocol/skills) for details.
|
|
197
|
+
|
|
178
198
|
## Display Modes
|
|
179
199
|
|
|
180
200
|
Both tools and skills support display modes:
|
|
181
201
|
|
|
182
|
-
| Mode
|
|
183
|
-
|
|
184
|
-
| `hidden`
|
|
185
|
-
| `name`
|
|
202
|
+
| Mode | Behavior |
|
|
203
|
+
| ------------- | ------------------------------- |
|
|
204
|
+
| `hidden` | Not shown to users |
|
|
205
|
+
| `name` | Shows the tool/skill name |
|
|
186
206
|
| `description` | Shows the description (default) |
|
|
187
|
-
| `stream`
|
|
207
|
+
| `stream` | Streams progress if available |
|
|
188
208
|
|
|
189
209
|
## Full Example
|
|
190
210
|
|
|
@@ -203,7 +223,7 @@ agent:
|
|
|
203
223
|
model: anthropic/claude-sonnet-4-5
|
|
204
224
|
system: system
|
|
205
225
|
input: [COMPANY_NAME, USER_ID]
|
|
206
|
-
tools: [get-user-account]
|
|
226
|
+
tools: [get-user-account] # External tools
|
|
207
227
|
agentic: true
|
|
208
228
|
thinking: medium
|
|
209
229
|
|
|
@@ -237,14 +257,14 @@ triggers:
|
|
|
237
257
|
handlers:
|
|
238
258
|
user-message:
|
|
239
259
|
Add message:
|
|
240
|
-
|
|
260
|
+
block: add-message
|
|
241
261
|
role: user
|
|
242
262
|
prompt: user-message
|
|
243
263
|
input: [USER_MESSAGE]
|
|
244
264
|
display: hidden
|
|
245
265
|
|
|
246
266
|
Respond:
|
|
247
|
-
|
|
267
|
+
block: next-message
|
|
248
268
|
```
|
|
249
269
|
|
|
250
270
|
## Validation
|
|
@@ -265,11 +285,10 @@ The protocol validator enforces:
|
|
|
265
285
|
```yaml
|
|
266
286
|
# This will fail validation
|
|
267
287
|
agent:
|
|
268
|
-
model: openai/gpt-4o
|
|
269
|
-
anthropic:
|
|
288
|
+
model: openai/gpt-4o # OpenAI model
|
|
289
|
+
anthropic: # Anthropic options - mismatch!
|
|
270
290
|
tools:
|
|
271
291
|
web-search: {}
|
|
272
292
|
```
|
|
273
293
|
|
|
274
294
|
Error: `"anthropic" options require an anthropic model. Current model provider: "openai"`
|
|
275
|
-
|
|
@@ -0,0 +1,439 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Skills Advanced Guide
|
|
3
|
+
description: Best practices and advanced patterns for using Octavus skills.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skills Advanced Guide
|
|
7
|
+
|
|
8
|
+
This guide covers advanced patterns and best practices for using Octavus skills in your agents.
|
|
9
|
+
|
|
10
|
+
## When to Use Skills
|
|
11
|
+
|
|
12
|
+
Skills are ideal for:
|
|
13
|
+
|
|
14
|
+
- **Code execution** - Running Python/Bash scripts
|
|
15
|
+
- **File generation** - Creating images, PDFs, reports
|
|
16
|
+
- **Data processing** - Analyzing, transforming, or visualizing data
|
|
17
|
+
- **Provider-agnostic needs** - Features that should work with any LLM
|
|
18
|
+
|
|
19
|
+
Use external tools instead when:
|
|
20
|
+
|
|
21
|
+
- **Simple API calls** - Database queries, external services
|
|
22
|
+
- **Authentication required** - Accessing user-specific resources
|
|
23
|
+
- **Backend integration** - Tight coupling with your infrastructure
|
|
24
|
+
|
|
25
|
+
## Skill Selection Strategy
|
|
26
|
+
|
|
27
|
+
### Defining Available Skills
|
|
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`:
|
|
30
|
+
|
|
31
|
+
```yaml
|
|
32
|
+
# All skills available to this agent (defined once at protocol level)
|
|
33
|
+
skills:
|
|
34
|
+
qr-code:
|
|
35
|
+
display: description
|
|
36
|
+
description: Generating QR codes
|
|
37
|
+
pdf-processor:
|
|
38
|
+
display: description
|
|
39
|
+
description: Processing PDFs
|
|
40
|
+
data-analysis:
|
|
41
|
+
display: description
|
|
42
|
+
description: Analyzing data
|
|
43
|
+
|
|
44
|
+
# Skills available for this chat thread
|
|
45
|
+
agent:
|
|
46
|
+
model: anthropic/claude-sonnet-4-5
|
|
47
|
+
system: system
|
|
48
|
+
skills: [qr-code] # Skills available for this thread
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Match Skills to Use Cases
|
|
52
|
+
|
|
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:
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
# All skills available to this agent (defined once at protocol level)
|
|
57
|
+
skills:
|
|
58
|
+
qr-code:
|
|
59
|
+
display: description
|
|
60
|
+
description: Generating QR codes
|
|
61
|
+
data-analysis:
|
|
62
|
+
display: description
|
|
63
|
+
description: Analyzing data and generating reports
|
|
64
|
+
visualization:
|
|
65
|
+
display: description
|
|
66
|
+
description: Creating charts and visualizations
|
|
67
|
+
|
|
68
|
+
# Skills available for this chat thread (support use case)
|
|
69
|
+
agent:
|
|
70
|
+
model: anthropic/claude-sonnet-4-5
|
|
71
|
+
system: system
|
|
72
|
+
skills: [qr-code] # Skills available for this thread
|
|
73
|
+
```
|
|
74
|
+
|
|
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.
|
|
76
|
+
|
|
77
|
+
## Display Mode Strategy
|
|
78
|
+
|
|
79
|
+
Choose display modes based on user experience:
|
|
80
|
+
|
|
81
|
+
```yaml
|
|
82
|
+
skills:
|
|
83
|
+
# Background processing - hide from user
|
|
84
|
+
data-analysis:
|
|
85
|
+
display: hidden
|
|
86
|
+
|
|
87
|
+
# User-facing generation - show description
|
|
88
|
+
qr-code:
|
|
89
|
+
display: description
|
|
90
|
+
|
|
91
|
+
# Interactive progress - stream updates
|
|
92
|
+
report-generation:
|
|
93
|
+
display: stream
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### Guidelines
|
|
97
|
+
|
|
98
|
+
- **`hidden`**: Background work that doesn't need user awareness
|
|
99
|
+
- **`description`**: User-facing operations (default)
|
|
100
|
+
- **`name`**: Quick operations where name is sufficient
|
|
101
|
+
- **`stream`**: Long-running operations where progress matters
|
|
102
|
+
|
|
103
|
+
## System Prompt Integration
|
|
104
|
+
|
|
105
|
+
Skills are automatically injected into the system prompt. The LLM learns:
|
|
106
|
+
|
|
107
|
+
1. **Available skills** - List of enabled skills with descriptions
|
|
108
|
+
2. **How to use skills** - Instructions for using skill tools
|
|
109
|
+
3. **Tool reference** - Available skill tools (`octavus_skill_read`, `octavus_code_run`, etc.)
|
|
110
|
+
|
|
111
|
+
You don't need to manually document skills in your system prompt. However, you can guide the LLM:
|
|
112
|
+
|
|
113
|
+
```markdown
|
|
114
|
+
<!-- prompts/system.md -->
|
|
115
|
+
|
|
116
|
+
You are a helpful assistant that can generate QR codes.
|
|
117
|
+
|
|
118
|
+
## When to Generate QR Codes
|
|
119
|
+
|
|
120
|
+
Generate QR codes when users want to:
|
|
121
|
+
|
|
122
|
+
- Share URLs easily
|
|
123
|
+
- Provide contact information
|
|
124
|
+
- Share WiFi credentials
|
|
125
|
+
- Create scannable data
|
|
126
|
+
|
|
127
|
+
Use the qr-code skill for all QR code generation tasks.
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Error Handling
|
|
131
|
+
|
|
132
|
+
Skills handle errors gracefully:
|
|
133
|
+
|
|
134
|
+
```yaml
|
|
135
|
+
# Skill execution errors are returned to the LLM
|
|
136
|
+
# The LLM can retry or explain the error to the user
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Common error scenarios:
|
|
140
|
+
|
|
141
|
+
1. **Invalid skill slug** - Skill not found in organization
|
|
142
|
+
2. **Code execution errors** - Syntax errors, runtime exceptions
|
|
143
|
+
3. **Missing dependencies** - Required packages not installed
|
|
144
|
+
4. **File I/O errors** - Permission issues, invalid paths
|
|
145
|
+
|
|
146
|
+
The LLM receives error messages and can:
|
|
147
|
+
|
|
148
|
+
- Retry with corrected code
|
|
149
|
+
- Explain errors to users
|
|
150
|
+
- Suggest alternatives
|
|
151
|
+
|
|
152
|
+
## File Output Patterns
|
|
153
|
+
|
|
154
|
+
### Single File Output
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
# Save single file to /output/
|
|
158
|
+
import qrcode
|
|
159
|
+
import os
|
|
160
|
+
|
|
161
|
+
output_dir = os.environ.get('OUTPUT_DIR', '/output')
|
|
162
|
+
qr = qrcode.QRCode()
|
|
163
|
+
qr.add_data('https://example.com')
|
|
164
|
+
img = qr.make_image()
|
|
165
|
+
img.save(f'{output_dir}/qrcode.png')
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Multiple Files
|
|
169
|
+
|
|
170
|
+
```python
|
|
171
|
+
# Save multiple files
|
|
172
|
+
import os
|
|
173
|
+
|
|
174
|
+
output_dir = os.environ.get('OUTPUT_DIR', '/output')
|
|
175
|
+
|
|
176
|
+
# Generate multiple outputs
|
|
177
|
+
for i in range(3):
|
|
178
|
+
filename = f'{output_dir}/output_{i}.png'
|
|
179
|
+
# ... generate file ...
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Structured Output
|
|
183
|
+
|
|
184
|
+
```python
|
|
185
|
+
# Save structured data + files
|
|
186
|
+
import json
|
|
187
|
+
import os
|
|
188
|
+
|
|
189
|
+
output_dir = os.environ.get('OUTPUT_DIR', '/output')
|
|
190
|
+
|
|
191
|
+
# Save metadata
|
|
192
|
+
metadata = {
|
|
193
|
+
'files': ['chart.png', 'data.csv'],
|
|
194
|
+
'summary': 'Analysis complete'
|
|
195
|
+
}
|
|
196
|
+
with open(f'{output_dir}/metadata.json', 'w') as f:
|
|
197
|
+
json.dump(metadata, f)
|
|
198
|
+
|
|
199
|
+
# Save actual files
|
|
200
|
+
# ... generate chart.png and data.csv ...
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Performance Considerations
|
|
204
|
+
|
|
205
|
+
### Lazy Initialization
|
|
206
|
+
|
|
207
|
+
Sandboxes are created only when a skill tool is first called:
|
|
208
|
+
|
|
209
|
+
```yaml
|
|
210
|
+
# Sandbox not created until LLM calls a skill tool
|
|
211
|
+
agent:
|
|
212
|
+
skills: [qr-code] # Sandbox created on first use
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
This means:
|
|
216
|
+
|
|
217
|
+
- No cost if skills aren't used
|
|
218
|
+
- Fast startup (no sandbox creation delay)
|
|
219
|
+
- Sandbox reused for all skill calls in a trigger
|
|
220
|
+
|
|
221
|
+
### Timeout Limits
|
|
222
|
+
|
|
223
|
+
Sandboxes have a 5-minute default timeout:
|
|
224
|
+
|
|
225
|
+
- **Short operations**: QR codes, simple calculations
|
|
226
|
+
- **Medium operations**: Data analysis, report generation
|
|
227
|
+
- **Long operations**: May need to split into multiple steps
|
|
228
|
+
|
|
229
|
+
### Sandbox Lifecycle
|
|
230
|
+
|
|
231
|
+
Each trigger execution gets a fresh sandbox:
|
|
232
|
+
|
|
233
|
+
- **Clean state** - No leftover files from previous executions
|
|
234
|
+
- **Isolated** - No interference between sessions
|
|
235
|
+
- **Destroyed** - Sandbox cleaned up after trigger completes
|
|
236
|
+
|
|
237
|
+
## Combining Skills with Tools
|
|
238
|
+
|
|
239
|
+
Skills and tools can work together:
|
|
240
|
+
|
|
241
|
+
```yaml
|
|
242
|
+
tools:
|
|
243
|
+
get-user-data:
|
|
244
|
+
description: Fetch user data from database
|
|
245
|
+
parameters:
|
|
246
|
+
userId: { type: string }
|
|
247
|
+
|
|
248
|
+
skills:
|
|
249
|
+
data-analysis:
|
|
250
|
+
display: description
|
|
251
|
+
description: Analyzing data
|
|
252
|
+
|
|
253
|
+
agent:
|
|
254
|
+
tools: [get-user-data]
|
|
255
|
+
skills: [data-analysis]
|
|
256
|
+
agentic: true
|
|
257
|
+
|
|
258
|
+
handlers:
|
|
259
|
+
analyze-user:
|
|
260
|
+
Get user data:
|
|
261
|
+
block: tool-call
|
|
262
|
+
tool: get-user-data
|
|
263
|
+
input:
|
|
264
|
+
userId: USER_ID
|
|
265
|
+
output: USER_DATA
|
|
266
|
+
|
|
267
|
+
Analyze:
|
|
268
|
+
block: next-message
|
|
269
|
+
# LLM can use data-analysis skill with USER_DATA
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Pattern:
|
|
273
|
+
|
|
274
|
+
1. Fetch data via tool (from your backend)
|
|
275
|
+
2. LLM uses skill to analyze/process the data
|
|
276
|
+
3. Generate outputs (files, reports)
|
|
277
|
+
|
|
278
|
+
## Skill Development Tips
|
|
279
|
+
|
|
280
|
+
### Writing SKILL.md
|
|
281
|
+
|
|
282
|
+
Focus on **when** and **how** to use the skill:
|
|
283
|
+
|
|
284
|
+
```markdown
|
|
285
|
+
---
|
|
286
|
+
name: qr-code
|
|
287
|
+
description: >
|
|
288
|
+
Generate QR codes from text, URLs, or data. Use when the user needs to create
|
|
289
|
+
a QR code for any purpose - sharing links, contact information, WiFi credentials,
|
|
290
|
+
or any text data that should be scannable.
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
# QR Code Generator
|
|
294
|
+
|
|
295
|
+
## When to Use
|
|
296
|
+
|
|
297
|
+
Use this skill when users want to:
|
|
298
|
+
|
|
299
|
+
- Share URLs easily
|
|
300
|
+
- Provide contact information
|
|
301
|
+
- Create scannable data
|
|
302
|
+
|
|
303
|
+
## Quick Start
|
|
304
|
+
|
|
305
|
+
[Clear examples of how to use the skill]
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Script Organization
|
|
309
|
+
|
|
310
|
+
Organize scripts logically:
|
|
311
|
+
|
|
312
|
+
```
|
|
313
|
+
skill-name/
|
|
314
|
+
├── SKILL.md
|
|
315
|
+
└── scripts/
|
|
316
|
+
├── generate.py # Main script
|
|
317
|
+
├── utils.py # Helper functions
|
|
318
|
+
└── requirements.txt # Dependencies
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Error Messages
|
|
322
|
+
|
|
323
|
+
Provide helpful error messages:
|
|
324
|
+
|
|
325
|
+
```python
|
|
326
|
+
try:
|
|
327
|
+
# ... code ...
|
|
328
|
+
except ValueError as e:
|
|
329
|
+
print(f"Error: Invalid input - {e}")
|
|
330
|
+
sys.exit(1)
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
The LLM sees these errors and can retry or explain to users.
|
|
334
|
+
|
|
335
|
+
## Security Considerations
|
|
336
|
+
|
|
337
|
+
### Sandbox Isolation
|
|
338
|
+
|
|
339
|
+
- **No network access** (unless explicitly configured)
|
|
340
|
+
- **No persistent storage** (sandbox destroyed after execution)
|
|
341
|
+
- **File output only** via `/output/` directory
|
|
342
|
+
- **Time limits** enforced (5-minute default)
|
|
343
|
+
|
|
344
|
+
### Input Validation
|
|
345
|
+
|
|
346
|
+
Skills should validate inputs:
|
|
347
|
+
|
|
348
|
+
```python
|
|
349
|
+
import sys
|
|
350
|
+
|
|
351
|
+
if not data:
|
|
352
|
+
print("Error: Data is required")
|
|
353
|
+
sys.exit(1)
|
|
354
|
+
|
|
355
|
+
if len(data) > 1000:
|
|
356
|
+
print("Error: Data too long (max 1000 characters)")
|
|
357
|
+
sys.exit(1)
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
### Resource Limits
|
|
361
|
+
|
|
362
|
+
Be aware of:
|
|
363
|
+
|
|
364
|
+
- **File size limits** - Large files may fail to upload
|
|
365
|
+
- **Execution time** - 5-minute sandbox timeout
|
|
366
|
+
- **Memory limits** - Sandbox environment constraints
|
|
367
|
+
|
|
368
|
+
## Debugging Skills
|
|
369
|
+
|
|
370
|
+
### Check Skill Documentation
|
|
371
|
+
|
|
372
|
+
The LLM can read skill docs:
|
|
373
|
+
|
|
374
|
+
```python
|
|
375
|
+
# LLM calls octavus_skill_read to see skill instructions
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### Test Locally
|
|
379
|
+
|
|
380
|
+
Test skills before uploading:
|
|
381
|
+
|
|
382
|
+
```bash
|
|
383
|
+
# Test skill locally
|
|
384
|
+
python scripts/generate.py --data "test"
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
### Monitor Execution
|
|
388
|
+
|
|
389
|
+
Check execution logs in the platform debug view:
|
|
390
|
+
|
|
391
|
+
- Tool calls and arguments
|
|
392
|
+
- Code execution results
|
|
393
|
+
- File outputs
|
|
394
|
+
- Error messages
|
|
395
|
+
|
|
396
|
+
## Common Patterns
|
|
397
|
+
|
|
398
|
+
### Pattern 1: Generate and Return
|
|
399
|
+
|
|
400
|
+
```yaml
|
|
401
|
+
# User asks for QR code
|
|
402
|
+
# LLM generates QR code
|
|
403
|
+
# File automatically available for download
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
### Pattern 2: Analyze and Report
|
|
407
|
+
|
|
408
|
+
```yaml
|
|
409
|
+
# User provides data
|
|
410
|
+
# LLM analyzes with skill
|
|
411
|
+
# Generates report file
|
|
412
|
+
# Returns summary + file link
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
### Pattern 3: Transform and Save
|
|
416
|
+
|
|
417
|
+
```yaml
|
|
418
|
+
# User uploads file (via tool)
|
|
419
|
+
# LLM processes with skill
|
|
420
|
+
# Generates transformed file
|
|
421
|
+
# Returns new file link
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
## Best Practices Summary
|
|
425
|
+
|
|
426
|
+
1. **Enable only needed skills** - Don't overwhelm the LLM
|
|
427
|
+
2. **Choose appropriate display modes** - Match user experience needs
|
|
428
|
+
3. **Write clear skill descriptions** - Help LLM understand when to use
|
|
429
|
+
4. **Handle errors gracefully** - Provide helpful error messages
|
|
430
|
+
5. **Test skills locally** - Verify before uploading
|
|
431
|
+
6. **Monitor execution** - Check logs for issues
|
|
432
|
+
7. **Combine with tools** - Use tools for data, skills for processing
|
|
433
|
+
8. **Consider performance** - Be aware of timeouts and limits
|
|
434
|
+
|
|
435
|
+
## Next Steps
|
|
436
|
+
|
|
437
|
+
- [Skills](/docs/protocol/skills) - Basic skills documentation
|
|
438
|
+
- [Agent Config](/docs/protocol/agent-config) - Configuring skills
|
|
439
|
+
- [Tools](/docs/protocol/tools) - External tools integration
|