@octavus/docs 0.0.8 → 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 +25 -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 +72 -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/08-provider-options.md +294 -0
- 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 +106 -34
- 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 +106 -34
- package/package.json +12 -2
- package/content/04-protocol/05-handlers.md +0 -251
- package/content/04-protocol/06-agent-config.md +0 -209
- 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-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-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
|
@@ -1,13 +1,23 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: Tools
|
|
3
|
-
description: Defining external tools
|
|
3
|
+
description: Defining external tools implemented in your backend.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Tools
|
|
7
7
|
|
|
8
|
-
Tools extend what agents can do.
|
|
8
|
+
Tools extend what agents can do. Octavus supports multiple types:
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
1. **External Tools** — Defined in the protocol, implemented in your backend (this page)
|
|
11
|
+
2. **Provider Tools** — Built-in tools executed server-side by the provider (e.g., Anthropic's web search)
|
|
12
|
+
3. **Skills** — Code execution and knowledge packages (see [Skills](/docs/protocol/skills))
|
|
13
|
+
|
|
14
|
+
This page covers external tools. For provider tools, see [Provider Options](/docs/protocol/provider-options). For code execution capabilities, see [Skills](/docs/protocol/skills).
|
|
15
|
+
|
|
16
|
+
## External Tools
|
|
17
|
+
|
|
18
|
+
External tools are defined in the `tools:` section and implemented in your backend.
|
|
19
|
+
|
|
20
|
+
## Defining Tools
|
|
11
21
|
|
|
12
22
|
```yaml
|
|
13
23
|
tools:
|
|
@@ -22,30 +32,62 @@ tools:
|
|
|
22
32
|
|
|
23
33
|
### Tool Fields
|
|
24
34
|
|
|
25
|
-
| Field
|
|
26
|
-
|
|
27
|
-
| `description` | Yes
|
|
28
|
-
| `display`
|
|
29
|
-
| `parameters`
|
|
35
|
+
| Field | Required | Description |
|
|
36
|
+
| ------------- | -------- | ------------------------------------------------------------ |
|
|
37
|
+
| `description` | Yes | What the tool does (shown to LLM and optionally user) |
|
|
38
|
+
| `display` | No | How to show in UI: `hidden`, `name`, `description`, `stream` |
|
|
39
|
+
| `parameters` | No | Input parameters the tool accepts |
|
|
30
40
|
|
|
31
41
|
### Display Modes
|
|
32
42
|
|
|
33
|
-
| Mode
|
|
34
|
-
|
|
35
|
-
| `hidden`
|
|
36
|
-
| `name`
|
|
43
|
+
| Mode | Behavior |
|
|
44
|
+
| ------------- | ------------------------------------------- |
|
|
45
|
+
| `hidden` | Tool runs silently, user doesn't see it |
|
|
46
|
+
| `name` | Shows tool name while executing |
|
|
37
47
|
| `description` | Shows description while executing (default) |
|
|
38
|
-
| `stream`
|
|
48
|
+
| `stream` | Streams tool progress if available |
|
|
39
49
|
|
|
40
50
|
## Parameters
|
|
41
51
|
|
|
52
|
+
Tool calls are always objects where each parameter name maps to a value. The LLM generates: `{ param1: value1, param2: value2, ... }`
|
|
53
|
+
|
|
42
54
|
### Parameter Fields
|
|
43
55
|
|
|
44
|
-
| Field
|
|
45
|
-
|
|
46
|
-
| `type`
|
|
47
|
-
| `description` | No
|
|
48
|
-
| `optional`
|
|
56
|
+
| Field | Required | Description |
|
|
57
|
+
| ------------- | -------- | -------------------------------------------------------------------------------- |
|
|
58
|
+
| `type` | Yes | Data type: `string`, `number`, `integer`, `boolean`, `unknown`, or a custom type |
|
|
59
|
+
| `description` | No | Describes what this parameter is for |
|
|
60
|
+
| `optional` | No | If true, parameter is not required (default: false) |
|
|
61
|
+
|
|
62
|
+
> **Tip**: You can use [custom types](/docs/protocol/types) for complex parameters like `type: ProductFilter` or `type: SearchOptions`.
|
|
63
|
+
|
|
64
|
+
### Array Parameters
|
|
65
|
+
|
|
66
|
+
For array parameters, define a [top-level array type](/docs/protocol/types#top-level-array-types) and use it:
|
|
67
|
+
|
|
68
|
+
```yaml
|
|
69
|
+
types:
|
|
70
|
+
CartItem:
|
|
71
|
+
productId:
|
|
72
|
+
type: string
|
|
73
|
+
quantity:
|
|
74
|
+
type: integer
|
|
75
|
+
|
|
76
|
+
CartItemList:
|
|
77
|
+
type: array
|
|
78
|
+
items:
|
|
79
|
+
type: CartItem
|
|
80
|
+
|
|
81
|
+
tools:
|
|
82
|
+
add-to-cart:
|
|
83
|
+
description: Add items to cart
|
|
84
|
+
parameters:
|
|
85
|
+
items:
|
|
86
|
+
type: CartItemList
|
|
87
|
+
description: Items to add
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The tool receives: `{ items: [{ productId: "...", quantity: 1 }, ...] }`
|
|
49
91
|
|
|
50
92
|
### Optional Parameters
|
|
51
93
|
|
|
@@ -91,14 +133,14 @@ tools:
|
|
|
91
133
|
description: Create a support ticket
|
|
92
134
|
parameters:
|
|
93
135
|
summary: { type: string }
|
|
94
|
-
priority: { type: string }
|
|
136
|
+
priority: { type: string } # low, medium, high, urgent
|
|
95
137
|
|
|
96
138
|
agent:
|
|
97
139
|
model: anthropic/claude-sonnet-4-5
|
|
98
140
|
system: system
|
|
99
141
|
tools:
|
|
100
142
|
- get-user-account
|
|
101
|
-
- create-support-ticket
|
|
143
|
+
- create-support-ticket # LLM can decide when to call these
|
|
102
144
|
agentic: true
|
|
103
145
|
```
|
|
104
146
|
|
|
@@ -111,8 +153,8 @@ The LLM decides when to call tools based on the conversation:
|
|
|
111
153
|
```yaml
|
|
112
154
|
agent:
|
|
113
155
|
tools: [get-user-account, create-support-ticket]
|
|
114
|
-
agentic: true
|
|
115
|
-
maxSteps: 10
|
|
156
|
+
agentic: true # Allow multiple tool calls
|
|
157
|
+
maxSteps: 10 # Max tool call cycles
|
|
116
158
|
```
|
|
117
159
|
|
|
118
160
|
### Deterministic (Block-Based)
|
|
@@ -124,12 +166,12 @@ handlers:
|
|
|
124
166
|
request-human:
|
|
125
167
|
# Always create a ticket when escalating
|
|
126
168
|
Create support ticket:
|
|
127
|
-
|
|
169
|
+
block: tool-call
|
|
128
170
|
tool: create-support-ticket
|
|
129
171
|
input:
|
|
130
|
-
summary: SUMMARY
|
|
131
|
-
priority: medium
|
|
132
|
-
output: TICKET
|
|
172
|
+
summary: SUMMARY # From variable
|
|
173
|
+
priority: medium # Literal value
|
|
174
|
+
output: TICKET # Store result
|
|
133
175
|
```
|
|
134
176
|
|
|
135
177
|
## Tool Results
|
|
@@ -140,6 +182,7 @@ Tool results are stored in variables. Reference the variable in prompts:
|
|
|
140
182
|
|
|
141
183
|
```markdown
|
|
142
184
|
<!-- prompts/ticket-directive.md -->
|
|
185
|
+
|
|
143
186
|
A support ticket has been created:
|
|
144
187
|
{{TICKET}}
|
|
145
188
|
|
|
@@ -168,14 +211,14 @@ Store tool results for later use:
|
|
|
168
211
|
handlers:
|
|
169
212
|
request-human:
|
|
170
213
|
Get account:
|
|
171
|
-
|
|
214
|
+
block: tool-call
|
|
172
215
|
tool: get-user-account
|
|
173
216
|
input:
|
|
174
217
|
userId: USER_ID
|
|
175
|
-
output: ACCOUNT
|
|
218
|
+
output: ACCOUNT # Result stored here
|
|
176
219
|
|
|
177
220
|
Create ticket:
|
|
178
|
-
|
|
221
|
+
block: tool-call
|
|
179
222
|
tool: create-support-ticket
|
|
180
223
|
input:
|
|
181
224
|
summary: SUMMARY
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Skills
|
|
3
|
+
description: Using Octavus skills for code execution and specialized capabilities.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Skills
|
|
7
|
+
|
|
8
|
+
Skills are knowledge packages that enable agents to execute code and generate files in isolated sandbox environments. Unlike external tools (which you implement in your backend), skills are self-contained packages with documentation and scripts that run in secure sandboxes.
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Octavus Skills provide **provider-agnostic** code execution. They work with any LLM provider (Anthropic, OpenAI, Google) by using explicit tool calls and system prompt injection.
|
|
13
|
+
|
|
14
|
+
### How Skills Work
|
|
15
|
+
|
|
16
|
+
1. **Skill Definition**: Skills are defined in the protocol's `skills:` section
|
|
17
|
+
2. **Skill Resolution**: Skills are resolved from available sources (see below)
|
|
18
|
+
3. **Sandbox Execution**: When a skill is used, code runs in an isolated sandbox environment
|
|
19
|
+
4. **File Generation**: Files saved to `/output/` are automatically captured and made available for download
|
|
20
|
+
|
|
21
|
+
### Skill Sources
|
|
22
|
+
|
|
23
|
+
Skills come from two sources, visible in the Skills tab of your organization:
|
|
24
|
+
|
|
25
|
+
| Source | Badge in UI | Visibility | Example |
|
|
26
|
+
| ----------- | ----------- | ------------------------------ | ------------------ |
|
|
27
|
+
| **Octavus** | `Octavus` | Available to all organizations | `qr-code` |
|
|
28
|
+
| **Custom** | None | Private to your organization | `my-company-skill` |
|
|
29
|
+
|
|
30
|
+
When you reference a skill in your protocol, Octavus resolves it from your available skills. If you create a custom skill with the same name as an Octavus skill, your custom skill takes precedence.
|
|
31
|
+
|
|
32
|
+
## Defining Skills
|
|
33
|
+
|
|
34
|
+
Define skills in the protocol's `skills:` section:
|
|
35
|
+
|
|
36
|
+
```yaml
|
|
37
|
+
skills:
|
|
38
|
+
qr-code:
|
|
39
|
+
display: description
|
|
40
|
+
description: Generating QR codes
|
|
41
|
+
data-analysis:
|
|
42
|
+
display: description
|
|
43
|
+
description: Analyzing data and generating reports
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Skill Fields
|
|
47
|
+
|
|
48
|
+
| Field | Required | Description |
|
|
49
|
+
| ------------- | -------- | ------------------------------------------------------------------------------------- |
|
|
50
|
+
| `display` | No | How to show in UI: `hidden`, `name`, `description`, `stream` (default: `description`) |
|
|
51
|
+
| `description` | No | Custom description shown to users (overrides skill's built-in description) |
|
|
52
|
+
|
|
53
|
+
### Display Modes
|
|
54
|
+
|
|
55
|
+
| Mode | Behavior |
|
|
56
|
+
| ------------- | ------------------------------------------- |
|
|
57
|
+
| `hidden` | Skill usage not shown to users |
|
|
58
|
+
| `name` | Shows skill name while executing |
|
|
59
|
+
| `description` | Shows description while executing (default) |
|
|
60
|
+
| `stream` | Streams progress if available |
|
|
61
|
+
|
|
62
|
+
## Enabling Skills
|
|
63
|
+
|
|
64
|
+
After defining skills in the `skills:` section, specify which skills are available for the chat thread in `agent.skills`:
|
|
65
|
+
|
|
66
|
+
```yaml
|
|
67
|
+
# All skills available to this agent (defined once at protocol level)
|
|
68
|
+
skills:
|
|
69
|
+
qr-code:
|
|
70
|
+
display: description
|
|
71
|
+
description: Generating QR codes
|
|
72
|
+
|
|
73
|
+
# Skills available for this chat thread
|
|
74
|
+
agent:
|
|
75
|
+
model: anthropic/claude-sonnet-4-5
|
|
76
|
+
system: system
|
|
77
|
+
tools: [get-user-account]
|
|
78
|
+
skills: [qr-code] # Skills available for this thread
|
|
79
|
+
agentic: true
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Skill Tools
|
|
83
|
+
|
|
84
|
+
When skills are enabled, the LLM has access to these tools:
|
|
85
|
+
|
|
86
|
+
| Tool | Purpose |
|
|
87
|
+
| -------------------- | --------------------------------------- |
|
|
88
|
+
| `octavus_skill_read` | Read skill documentation (SKILL.md) |
|
|
89
|
+
| `octavus_skill_list` | List available scripts in a skill |
|
|
90
|
+
| `octavus_skill_run` | Execute a pre-built script from a skill |
|
|
91
|
+
| `octavus_code_run` | Execute arbitrary Python/Bash code |
|
|
92
|
+
| `octavus_file_write` | Create files in the sandbox |
|
|
93
|
+
| `octavus_file_read` | Read files from the sandbox |
|
|
94
|
+
|
|
95
|
+
The LLM learns about available skills through system prompt injection and can use these tools to interact with skills.
|
|
96
|
+
|
|
97
|
+
## Example: QR Code Generation
|
|
98
|
+
|
|
99
|
+
```yaml
|
|
100
|
+
skills:
|
|
101
|
+
qr-code:
|
|
102
|
+
display: description
|
|
103
|
+
description: Generating QR codes
|
|
104
|
+
|
|
105
|
+
agent:
|
|
106
|
+
model: anthropic/claude-sonnet-4-5
|
|
107
|
+
system: system
|
|
108
|
+
skills: [qr-code]
|
|
109
|
+
agentic: true
|
|
110
|
+
|
|
111
|
+
handlers:
|
|
112
|
+
user-message:
|
|
113
|
+
Add message:
|
|
114
|
+
block: add-message
|
|
115
|
+
role: user
|
|
116
|
+
prompt: user-message
|
|
117
|
+
input: [USER_MESSAGE]
|
|
118
|
+
|
|
119
|
+
Respond:
|
|
120
|
+
block: next-message
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
When a user asks "Create a QR code for octavus.ai", the LLM will:
|
|
124
|
+
|
|
125
|
+
1. Recognize the task matches the `qr-code` skill
|
|
126
|
+
2. Call `octavus_skill_read` to learn how to use the skill
|
|
127
|
+
3. Execute code (via `octavus_code_run` or `octavus_skill_run`) to generate the QR code
|
|
128
|
+
4. Save the image to `/output/` in the sandbox
|
|
129
|
+
5. The file is automatically captured and made available for download
|
|
130
|
+
|
|
131
|
+
## File Output
|
|
132
|
+
|
|
133
|
+
Files saved to `/output/` in the sandbox are automatically:
|
|
134
|
+
|
|
135
|
+
1. **Captured** after code execution
|
|
136
|
+
2. **Uploaded** to S3 storage
|
|
137
|
+
3. **Made available** via presigned URLs
|
|
138
|
+
4. **Included** in the message as file parts
|
|
139
|
+
|
|
140
|
+
Files persist across page refreshes and are stored in the session's message history.
|
|
141
|
+
|
|
142
|
+
## Skill Format
|
|
143
|
+
|
|
144
|
+
Skills follow the [Agent Skills](https://agentskills.io) open standard:
|
|
145
|
+
|
|
146
|
+
- `SKILL.md` - Required skill documentation with YAML frontmatter
|
|
147
|
+
- `scripts/` - Optional executable code (Python/Bash)
|
|
148
|
+
- `references/` - Optional documentation loaded as needed
|
|
149
|
+
- `assets/` - Optional files used in outputs (templates, images)
|
|
150
|
+
|
|
151
|
+
### SKILL.md Format
|
|
152
|
+
|
|
153
|
+
````yaml
|
|
154
|
+
---
|
|
155
|
+
name: qr-code
|
|
156
|
+
description: >
|
|
157
|
+
Generate QR codes from text, URLs, or data. Use when the user needs to create
|
|
158
|
+
a QR code for any purpose - sharing links, contact information, WiFi credentials,
|
|
159
|
+
or any text data that should be scannable.
|
|
160
|
+
version: 1.0.0
|
|
161
|
+
license: MIT
|
|
162
|
+
author: Octavus Team
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
# QR Code Generator
|
|
166
|
+
|
|
167
|
+
## Overview
|
|
168
|
+
|
|
169
|
+
This skill creates QR codes from text data using Python...
|
|
170
|
+
|
|
171
|
+
## Quick Start
|
|
172
|
+
|
|
173
|
+
Generate a QR code with Python:
|
|
174
|
+
|
|
175
|
+
```python
|
|
176
|
+
import qrcode
|
|
177
|
+
import os
|
|
178
|
+
|
|
179
|
+
output_dir = os.environ.get('OUTPUT_DIR', '/output')
|
|
180
|
+
# ... code to generate QR code ...
|
|
181
|
+
````
|
|
182
|
+
|
|
183
|
+
## Scripts Reference
|
|
184
|
+
|
|
185
|
+
### scripts/generate.py
|
|
186
|
+
|
|
187
|
+
Main script for generating QR codes...
|
|
188
|
+
|
|
189
|
+
````
|
|
190
|
+
|
|
191
|
+
## Best Practices
|
|
192
|
+
|
|
193
|
+
### 1. Clear Descriptions
|
|
194
|
+
|
|
195
|
+
Provide clear, purpose-driven descriptions:
|
|
196
|
+
|
|
197
|
+
```yaml
|
|
198
|
+
skills:
|
|
199
|
+
# Good - clear purpose
|
|
200
|
+
qr-code:
|
|
201
|
+
description: Generating QR codes for URLs, contact info, or any text data
|
|
202
|
+
|
|
203
|
+
# Avoid - vague
|
|
204
|
+
utility:
|
|
205
|
+
description: Does stuff
|
|
206
|
+
````
|
|
207
|
+
|
|
208
|
+
### 2. When to Use Skills vs Tools
|
|
209
|
+
|
|
210
|
+
| Use Skills When | Use Tools When |
|
|
211
|
+
| ------------------------ | ---------------------------- |
|
|
212
|
+
| Code execution needed | Simple API calls |
|
|
213
|
+
| File generation | Database queries |
|
|
214
|
+
| Complex calculations | External service integration |
|
|
215
|
+
| Data processing | Authentication required |
|
|
216
|
+
| Provider-agnostic needed | Backend-specific logic |
|
|
217
|
+
|
|
218
|
+
### 3. Skill Selection
|
|
219
|
+
|
|
220
|
+
Define all skills available to this agent in the `skills:` section. Then specify which skills are available for the chat thread in `agent.skills`:
|
|
221
|
+
|
|
222
|
+
```yaml
|
|
223
|
+
# All skills available to this agent (defined once at protocol level)
|
|
224
|
+
skills:
|
|
225
|
+
qr-code:
|
|
226
|
+
display: description
|
|
227
|
+
description: Generating QR codes
|
|
228
|
+
data-analysis:
|
|
229
|
+
display: description
|
|
230
|
+
description: Analyzing data
|
|
231
|
+
pdf-processor:
|
|
232
|
+
display: description
|
|
233
|
+
description: Processing PDFs
|
|
234
|
+
|
|
235
|
+
# Skills available for this chat thread
|
|
236
|
+
agent:
|
|
237
|
+
model: anthropic/claude-sonnet-4-5
|
|
238
|
+
system: system
|
|
239
|
+
skills: [qr-code, data-analysis] # Skills available for this thread
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### 4. Display Modes
|
|
243
|
+
|
|
244
|
+
Choose appropriate display modes based on user experience:
|
|
245
|
+
|
|
246
|
+
```yaml
|
|
247
|
+
skills:
|
|
248
|
+
# Background processing - hide from user
|
|
249
|
+
data-analysis:
|
|
250
|
+
display: hidden
|
|
251
|
+
|
|
252
|
+
# User-facing generation - show description
|
|
253
|
+
qr-code:
|
|
254
|
+
display: description
|
|
255
|
+
|
|
256
|
+
# Interactive progress - stream updates
|
|
257
|
+
report-generation:
|
|
258
|
+
display: stream
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
## Comparison: Skills vs Tools vs Provider Options
|
|
262
|
+
|
|
263
|
+
| Feature | Octavus Skills | External Tools | Provider Tools/Skills |
|
|
264
|
+
| ------------------ | ----------------- | ------------------- | --------------------- |
|
|
265
|
+
| **Execution** | Isolated sandbox | Your backend | Provider servers |
|
|
266
|
+
| **Provider** | Any (agnostic) | N/A | Provider-specific |
|
|
267
|
+
| **Code Execution** | Yes | No | Yes (provider tools) |
|
|
268
|
+
| **File Output** | Yes | No | Yes (provider skills) |
|
|
269
|
+
| **Implementation** | Skill packages | Your code | Built-in |
|
|
270
|
+
| **Cost** | Sandbox + LLM API | Your infrastructure | Included in API |
|
|
271
|
+
|
|
272
|
+
## Uploading Custom Skills
|
|
273
|
+
|
|
274
|
+
You can upload custom skills to your organization:
|
|
275
|
+
|
|
276
|
+
1. Create a skill following the [Agent Skills](https://agentskills.io) format
|
|
277
|
+
2. Package it as a `.skill` bundle (ZIP file)
|
|
278
|
+
3. Upload via the platform UI
|
|
279
|
+
4. Reference by slug in your protocol
|
|
280
|
+
|
|
281
|
+
```yaml
|
|
282
|
+
skills:
|
|
283
|
+
custom-analysis:
|
|
284
|
+
display: description
|
|
285
|
+
description: Custom analysis tool
|
|
286
|
+
|
|
287
|
+
agent:
|
|
288
|
+
skills: [custom-analysis]
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
## Security
|
|
292
|
+
|
|
293
|
+
Skills run in isolated sandbox environments:
|
|
294
|
+
|
|
295
|
+
- **No network access** (unless explicitly configured)
|
|
296
|
+
- **No persistent storage** (sandbox destroyed after execution)
|
|
297
|
+
- **File output only** via `/output/` directory
|
|
298
|
+
- **Time limits** enforced (5-minute default timeout)
|
|
299
|
+
|
|
300
|
+
## Next Steps
|
|
301
|
+
|
|
302
|
+
- [Agent Config](/docs/protocol/agent-config) — Configuring skills in agent settings
|
|
303
|
+
- [Provider Options](/docs/protocol/provider-options) — Anthropic's built-in skills
|
|
304
|
+
- [Skills Advanced Guide](/docs/protocol/skills-advanced) — Best practices and advanced patterns
|