@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
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Handlers
|
|
3
|
+
description: Defining execution handlers with blocks.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Handlers
|
|
7
|
+
|
|
8
|
+
Handlers define what happens when a trigger fires. They contain execution blocks that run in sequence.
|
|
9
|
+
|
|
10
|
+
## Handler Structure
|
|
11
|
+
|
|
12
|
+
```yaml
|
|
13
|
+
handlers:
|
|
14
|
+
trigger-name:
|
|
15
|
+
Block Name:
|
|
16
|
+
block: block-kind
|
|
17
|
+
# block-specific properties
|
|
18
|
+
|
|
19
|
+
Another Block:
|
|
20
|
+
block: another-kind
|
|
21
|
+
# ...
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Each block has a human-readable name (shown in debug UI) and a `block` field that determines its behavior.
|
|
25
|
+
|
|
26
|
+
## Block Kinds
|
|
27
|
+
|
|
28
|
+
### next-message
|
|
29
|
+
|
|
30
|
+
Generate a response from the LLM:
|
|
31
|
+
|
|
32
|
+
```yaml
|
|
33
|
+
handlers:
|
|
34
|
+
user-message:
|
|
35
|
+
Respond to user:
|
|
36
|
+
block: next-message
|
|
37
|
+
# Uses main conversation thread by default
|
|
38
|
+
# Display defaults to 'stream'
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
With options:
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
Generate summary:
|
|
45
|
+
block: next-message
|
|
46
|
+
thread: summary # Use named thread
|
|
47
|
+
display: stream # Show streaming content
|
|
48
|
+
independent: true # Don't add to main chat
|
|
49
|
+
output: SUMMARY # Store output in variable
|
|
50
|
+
description: Generating summary # Shown in UI
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
For structured output (typed JSON response):
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
Respond with suggestions:
|
|
57
|
+
block: next-message
|
|
58
|
+
responseType: ChatResponse # Type defined in types section
|
|
59
|
+
output: RESPONSE # Stores the parsed object
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
When `responseType` is specified:
|
|
63
|
+
|
|
64
|
+
- The LLM generates JSON matching the type schema
|
|
65
|
+
- The `output` variable receives the parsed object (not plain text)
|
|
66
|
+
- The client receives a `UIObjectPart` for custom rendering
|
|
67
|
+
|
|
68
|
+
See [Types](/docs/protocol/types#structured-output) for more details.
|
|
69
|
+
|
|
70
|
+
### add-message
|
|
71
|
+
|
|
72
|
+
Add a message to the conversation:
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
Add user message:
|
|
76
|
+
block: add-message
|
|
77
|
+
role: user # user | assistant | system
|
|
78
|
+
prompt: user-message # Reference to prompt file
|
|
79
|
+
input: [USER_MESSAGE] # Variables to interpolate
|
|
80
|
+
display: hidden # Don't show in UI
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
For internal directives (LLM sees it, user doesn't):
|
|
84
|
+
|
|
85
|
+
```yaml
|
|
86
|
+
Add internal directive:
|
|
87
|
+
block: add-message
|
|
88
|
+
role: user
|
|
89
|
+
prompt: ticket-directive
|
|
90
|
+
input: [TICKET_DETAILS]
|
|
91
|
+
visible: false # LLM sees this, user doesn't
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
For structured user input (object shown in UI, prompt for LLM context):
|
|
95
|
+
|
|
96
|
+
```yaml
|
|
97
|
+
Add user message:
|
|
98
|
+
block: add-message
|
|
99
|
+
role: user
|
|
100
|
+
prompt: user-message # Rendered for LLM context (hidden from UI)
|
|
101
|
+
input: [USER_INPUT]
|
|
102
|
+
uiContent: USER_INPUT # Variable shown in UI (object → object part)
|
|
103
|
+
display: hidden
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
When `uiContent` is set:
|
|
107
|
+
|
|
108
|
+
- The variable value is shown in the UI (string → text part, object → object part)
|
|
109
|
+
- The prompt text is hidden from the UI but kept for LLM context
|
|
110
|
+
- Useful for rich UI interactions where the visual differs from the LLM context
|
|
111
|
+
|
|
112
|
+
### tool-call
|
|
113
|
+
|
|
114
|
+
Call a tool deterministically:
|
|
115
|
+
|
|
116
|
+
```yaml
|
|
117
|
+
Create ticket:
|
|
118
|
+
block: tool-call
|
|
119
|
+
tool: create-support-ticket
|
|
120
|
+
input:
|
|
121
|
+
summary: SUMMARY # Variable reference
|
|
122
|
+
priority: medium # Literal value
|
|
123
|
+
output: TICKET # Store result
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### set-resource
|
|
127
|
+
|
|
128
|
+
Update a persistent resource:
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
Save summary:
|
|
132
|
+
block: set-resource
|
|
133
|
+
resource: CONVERSATION_SUMMARY
|
|
134
|
+
value: SUMMARY # Variable to save
|
|
135
|
+
display: name # Show block name
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### start-thread
|
|
139
|
+
|
|
140
|
+
Create a named conversation thread:
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
Start summary thread:
|
|
144
|
+
block: start-thread
|
|
145
|
+
thread: summary # Thread name
|
|
146
|
+
model: anthropic/claude-sonnet-4-5 # Optional: different model
|
|
147
|
+
thinking: low # Extended reasoning level
|
|
148
|
+
maxSteps: 1 # Tool call limit
|
|
149
|
+
system: escalation-summary # System prompt
|
|
150
|
+
input: [COMPANY_NAME] # Variables for prompt
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### serialize-thread
|
|
154
|
+
|
|
155
|
+
Convert conversation to text:
|
|
156
|
+
|
|
157
|
+
```yaml
|
|
158
|
+
Serialize conversation:
|
|
159
|
+
block: serialize-thread
|
|
160
|
+
thread: main # Which thread (default: main)
|
|
161
|
+
format: markdown # markdown | json
|
|
162
|
+
output: CONVERSATION_TEXT # Variable to store result
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### generate-image
|
|
166
|
+
|
|
167
|
+
Generate an image from a prompt variable:
|
|
168
|
+
|
|
169
|
+
```yaml
|
|
170
|
+
Generate image:
|
|
171
|
+
block: generate-image
|
|
172
|
+
prompt: OPTIMIZED_PROMPT # Variable containing the prompt
|
|
173
|
+
imageModel: google/gemini-2.5-flash-image # Required image model
|
|
174
|
+
size: 1024x1024 # 1024x1024 | 1792x1024 | 1024x1792
|
|
175
|
+
output: GENERATED_IMAGE # Store URL in variable
|
|
176
|
+
description: Generating your image... # Shown in UI
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
This block is for deterministic image generation pipelines where the prompt is constructed programmatically (e.g., via prompt engineering in a separate thread).
|
|
180
|
+
|
|
181
|
+
For agentic image generation where the LLM decides when to generate, configure `imageModel` in the [agent config](/docs/protocol/agent-config#image-generation).
|
|
182
|
+
|
|
183
|
+
## Display Modes
|
|
184
|
+
|
|
185
|
+
Every block has a `display` property:
|
|
186
|
+
|
|
187
|
+
| Mode | Default For | Behavior |
|
|
188
|
+
| ------------- | ------------------------- | ----------------- |
|
|
189
|
+
| `hidden` | add-message | Not shown to user |
|
|
190
|
+
| `name` | set-resource | Shows block name |
|
|
191
|
+
| `description` | tool-call, generate-image | Shows description |
|
|
192
|
+
| `stream` | next-message | Streams content |
|
|
193
|
+
|
|
194
|
+
## Complete Example
|
|
195
|
+
|
|
196
|
+
```yaml
|
|
197
|
+
handlers:
|
|
198
|
+
user-message:
|
|
199
|
+
# Add the user's message to conversation
|
|
200
|
+
Add user message:
|
|
201
|
+
block: add-message
|
|
202
|
+
role: user
|
|
203
|
+
prompt: user-message
|
|
204
|
+
input: [USER_MESSAGE]
|
|
205
|
+
display: hidden
|
|
206
|
+
|
|
207
|
+
# Generate response (LLM may call tools)
|
|
208
|
+
Respond to user:
|
|
209
|
+
block: next-message
|
|
210
|
+
# display: stream (default)
|
|
211
|
+
|
|
212
|
+
request-human:
|
|
213
|
+
# Step 1: Serialize conversation for summary
|
|
214
|
+
Serialize conversation:
|
|
215
|
+
block: serialize-thread
|
|
216
|
+
format: markdown
|
|
217
|
+
output: CONVERSATION_TEXT
|
|
218
|
+
|
|
219
|
+
# Step 2: Create separate thread for summarization
|
|
220
|
+
Start summary thread:
|
|
221
|
+
block: start-thread
|
|
222
|
+
thread: summary
|
|
223
|
+
model: anthropic/claude-sonnet-4-5
|
|
224
|
+
thinking: low
|
|
225
|
+
system: escalation-summary
|
|
226
|
+
input: [COMPANY_NAME]
|
|
227
|
+
|
|
228
|
+
# Step 3: Add request to summary thread
|
|
229
|
+
Add summarize request:
|
|
230
|
+
block: add-message
|
|
231
|
+
thread: summary
|
|
232
|
+
role: user
|
|
233
|
+
prompt: summarize-request
|
|
234
|
+
input:
|
|
235
|
+
- CONVERSATION: CONVERSATION_TEXT
|
|
236
|
+
|
|
237
|
+
# Step 4: Generate summary
|
|
238
|
+
Generate summary:
|
|
239
|
+
block: next-message
|
|
240
|
+
thread: summary
|
|
241
|
+
display: stream
|
|
242
|
+
description: Summarizing your conversation
|
|
243
|
+
independent: true
|
|
244
|
+
output: SUMMARY
|
|
245
|
+
|
|
246
|
+
# Step 5: Save to resource
|
|
247
|
+
Save summary:
|
|
248
|
+
block: set-resource
|
|
249
|
+
resource: CONVERSATION_SUMMARY
|
|
250
|
+
value: SUMMARY
|
|
251
|
+
|
|
252
|
+
# Step 6: Create support ticket
|
|
253
|
+
Create ticket:
|
|
254
|
+
block: tool-call
|
|
255
|
+
tool: create-support-ticket
|
|
256
|
+
input:
|
|
257
|
+
summary: SUMMARY
|
|
258
|
+
priority: medium
|
|
259
|
+
output: TICKET
|
|
260
|
+
|
|
261
|
+
# Step 7: Add directive for response
|
|
262
|
+
Add directive:
|
|
263
|
+
block: add-message
|
|
264
|
+
role: user
|
|
265
|
+
prompt: ticket-directive
|
|
266
|
+
input: [TICKET_DETAILS: TICKET]
|
|
267
|
+
visible: false
|
|
268
|
+
|
|
269
|
+
# Step 8: Respond to user
|
|
270
|
+
Respond:
|
|
271
|
+
block: next-message
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## Block Input Mapping
|
|
275
|
+
|
|
276
|
+
Map variables to block inputs:
|
|
277
|
+
|
|
278
|
+
```yaml
|
|
279
|
+
# Simple list (variable name = prompt variable)
|
|
280
|
+
input: [USER_MESSAGE, COMPANY_NAME]
|
|
281
|
+
|
|
282
|
+
# Mapping (different names)
|
|
283
|
+
input:
|
|
284
|
+
- CONVERSATION: CONVERSATION_TEXT # CONVERSATION in prompt = CONVERSATION_TEXT
|
|
285
|
+
- TICKET_DETAILS: TICKET
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Independent Blocks
|
|
289
|
+
|
|
290
|
+
Use `independent: true` for content that shouldn't go to the main chat:
|
|
291
|
+
|
|
292
|
+
```yaml
|
|
293
|
+
Generate summary:
|
|
294
|
+
block: next-message
|
|
295
|
+
thread: summary
|
|
296
|
+
independent: true # Output stored in variable, not main chat
|
|
297
|
+
output: SUMMARY
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
This is useful for:
|
|
301
|
+
|
|
302
|
+
- Background processing
|
|
303
|
+
- Summarization in separate threads
|
|
304
|
+
- Generating content for tools
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Agent Config
|
|
3
|
+
description: Configuring the agent model and behavior.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agent Config
|
|
7
|
+
|
|
8
|
+
The `agent` section configures the LLM model, system prompt, tools, and behavior.
|
|
9
|
+
|
|
10
|
+
## Basic Configuration
|
|
11
|
+
|
|
12
|
+
```yaml
|
|
13
|
+
agent:
|
|
14
|
+
model: anthropic/claude-sonnet-4-5
|
|
15
|
+
system: system # References prompts/system.md
|
|
16
|
+
tools: [get-user-account] # Available tools
|
|
17
|
+
skills: [qr-code] # Available skills
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Configuration Options
|
|
21
|
+
|
|
22
|
+
| Field | Required | Description |
|
|
23
|
+
| ------------- | -------- | --------------------------------------------------------- |
|
|
24
|
+
| `model` | Yes | Model identifier (provider/model-id) |
|
|
25
|
+
| `system` | Yes | System prompt filename (without .md) |
|
|
26
|
+
| `input` | No | Variables to interpolate in system prompt |
|
|
27
|
+
| `tools` | No | List of tools the LLM can call |
|
|
28
|
+
| `skills` | No | List of Octavus skills the LLM can use |
|
|
29
|
+
| `imageModel` | No | Image generation model (enables agentic image generation) |
|
|
30
|
+
| `agentic` | No | Allow multiple tool call cycles |
|
|
31
|
+
| `maxSteps` | No | Maximum agentic steps (default: 10) |
|
|
32
|
+
| `temperature` | No | Model temperature (0-2) |
|
|
33
|
+
| `thinking` | No | Extended reasoning level |
|
|
34
|
+
| `anthropic` | No | Anthropic-specific options (tools, skills) |
|
|
35
|
+
|
|
36
|
+
## Models
|
|
37
|
+
|
|
38
|
+
Specify models in `provider/model-id` format. Any model supported by the provider's SDK will work.
|
|
39
|
+
|
|
40
|
+
### Supported Providers
|
|
41
|
+
|
|
42
|
+
| Provider | Format | Examples |
|
|
43
|
+
| --------- | ---------------------- | ------------------------------------------------------------ |
|
|
44
|
+
| Anthropic | `anthropic/{model-id}` | `claude-opus-4-5`, `claude-sonnet-4-5`, `claude-haiku-4-5` |
|
|
45
|
+
| Google | `google/{model-id}` | `gemini-3-pro-preview`, `gemini-3-flash`, `gemini-2.5-flash` |
|
|
46
|
+
| OpenAI | `openai/{model-id}` | `gpt-5`, `gpt-4o`, `o4-mini`, `o3`, `o3-mini`, `o1` |
|
|
47
|
+
|
|
48
|
+
### Examples
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
# Anthropic Claude 4.5
|
|
52
|
+
agent:
|
|
53
|
+
model: anthropic/claude-sonnet-4-5
|
|
54
|
+
|
|
55
|
+
# Google Gemini 3
|
|
56
|
+
agent:
|
|
57
|
+
model: google/gemini-3-flash
|
|
58
|
+
|
|
59
|
+
# OpenAI GPT-5
|
|
60
|
+
agent:
|
|
61
|
+
model: openai/gpt-5
|
|
62
|
+
|
|
63
|
+
# OpenAI reasoning models
|
|
64
|
+
agent:
|
|
65
|
+
model: openai/o3-mini
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
> **Note**: Model IDs are passed directly to the provider SDK. Check the provider's documentation for the latest available models.
|
|
69
|
+
|
|
70
|
+
## System Prompt
|
|
71
|
+
|
|
72
|
+
The system prompt sets the agent's persona and instructions:
|
|
73
|
+
|
|
74
|
+
```yaml
|
|
75
|
+
agent:
|
|
76
|
+
system: system # Uses prompts/system.md
|
|
77
|
+
input:
|
|
78
|
+
- COMPANY_NAME
|
|
79
|
+
- PRODUCT_NAME
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Example `prompts/system.md`:
|
|
83
|
+
|
|
84
|
+
```markdown
|
|
85
|
+
You are a friendly support agent for {{COMPANY_NAME}}.
|
|
86
|
+
|
|
87
|
+
## Your Role
|
|
88
|
+
|
|
89
|
+
Help users with questions about {{PRODUCT_NAME}}.
|
|
90
|
+
|
|
91
|
+
## Guidelines
|
|
92
|
+
|
|
93
|
+
- Be helpful and professional
|
|
94
|
+
- If you can't help, offer to escalate
|
|
95
|
+
- Never share internal information
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Agentic Mode
|
|
99
|
+
|
|
100
|
+
Enable multi-step tool calling:
|
|
101
|
+
|
|
102
|
+
```yaml
|
|
103
|
+
agent:
|
|
104
|
+
model: anthropic/claude-sonnet-4-5
|
|
105
|
+
system: system
|
|
106
|
+
tools: [get-user-account, search-docs, create-ticket]
|
|
107
|
+
agentic: true # LLM can call multiple tools
|
|
108
|
+
maxSteps: 10 # Limit cycles to prevent runaway
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**How it works:**
|
|
112
|
+
|
|
113
|
+
1. LLM receives user message
|
|
114
|
+
2. LLM decides to call a tool
|
|
115
|
+
3. Tool executes, result returned to LLM
|
|
116
|
+
4. LLM decides if more tools needed
|
|
117
|
+
5. Repeat until LLM responds or maxSteps reached
|
|
118
|
+
|
|
119
|
+
## Extended Thinking
|
|
120
|
+
|
|
121
|
+
Enable extended reasoning for complex tasks:
|
|
122
|
+
|
|
123
|
+
```yaml
|
|
124
|
+
agent:
|
|
125
|
+
model: anthropic/claude-sonnet-4-5
|
|
126
|
+
thinking: medium # low | medium | high
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
| Level | Token Budget | Use Case |
|
|
130
|
+
| -------- | ------------ | ------------------- |
|
|
131
|
+
| `low` | ~5,000 | Simple reasoning |
|
|
132
|
+
| `medium` | ~10,000 | Moderate complexity |
|
|
133
|
+
| `high` | ~20,000 | Complex analysis |
|
|
134
|
+
|
|
135
|
+
Thinking content streams to the UI and can be displayed to users.
|
|
136
|
+
|
|
137
|
+
## Skills
|
|
138
|
+
|
|
139
|
+
Enable Octavus skills for code execution and file generation:
|
|
140
|
+
|
|
141
|
+
```yaml
|
|
142
|
+
skills:
|
|
143
|
+
qr-code:
|
|
144
|
+
display: description
|
|
145
|
+
description: Generating QR codes
|
|
146
|
+
|
|
147
|
+
agent:
|
|
148
|
+
model: anthropic/claude-sonnet-4-5
|
|
149
|
+
system: system
|
|
150
|
+
skills: [qr-code] # Enable skills
|
|
151
|
+
agentic: true
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Skills provide provider-agnostic code execution in isolated sandboxes. When enabled, the LLM can execute Python/Bash code, run skill scripts, and generate files.
|
|
155
|
+
|
|
156
|
+
See [Skills](/docs/protocol/skills) for full documentation.
|
|
157
|
+
|
|
158
|
+
## Image Generation
|
|
159
|
+
|
|
160
|
+
Enable the LLM to generate images autonomously:
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
agent:
|
|
164
|
+
model: anthropic/claude-sonnet-4-5
|
|
165
|
+
system: system
|
|
166
|
+
imageModel: google/gemini-2.5-flash-image
|
|
167
|
+
agentic: true
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
When `imageModel` is configured, the `octavus_generate_image` tool becomes available. The LLM can decide when to generate images based on user requests.
|
|
171
|
+
|
|
172
|
+
### Supported Image Providers
|
|
173
|
+
|
|
174
|
+
| Provider | Model Types | Examples |
|
|
175
|
+
| -------- | --------------------------------------- | --------------------------------------------------------- |
|
|
176
|
+
| OpenAI | Dedicated image models | `gpt-image-1` |
|
|
177
|
+
| Google | Gemini native (contains "image") | `gemini-2.5-flash-image`, `gemini-3-flash-image-generate` |
|
|
178
|
+
| Google | Imagen dedicated (starts with "imagen") | `imagen-4.0-generate-001` |
|
|
179
|
+
|
|
180
|
+
> **Note**: Google has two image generation approaches. Gemini "native" models (containing "image" in the ID) generate images using the language model API with `responseModalities`. Imagen models (starting with "imagen") use a dedicated image generation API.
|
|
181
|
+
|
|
182
|
+
### Image Sizes
|
|
183
|
+
|
|
184
|
+
The tool supports three image sizes:
|
|
185
|
+
|
|
186
|
+
- `1024x1024` (default) — Square
|
|
187
|
+
- `1792x1024` — Landscape (16:9)
|
|
188
|
+
- `1024x1792` — Portrait (9:16)
|
|
189
|
+
|
|
190
|
+
### Agentic vs Deterministic
|
|
191
|
+
|
|
192
|
+
Use `imageModel` in agent config when:
|
|
193
|
+
|
|
194
|
+
- The LLM should decide when to generate images
|
|
195
|
+
- Users ask for images in natural language
|
|
196
|
+
|
|
197
|
+
Use `generate-image` block (see [Handlers](/docs/protocol/handlers#generate-image)) when:
|
|
198
|
+
|
|
199
|
+
- You want explicit control over image generation
|
|
200
|
+
- Building prompt engineering pipelines
|
|
201
|
+
- Images are generated at specific handler steps
|
|
202
|
+
|
|
203
|
+
## Temperature
|
|
204
|
+
|
|
205
|
+
Control response randomness:
|
|
206
|
+
|
|
207
|
+
```yaml
|
|
208
|
+
agent:
|
|
209
|
+
model: openai/gpt-4o
|
|
210
|
+
temperature: 0.7 # 0 = deterministic, 2 = creative
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Guidelines:**
|
|
214
|
+
|
|
215
|
+
- `0 - 0.3`: Factual, consistent responses
|
|
216
|
+
- `0.4 - 0.7`: Balanced (good default)
|
|
217
|
+
- `0.8 - 1.2`: Creative, varied responses
|
|
218
|
+
- `> 1.2`: Very creative (may be inconsistent)
|
|
219
|
+
|
|
220
|
+
## Provider Options
|
|
221
|
+
|
|
222
|
+
Enable provider-specific features like Anthropic's built-in tools and skills:
|
|
223
|
+
|
|
224
|
+
```yaml
|
|
225
|
+
agent:
|
|
226
|
+
model: anthropic/claude-sonnet-4-5
|
|
227
|
+
anthropic:
|
|
228
|
+
tools:
|
|
229
|
+
web-search:
|
|
230
|
+
display: description
|
|
231
|
+
description: Searching the web
|
|
232
|
+
skills:
|
|
233
|
+
pdf:
|
|
234
|
+
type: anthropic
|
|
235
|
+
description: Processing PDF
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
Provider options are validated against the model—using `anthropic:` with a non-Anthropic model will fail validation.
|
|
239
|
+
|
|
240
|
+
See [Provider Options](/docs/protocol/provider-options) for full documentation.
|
|
241
|
+
|
|
242
|
+
## Thread-Specific Config
|
|
243
|
+
|
|
244
|
+
Override config for named threads:
|
|
245
|
+
|
|
246
|
+
```yaml
|
|
247
|
+
handlers:
|
|
248
|
+
request-human:
|
|
249
|
+
Start summary thread:
|
|
250
|
+
block: start-thread
|
|
251
|
+
thread: summary
|
|
252
|
+
model: anthropic/claude-sonnet-4-5 # Different model
|
|
253
|
+
thinking: low # Different thinking
|
|
254
|
+
maxSteps: 1 # Limit tool calls
|
|
255
|
+
system: escalation-summary # Different prompt
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## Full Example
|
|
259
|
+
|
|
260
|
+
```yaml
|
|
261
|
+
input:
|
|
262
|
+
COMPANY_NAME: { type: string }
|
|
263
|
+
PRODUCT_NAME: { type: string }
|
|
264
|
+
USER_ID: { type: string, optional: true }
|
|
265
|
+
|
|
266
|
+
resources:
|
|
267
|
+
CONVERSATION_SUMMARY:
|
|
268
|
+
type: string
|
|
269
|
+
default: ''
|
|
270
|
+
|
|
271
|
+
tools:
|
|
272
|
+
get-user-account:
|
|
273
|
+
description: Look up user account
|
|
274
|
+
parameters:
|
|
275
|
+
userId: { type: string }
|
|
276
|
+
|
|
277
|
+
search-docs:
|
|
278
|
+
description: Search help documentation
|
|
279
|
+
parameters:
|
|
280
|
+
query: { type: string }
|
|
281
|
+
|
|
282
|
+
create-support-ticket:
|
|
283
|
+
description: Create a support ticket
|
|
284
|
+
parameters:
|
|
285
|
+
summary: { type: string }
|
|
286
|
+
priority: { type: string } # low, medium, high
|
|
287
|
+
|
|
288
|
+
skills:
|
|
289
|
+
qr-code:
|
|
290
|
+
display: description
|
|
291
|
+
description: Generating QR codes
|
|
292
|
+
|
|
293
|
+
agent:
|
|
294
|
+
model: anthropic/claude-sonnet-4-5
|
|
295
|
+
system: system
|
|
296
|
+
input:
|
|
297
|
+
- COMPANY_NAME
|
|
298
|
+
- PRODUCT_NAME
|
|
299
|
+
tools:
|
|
300
|
+
- get-user-account
|
|
301
|
+
- search-docs
|
|
302
|
+
- create-support-ticket
|
|
303
|
+
skills: [qr-code] # Octavus skills
|
|
304
|
+
agentic: true
|
|
305
|
+
maxSteps: 10
|
|
306
|
+
thinking: medium
|
|
307
|
+
# Anthropic-specific options
|
|
308
|
+
anthropic:
|
|
309
|
+
tools:
|
|
310
|
+
web-search:
|
|
311
|
+
display: description
|
|
312
|
+
description: Searching the web
|
|
313
|
+
skills:
|
|
314
|
+
pdf:
|
|
315
|
+
type: anthropic
|
|
316
|
+
description: Processing PDF
|
|
317
|
+
|
|
318
|
+
triggers:
|
|
319
|
+
user-message:
|
|
320
|
+
input:
|
|
321
|
+
USER_MESSAGE: { type: string }
|
|
322
|
+
|
|
323
|
+
handlers:
|
|
324
|
+
user-message:
|
|
325
|
+
Add message:
|
|
326
|
+
block: add-message
|
|
327
|
+
role: user
|
|
328
|
+
prompt: user-message
|
|
329
|
+
input: [USER_MESSAGE]
|
|
330
|
+
display: hidden
|
|
331
|
+
|
|
332
|
+
Respond:
|
|
333
|
+
block: next-message
|
|
334
|
+
```
|