@botpress/adk-cli 1.19.0-beta.3 → 1.19.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/assets/ui-dist/assets/{index-CSTz-oTK.js → index-B3b7PPgV.js} +4 -4
  2. package/{dist/index-DNqXHLNi-27nvpkee.js → assets/ui-dist/assets/index-BESZeTO5.js} +2 -2
  3. package/{dist/index-DAztRXeA-vr85xnxs.css → assets/ui-dist/assets/index-DIFGtVmI.css} +1 -1
  4. package/{dist/index-DfjXY3Oo-szsanhnt.js → assets/ui-dist/assets/index-a3ZL0_Jr.js} +2 -2
  5. package/assets/ui-dist/index.html +2 -2
  6. package/dist/{README-wjb7z7f0.md → README-824wa4jj.md} +1 -1
  7. package/dist/SKILL-75ym6tcj.md +257 -0
  8. package/dist/SKILL-chnwzmt1.md +548 -0
  9. package/dist/SKILL-d4bs53y3.md +244 -0
  10. package/dist/SKILL-h4b2f1n9.md +114 -0
  11. package/dist/SKILL-hbw5nt95.md +111 -0
  12. package/dist/actions-h7hxxvxr.md +823 -0
  13. package/dist/adk-build-emhwd0tg.md +39 -0
  14. package/dist/adk-debug-yrrdtpmb.md +23 -0
  15. package/dist/adk-dev-console-7z9rtjpy.md +17 -0
  16. package/dist/adk-document-ras6zzzh.md +68 -0
  17. package/dist/adk-eval-vx76dwq0.md +17 -0
  18. package/dist/adk-explain-fcsaw852.md +22 -0
  19. package/dist/adk-init-9kmxmbbe.md +30 -0
  20. package/dist/adk-ship-dybzn884.md +29 -0
  21. package/dist/adk-test-xq67savs.md +27 -0
  22. package/dist/adk-validate-1p4skv4m.md +31 -0
  23. package/dist/advanced-patterns-z86m9h1a.md +669 -0
  24. package/dist/agent-config-1aqvkrgf.md +450 -0
  25. package/dist/agent-steps-zj4c1n9t.md +115 -0
  26. package/dist/agent0-assets/skills/adk/SKILL.md +5 -5
  27. package/dist/agent0-assets/skills/adk/references/cli.md +265 -24
  28. package/dist/agent0-assets/skills/adk-debugger/SKILL.md +5 -5
  29. package/dist/agent0-assets/skills/adk-debugger/references/common-failures.md +1 -1
  30. package/dist/agent0-assets/skills/adk-debugger/references/debug-workflow.md +3 -3
  31. package/dist/agent0-assets/skills/adk-debugger/references/traces-and-logs.md +15 -7
  32. package/dist/assets-q7jt8r2q.md +237 -0
  33. package/dist/autonomous-execution-fymc12e5.md +747 -0
  34. package/dist/cli-c31e06yr.md +1334 -0
  35. package/dist/cli.js +963 -548
  36. package/dist/commands.json +24 -3
  37. package/dist/common-failures-ht29w2db.md +231 -0
  38. package/dist/component-registry-bbpw0see.md +43 -0
  39. package/dist/context-api-760cvh0h.md +461 -0
  40. package/dist/conversation-analysis-8ka4nrm4.md +420 -0
  41. package/dist/conversation-lifecycle-4seqqjc1.md +311 -0
  42. package/dist/conversations-gwfvxaee.md +1111 -0
  43. package/dist/custom-components-y5wdgpey.md +167 -0
  44. package/dist/debug-workflow-vz84q80v.md +239 -0
  45. package/dist/desk-k54ktvsd.md +852 -0
  46. package/dist/doc-standards-ck6ax2jd.md +124 -0
  47. package/dist/eval-format-7n9brja4.md +354 -0
  48. package/dist/evals-y1zcr1mc.md +11 -0
  49. package/dist/explain-config-1yaq3zzd.md +424 -0
  50. package/dist/files-dzt0wxn3.md +918 -0
  51. package/dist/{index-gqxgqnyz.html → index-3t354nbw.html} +2 -2
  52. package/dist/{index-CSTz-oTK-mdfh47r8.js → index-B3b7PPgV-zetkb01w.js} +4 -4
  53. package/{assets/ui-dist/assets/index-DNqXHLNi.js → dist/index-BESZeTO5-2rpmcefa.js} +2 -2
  54. package/{assets/ui-dist/assets/index-DAztRXeA.css → dist/index-DIFGtVmI-d4dhjg97.css} +1 -1
  55. package/{assets/ui-dist/assets/index-DfjXY3Oo.js → dist/index-a3ZL0_Jr-q145h35p.js} +2 -2
  56. package/dist/integration-actions-xang7tma.md +659 -0
  57. package/dist/integrations-k5ss07f4.md +266 -0
  58. package/dist/interfaces-6t0bpxs4.md +97 -0
  59. package/dist/knowledge-bases-20rg8p5c.md +456 -0
  60. package/dist/llm-debugging-76ng8rzm.md +209 -0
  61. package/dist/mcp-server-n1asyzhv.md +112 -0
  62. package/dist/messages-gkkg0b54.md +769 -0
  63. package/dist/model-configuration-f273kgd0.md +201 -0
  64. package/dist/multi-agent-dashboard-1mdfjdts.md +70 -0
  65. package/dist/pages-xn18xn73.md +273 -0
  66. package/dist/patterns-mistakes-5vb99dhf.md +469 -0
  67. package/dist/plugins-ttnx8f49.md +280 -0
  68. package/dist/tables-x45t36dd.md +1136 -0
  69. package/dist/tags-46td3qrg.md +516 -0
  70. package/dist/test-patterns-hj47w4nc.md +355 -0
  71. package/dist/testing-workflow-2vkp932f.md +225 -0
  72. package/dist/tools-wk7bq24z.md +581 -0
  73. package/dist/trace-summarization-hdyx1c2e.md +313 -0
  74. package/dist/traces-and-logs-f2kjfh19.md +203 -0
  75. package/dist/triggers-4j2cc86x.md +719 -0
  76. package/dist/ui-server-entry.js +977 -162
  77. package/dist/workflow-steps-mrdrf1c5.md +851 -0
  78. package/dist/workflows-gadx3s69.md +1408 -0
  79. package/dist/zai-agent-reference-e6644aad.md +454 -0
  80. package/dist/zai-complete-guide-mnna5d6f.md +1408 -0
  81. package/package.json +4 -4
@@ -0,0 +1,124 @@
1
+ # ADK Documentation Standards
2
+
3
+ Standards, templates, and quality metrics for ADK documentation.
4
+
5
+ ## Document Types
6
+
7
+ Choose the appropriate style based on what you're documenting:
8
+
9
+ ### Reference Documentation (CLI, API endpoints)
10
+
11
+ - **Length:** 400-500 lines
12
+ - **Style:** Concise, one clear example per command/endpoint from actual project code
13
+ - **Structure:** Quick Start at top, command reference, quick reference at bottom
14
+ - **Focus:** Syntax, options, and practical workflows from real code
15
+
16
+ ```markdown
17
+ # [Topic Name]
18
+
19
+ Brief introduction (1-2 sentences)
20
+
21
+ ## Quick Start
22
+ 5-10 line essential usage example from actual project
23
+
24
+ ## Commands / Endpoints
25
+ ### command-name / GET /endpoint
26
+ Brief description
27
+ **Options:** (if applicable)
28
+ **Example:** (one example from project code)
29
+
30
+ ## Common Workflows
31
+ Only 3-4 workflows verified from actual project code
32
+
33
+ ## Quick Reference
34
+ Command summary table or list
35
+
36
+ ## See Also
37
+ Links to related docs
38
+ ```
39
+
40
+ ### Conceptual Guides (workflows, state management, patterns)
41
+
42
+ - **Length:** 500-700 lines
43
+ - **Style:** Examples from actual project implementations
44
+ - **Structure:** Intro, Core Concepts, Features, Quick Reference
45
+ - **Focus:** Understanding through real code patterns
46
+
47
+ ### Comprehensive Guides (messages, conversations, tables)
48
+
49
+ - **Length:** 600-800 lines
50
+ - **Style:** Complete API coverage with verified examples
51
+ - **Structure:** Full TOC, Features, Patterns, Reference
52
+ - **Focus:** Complete feature coverage with real implementations
53
+
54
+ ```markdown
55
+ # [Topic Name]
56
+
57
+ Brief introduction (2-3 sentences)
58
+
59
+ ## Table of Contents
60
+ - Clear links to major sections
61
+ - Include subsection highlights
62
+
63
+ ## Core Concepts
64
+ Basic understanding needed
65
+
66
+ ## [Main Feature 1]
67
+ ### Basic Usage (example from actual project code)
68
+ ### Edge Cases (only if critical and seen in project)
69
+
70
+ ## [Main Feature 2]
71
+ ...
72
+
73
+ ## Quick Reference
74
+ Essential patterns at a glance (if helpful)
75
+ ```
76
+
77
+ ## Quality Checklists
78
+
79
+ ### All Documents
80
+
81
+ - [ ] Clear `##` and `###` headers for ripgrep
82
+ - [ ] Every concept has code example from actual project
83
+ - [ ] All examples verified in actual source locations
84
+ - [ ] Searchable section names (no vague "Advanced Topics")
85
+ - [ ] Critical distinctions highlighted (ADK vs SDK)
86
+ - [ ] File paths included for code verification
87
+ - [ ] No Common Mistakes or Best Practices sections unless user-provided
88
+
89
+ ### Reference Docs (CLI, API)
90
+
91
+ - [ ] Quick Start at top with example from project
92
+ - [ ] One clear example per command/endpoint
93
+ - [ ] 3-4 workflows verified from project code
94
+ - [ ] 400-500 lines total
95
+
96
+ ### Conceptual/Comprehensive Guides
97
+
98
+ - [ ] Table of contents with descriptive links
99
+ - [ ] Quick Reference section (if helpful)
100
+ - [ ] 500-800 lines depending on complexity
101
+
102
+ ## Document Health Metrics
103
+
104
+ **Reference Docs (CLI, API):**
105
+ - Good: 400-500 lines, Quick Start at top, one example per command, 3-4 workflows
106
+ - Warning: >600 lines, multiple examples per command, separate best practices section
107
+
108
+ **Conceptual Guides:**
109
+ - Good: 500-700 lines, progressive examples, verified workflows
110
+ - Warning: >800 lines, vague sections, missing patterns
111
+
112
+ **All Documents:**
113
+ - Good: Every concept has code example, clear `##` headers, searchable section names
114
+ - Warning: Vague section names ("Advanced", "Other"), no table of contents
115
+
116
+ ## Review Report Format
117
+
118
+ When reviewing documentation, report findings in this structure:
119
+
120
+ 1. **Critical Issues** — Wrong code, broken examples, invented examples
121
+ 2. **Searchability Issues** — Missing TOC, unclear headers
122
+ 3. **Speculative Content** — Common mistakes without user feedback, invented best practices
123
+ 4. **Missing Verification** — Examples without file path references
124
+ 5. **Recommendations** — Priority improvements
@@ -0,0 +1,354 @@
1
+ # Eval File Format
2
+
3
+ Evals are TypeScript files in the `evals/` directory. Each file exports one or more eval definitions using `new Eval`.
4
+
5
+ ## File Location
6
+
7
+ Evals live in `evals/` at the **project root** (not inside `src/`). Create it if it doesn't exist:
8
+
9
+ ```
10
+ my-agent/
11
+ ├── agent.config.ts
12
+ ├── src/
13
+ │ ├── actions/
14
+ │ └── workflows/
15
+ └── evals/ ← create this
16
+ ├── greeting.eval.ts
17
+ └── billing.eval.ts
18
+ ```
19
+
20
+ - **Naming**: `*.eval.ts` convention (recommended)
21
+ - **Auto-discovery**: All files in `evals/` are picked up by `adk evals`
22
+
23
+ ## Full Structure
24
+
25
+ ```typescript
26
+ import { Eval } from '@botpress/evals'
27
+
28
+ export default new Eval({
29
+ name: 'my-eval', // unique identifier (required)
30
+ description: 'What this tests', // optional
31
+ type: 'regression', // 'capability' or 'regression' — optional, for filtering
32
+ tags: ['tools', 'multi-turn'], // optional, for filtering
33
+
34
+ setup: {
35
+ // Seed state or trigger a workflow before the conversation (optional)
36
+ },
37
+
38
+ conversation: [
39
+ {
40
+ user: 'message from user', // or: event, expectSilence
41
+ assert: { /* per-turn assertions */ },
42
+ },
43
+ ],
44
+
45
+ outcome: { /* post-conversation assertions (optional) */ },
46
+
47
+ options: { /* per-eval overrides (optional) */ },
48
+ })
49
+ ```
50
+
51
+ ## Types
52
+
53
+ | Type | Purpose |
54
+ |------|---------|
55
+ | `capability` | Verify the bot can do something new |
56
+ | `regression` | Verify the bot still does it correctly |
57
+
58
+ ## Multiple Evals Per File
59
+
60
+ ```typescript
61
+ export const greeting = new Eval({ name: 'greeting', ... })
62
+ export const farewell = new Eval({ name: 'farewell', ... })
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Conversation Turns
68
+
69
+ Each entry in `conversation` is one turn. A turn must have either `user` or `event`.
70
+
71
+ ### User Message
72
+
73
+ ```typescript
74
+ {
75
+ user: 'What is my account balance?',
76
+ assert: { /* assertions on the bot's response */ },
77
+ }
78
+ ```
79
+
80
+ ### Event Trigger
81
+
82
+ Fire a non-message event (webhook, integration event) instead of a user message.
83
+
84
+ ```typescript
85
+ {
86
+ event: {
87
+ type: 'checkout:order_placed',
88
+ payload: { orderId: 'ORD-001', total: 49.99 },
89
+ },
90
+ assert: {
91
+ workflow: [{ name: 'orderConfirmation', entered: true }],
92
+ },
93
+ }
94
+ ```
95
+
96
+ ### Expect Silence
97
+
98
+ Assert the bot does **not** respond. Add `expectSilence: true` to any turn.
99
+
100
+ ```typescript
101
+ // Silence after a user message
102
+ { user: 'Please ignore this.', expectSilence: true }
103
+
104
+ // Silence after an event
105
+ { event: { type: 'internal:ping' }, expectSilence: true }
106
+ ```
107
+
108
+ > **Note:** `expectSilence` is mutually exclusive with `assert.response`. Every turn must have `user` or `event` — `expectSilence` is a flag on top of that, not a standalone turn type.
109
+
110
+ ---
111
+
112
+ ## Assertion Categories
113
+
114
+ ### Response
115
+
116
+ What the bot said back.
117
+
118
+ ```typescript
119
+ assert: {
120
+ response: [
121
+ { contains: 'ticket' }, // substring present
122
+ { not_contains: 'error' }, // substring absent
123
+ { matches: 'TKT-\\d{3}' }, // regex match
124
+ { llm_judge: 'Response confirms the ticket was created' }, // AI judge, scores 1–5
125
+ ],
126
+ }
127
+ ```
128
+
129
+ ### Tools
130
+
131
+ Which tools the bot called and with what parameters.
132
+
133
+ ```typescript
134
+ assert: {
135
+ tools: [
136
+ { called: 'createTicket' }, // tool was invoked
137
+ { called: 'createTicket', params: { // with specific params
138
+ priority: { equals: 'high' },
139
+ department: { contains: 'Engineering' },
140
+ }},
141
+ { not_called: 'deleteTicket' }, // tool was NOT invoked
142
+ { call_order: ['lookupUser', 'createTicket'] }, // ordered calls
143
+ ],
144
+ }
145
+ ```
146
+
147
+ ### State
148
+
149
+ Bot, user, or conversation state values after the turn.
150
+
151
+ ```typescript
152
+ assert: {
153
+ state: [
154
+ { path: 'conversation.topic', equals: 'support' }, // exact value
155
+ { path: 'conversation.topic', changed: true }, // value changed from before
156
+ { path: 'bot.ticketCount', equals: 3 },
157
+ ],
158
+ }
159
+ ```
160
+
161
+ ### Workflow
162
+
163
+ Workflow execution (verified via trace spans).
164
+
165
+ ```typescript
166
+ assert: {
167
+ workflow: [
168
+ { name: 'onboarding', entered: true }, // workflow was started
169
+ { name: 'onboarding', completed: true }, // workflow finished
170
+ ],
171
+ }
172
+ ```
173
+
174
+ ### Timing
175
+
176
+ How long the bot took to respond (milliseconds).
177
+
178
+ ```typescript
179
+ assert: {
180
+ timing: [
181
+ { response_time: { lte: 5000 } }, // must respond within 5s
182
+ { response_time: { gte: 100 } }, // sanity-check: not suspiciously fast
183
+ ],
184
+ }
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Match Operators
190
+
191
+ Used in tool params, state values, and workflow params:
192
+
193
+ | Operator | Example | Description |
194
+ |----------|---------|-------------|
195
+ | `equals` | `{ equals: 'urgent' }` | Exact match |
196
+ | `contains` | `{ contains: 'HR' }` | Substring |
197
+ | `not_contains` | `{ not_contains: 'test' }` | Excludes substring |
198
+ | `matches` | `{ matches: '\\d+' }` | Regex |
199
+ | `in` | `{ in: ['high', 'urgent'] }` | One of |
200
+ | `exists` | `{ exists: true }` | Property exists |
201
+
202
+ **Numeric-only operators** (for `timing` and numeric state values):
203
+
204
+ | Operator | Example | Description |
205
+ |----------|---------|-------------|
206
+ | `gte` | `{ gte: 100 }` | Greater than or equal |
207
+ | `lte` | `{ lte: 5000 }` | Less than or equal |
208
+
209
+ ---
210
+
211
+ ## Eval Setup
212
+
213
+ Use `setup` to put the bot in a known state before the conversation starts.
214
+
215
+ ### Seed State
216
+
217
+ Pre-populate bot, user, or conversation state.
218
+
219
+ ```typescript
220
+ setup: {
221
+ state: {
222
+ bot: { welcomeMessageSent: true },
223
+ user: { plan: 'pro' },
224
+ conversation: { topic: 'billing' },
225
+ },
226
+ }
227
+ ```
228
+
229
+ The seeded state becomes the baseline for `changed` assertions — `{ changed: false }` passes if the value matches the seeded value at the end.
230
+
231
+ ### Trigger a Workflow
232
+
233
+ Start a workflow before the conversation begins.
234
+
235
+ ```typescript
236
+ setup: {
237
+ workflow: {
238
+ trigger: 'onboarding',
239
+ input: { userId: 'test-user-1' },
240
+ },
241
+ }
242
+ ```
243
+
244
+ Both can be combined:
245
+
246
+ ```typescript
247
+ setup: {
248
+ state: {
249
+ bot: { sleepDurationMs: 3000 }, // 3 seconds instead of default 10 minutes
250
+ },
251
+ workflow: {
252
+ trigger: 'reminderFlow',
253
+ input: { userId: 'test-user-1' },
254
+ },
255
+ }
256
+ ```
257
+
258
+ > **Testing `step.sleep()`:** Server-side scheduling can't be fast-forwarded. Workaround: make the sleep duration configurable by reading it from bot state in the workflow, then seed a short value in ms (e.g. `3000`) in `setup.state.bot`.
259
+
260
+ ---
261
+
262
+ ## Outcome Assertions
263
+
264
+ Run once after all conversation turns complete. Supports `state` and `workflow` (not `response` or `tools` — those are per-turn only).
265
+
266
+ ```typescript
267
+ outcome: {
268
+ state: [
269
+ { path: 'conversation.resolved', equals: true },
270
+ ],
271
+ workflow: [
272
+ { name: 'ticketFlow', completed: true },
273
+ ],
274
+ }
275
+ ```
276
+
277
+ ---
278
+
279
+ ## Options
280
+
281
+ Override defaults for a specific eval. Cascades: **eval options → agent config → default**.
282
+
283
+ ```typescript
284
+ options: {
285
+ idleTimeout: 60000, // ms to wait for bot response (default: 30000)
286
+ judgePassThreshold: 4, // llm_judge score required to pass, 1–5 (default: 3)
287
+ }
288
+ ```
289
+
290
+ Agent-level defaults in `agent.config.ts`:
291
+
292
+ ```typescript
293
+ export default defineConfig({
294
+ evals: {
295
+ idleTimeout: 20000,
296
+ judgePassThreshold: 3,
297
+ judgeModel: 'fast', // 'fast', 'best', or a model ref like 'openai:gpt-4o'
298
+ },
299
+ })
300
+ ```
301
+
302
+ ---
303
+
304
+ ## Common Mistakes
305
+
306
+ ❌ **Turn with neither `user` nor `event`**
307
+
308
+ ```typescript
309
+ // WRONG — every turn needs a trigger
310
+ { expectSilence: true }
311
+ ```
312
+
313
+ ✅ **Correct**
314
+
315
+ ```typescript
316
+ { user: 'hello', expectSilence: true }
317
+ ```
318
+
319
+ ---
320
+
321
+ ❌ **`expectSilence` with `assert.response`**
322
+
323
+ ```typescript
324
+ // WRONG — mutually exclusive
325
+ { user: 'hello', expectSilence: true, assert: { response: [{ contains: 'hi' }] } }
326
+ ```
327
+
328
+ ✅ **Correct — pick one**
329
+
330
+ ```typescript
331
+ { user: 'hello', expectSilence: true }
332
+ // or
333
+ { user: 'hello', assert: { response: [{ contains: 'hi' }] } }
334
+ ```
335
+
336
+ ---
337
+
338
+ ❌ **Both `user` and `event` on the same turn**
339
+
340
+ ```typescript
341
+ // WRONG — mutually exclusive
342
+ { user: 'hello', event: { type: 'payment.failed' } }
343
+ ```
344
+
345
+ ✅ **Correct — use separate turns**
346
+
347
+ ```typescript
348
+ { event: { type: 'payment.failed', payload: { amount: 50 } } }
349
+ ```
350
+
351
+ ## See Also
352
+
353
+ - [testing-workflow.md](./testing-workflow.md) — Running evals, interpreting output, the write → test → iterate loop
354
+ - [test-patterns.md](./test-patterns.md) — Per-primitive testing patterns
@@ -0,0 +1,11 @@
1
+ # Evals
2
+
3
+ Evals let you test your agent with automated scenarios and assertions.
4
+
5
+ - File location: `evals/`
6
+ - Run with: `adk evals`
7
+ - View history: `adk evals runs`
8
+
9
+ For detailed guidance — writing evals, assertion types, testing workflows, per-primitive patterns — use the `adk-evals` skill.
10
+
11
+ Install it with `npx skills add botpress/skills --skill adk-evals`.