@botpress/adk-cli 1.19.0-beta.4 → 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 (65) hide show
  1. package/dist/{README-wjb7z7f0.md → README-824wa4jj.md} +1 -1
  2. package/dist/SKILL-75ym6tcj.md +257 -0
  3. package/dist/SKILL-chnwzmt1.md +548 -0
  4. package/dist/SKILL-d4bs53y3.md +244 -0
  5. package/dist/SKILL-h4b2f1n9.md +114 -0
  6. package/dist/SKILL-hbw5nt95.md +111 -0
  7. package/dist/actions-h7hxxvxr.md +823 -0
  8. package/dist/adk-build-emhwd0tg.md +39 -0
  9. package/dist/adk-debug-yrrdtpmb.md +23 -0
  10. package/dist/adk-dev-console-7z9rtjpy.md +17 -0
  11. package/dist/adk-document-ras6zzzh.md +68 -0
  12. package/dist/adk-eval-vx76dwq0.md +17 -0
  13. package/dist/adk-explain-fcsaw852.md +22 -0
  14. package/dist/adk-init-9kmxmbbe.md +30 -0
  15. package/dist/adk-ship-dybzn884.md +29 -0
  16. package/dist/adk-test-xq67savs.md +27 -0
  17. package/dist/adk-validate-1p4skv4m.md +31 -0
  18. package/dist/advanced-patterns-z86m9h1a.md +669 -0
  19. package/dist/agent-config-1aqvkrgf.md +450 -0
  20. package/dist/agent-steps-zj4c1n9t.md +115 -0
  21. package/dist/assets-q7jt8r2q.md +237 -0
  22. package/dist/autonomous-execution-fymc12e5.md +747 -0
  23. package/dist/cli-c31e06yr.md +1334 -0
  24. package/dist/cli.js +970 -566
  25. package/dist/commands.json +24 -3
  26. package/dist/common-failures-ht29w2db.md +231 -0
  27. package/dist/component-registry-bbpw0see.md +43 -0
  28. package/dist/context-api-760cvh0h.md +461 -0
  29. package/dist/conversation-analysis-8ka4nrm4.md +420 -0
  30. package/dist/conversation-lifecycle-4seqqjc1.md +311 -0
  31. package/dist/conversations-gwfvxaee.md +1111 -0
  32. package/dist/custom-components-y5wdgpey.md +167 -0
  33. package/dist/debug-workflow-vz84q80v.md +239 -0
  34. package/dist/desk-k54ktvsd.md +852 -0
  35. package/dist/doc-standards-ck6ax2jd.md +124 -0
  36. package/dist/eval-format-7n9brja4.md +354 -0
  37. package/dist/evals-y1zcr1mc.md +11 -0
  38. package/dist/explain-config-1yaq3zzd.md +424 -0
  39. package/dist/files-dzt0wxn3.md +918 -0
  40. package/dist/integration-actions-xang7tma.md +659 -0
  41. package/dist/integrations-k5ss07f4.md +266 -0
  42. package/dist/interfaces-6t0bpxs4.md +97 -0
  43. package/dist/knowledge-bases-20rg8p5c.md +456 -0
  44. package/dist/llm-debugging-76ng8rzm.md +209 -0
  45. package/dist/mcp-server-n1asyzhv.md +112 -0
  46. package/dist/messages-gkkg0b54.md +769 -0
  47. package/dist/model-configuration-f273kgd0.md +201 -0
  48. package/dist/multi-agent-dashboard-1mdfjdts.md +70 -0
  49. package/dist/pages-xn18xn73.md +273 -0
  50. package/dist/patterns-mistakes-5vb99dhf.md +469 -0
  51. package/dist/plugins-ttnx8f49.md +280 -0
  52. package/dist/tables-x45t36dd.md +1136 -0
  53. package/dist/tags-46td3qrg.md +516 -0
  54. package/dist/test-patterns-hj47w4nc.md +355 -0
  55. package/dist/testing-workflow-2vkp932f.md +225 -0
  56. package/dist/tools-wk7bq24z.md +581 -0
  57. package/dist/trace-summarization-hdyx1c2e.md +313 -0
  58. package/dist/traces-and-logs-f2kjfh19.md +203 -0
  59. package/dist/triggers-4j2cc86x.md +719 -0
  60. package/dist/ui-server-entry.js +952 -137
  61. package/dist/workflow-steps-mrdrf1c5.md +851 -0
  62. package/dist/workflows-gadx3s69.md +1408 -0
  63. package/dist/zai-agent-reference-e6644aad.md +454 -0
  64. package/dist/zai-complete-guide-mnna5d6f.md +1408 -0
  65. package/package.json +4 -4
@@ -0,0 +1,424 @@
1
+ # Explaining an Agent's Configuration
2
+
3
+ Guide for interpreting and explaining an ADK agent's configuration to the developer. Use this when the developer asks questions like "What does my bot do?", "Explain my config", "What integrations do I have?", or "What models am I using?".
4
+
5
+ ## Gathering Configuration Data
6
+
7
+ Before explaining anything, gather data from multiple sources. Each source provides a different view of the project.
8
+
9
+ ### Source 1: `adk status --format json`
10
+
11
+ Structured overview of the project — primitives, integrations, and server state.
12
+
13
+ ```bash
14
+ adk status --format json
15
+ ```
16
+
17
+ **Example output:**
18
+
19
+ ```json
20
+ {
21
+ "project": {
22
+ "name": "customer-support-bot",
23
+ "path": "/home/dev/customer-support-bot"
24
+ },
25
+ "primitives": {
26
+ "actions": {
27
+ "count": 3,
28
+ "details": [
29
+ { "name": "lookupCustomer", "path": "src/actions/lookup-customer.ts", "description": "Look up customer records" },
30
+ { "name": "sendInvoice", "path": "src/actions/send-invoice.ts", "description": "Send invoices to customers" },
31
+ { "name": "triageTicket", "path": "src/actions/triage-ticket.ts", "description": "Route support tickets" }
32
+ ],
33
+ "names": ["lookupCustomer", "sendInvoice", "triageTicket"]
34
+ },
35
+ "tools": {
36
+ "count": 2,
37
+ "details": [
38
+ { "name": "search", "path": "src/tools/search.ts", "description": "Search indexed docs" },
39
+ { "name": "lookup", "path": "src/tools/lookup.ts", "description": "Look up CRM records" }
40
+ ]
41
+ },
42
+ "workflows": { "count": 2, "details": [...] },
43
+ "conversations": {
44
+ "count": 1,
45
+ "details": [
46
+ { "name": "supportConversation @ chat.channel, webchat.channel", "path": "src/conversations/support.ts", "description": "Handle support conversations" }
47
+ ]
48
+ },
49
+ "triggers": { "count": 0, "details": [] },
50
+ "tables": { "count": 1, "details": [...] },
51
+ "knowledge": { "count": 1, "details": [...] }
52
+ },
53
+ "integrations": [
54
+ { "alias": "slack", "name": "slack", "version": "2.5.5", "status": "configured" },
55
+ { "alias": "browser", "name": "browser", "version": "1.0.0", "status": "unconfigured", "missing": ["apiKey"] }
56
+ ],
57
+ "devServer": {
58
+ "running": true,
59
+ "port": 3100,
60
+ "botId": "bot_abc123",
61
+ "url": "http://localhost:3100"
62
+ },
63
+ "adkDevConsole": {
64
+ "running": true,
65
+ "port": 3005,
66
+ "url": "http://localhost:3005"
67
+ }
68
+ }
69
+ ```
70
+
71
+ **What this tells you:**
72
+ - Project name and location
73
+ - Every registered primitive with name, file path, and description
74
+ - Integration status — which are configured and which are missing fields
75
+ - Whether the dev server is running
76
+
77
+ ### Source 2: `agent.config.ts`
78
+
79
+ Full configuration details — models, state schemas, integration config, variables.
80
+
81
+ Read the file directly:
82
+
83
+ ```bash
84
+ cat agent.config.ts
85
+ ```
86
+
87
+ **What this tells you:**
88
+ - Model configuration (`defaultModels`)
89
+ - State schemas (`user.state`, `bot.state`, `conversation.state`)
90
+ - Integration versions and inline config
91
+ - Configuration schema
92
+ - Environment variable usage
93
+
94
+ ### Source 3: `agent.json`
95
+
96
+ Bot and workspace IDs for deployment.
97
+
98
+ ```bash
99
+ cat agent.json
100
+ ```
101
+
102
+ **Example:**
103
+
104
+ ```json
105
+ {
106
+ "botId": "bot_abc123",
107
+ "workspaceId": "ws_xyz789"
108
+ }
109
+ ```
110
+
111
+ ### Source 4: `agent.local.json`
112
+
113
+ Development bot ID (may not exist if `adk dev` hasn't run yet).
114
+
115
+ ```bash
116
+ cat agent.local.json
117
+ ```
118
+
119
+ **Example:**
120
+
121
+ ```json
122
+ {
123
+ "devId": "bot_dev_456"
124
+ }
125
+ ```
126
+
127
+ ## Explaining Each Configuration Section
128
+
129
+ ### Metadata
130
+
131
+ The `name` and `description` fields in `agent.config.ts`.
132
+
133
+ **How to explain:**
134
+ - The `name` identifies the bot in the Botpress Cloud dashboard and CLI output.
135
+ - The `description` is optional — it documents the bot's purpose.
136
+
137
+ **Example explanation:**
138
+
139
+ > This is **customer-support-bot** — a customer support assistant. The name is used as the bot identifier in Botpress Cloud.
140
+
141
+ **Potential issues:**
142
+ - Missing `description` — not critical, but worth adding for documentation.
143
+ - Name with spaces or special characters — should be kebab-case.
144
+
145
+ ### Model Configuration
146
+
147
+ The `defaultModels` object controls which AI models power the bot.
148
+
149
+ **Two model slots:**
150
+
151
+ | Slot | Purpose | Used By |
152
+ |------|---------|---------|
153
+ | `autonomous` | Agentic reasoning — conversation handling, tool selection, multi-step logic | `execute()` in conversations and workflows |
154
+ | `zai` | Utility AI operations — extraction, classification, summarization | `adk.zai.extract()`, `adk.zai.check()`, `adk.zai.text()`, etc. |
155
+
156
+ **How to explain model choices:**
157
+
158
+ ```typescript
159
+ defaultModels: {
160
+ autonomous: "openai:gpt-4o",
161
+ zai: "openai:gpt-4o-mini",
162
+ }
163
+ ```
164
+
165
+ > Your bot uses **gpt-4o** for autonomous reasoning (conversations, tool calls) and **gpt-4o-mini** for Zai utility operations (extraction, classification). This is a good balance — the more capable model handles complex decision-making while the cheaper/faster model handles structured utility tasks.
166
+
167
+ **Common configurations and tradeoffs:**
168
+
169
+ | Configuration | Tradeoff |
170
+ |---------------|----------|
171
+ | `autonomous: "openai:gpt-4o"` | High quality, higher cost and latency |
172
+ | `autonomous: "openai:gpt-4o-mini"` | Fast and cheap, less capable for complex reasoning |
173
+ | `autonomous: "fast"` | Zai shortcut — fastest/cheapest available model |
174
+ | `autonomous: "best"` | Zai shortcut — highest quality available model |
175
+ | `autonomous: "anthropic:claude-3-5-sonnet"` | Strong reasoning, different provider |
176
+ | `zai: "openai:gpt-4o-mini"` | Good default for utility tasks |
177
+ | Fallback arrays like `["openai:gpt-4o", "anthropic:claude-3-5-sonnet"]` | Automatic fallback if first model is unavailable |
178
+
179
+ **If `defaultModels` is not set**, the ADK uses these defaults:
180
+ - `zai`: `"openai:gpt-4.1-2025-04-14"`
181
+ - `autonomous`: `"openai:gpt-4.1-mini-2025-04-14"`
182
+
183
+ **Potential issues:**
184
+ - No `defaultModels` set — the bot uses ADK defaults, which may not be optimal.
185
+ - Both slots set to `"fast"` — fine for development, but may underperform in production for complex conversations.
186
+ - Both slots set to `"best"` — high quality but expensive; consider using `"best"` only for `autonomous`.
187
+
188
+ ### Integrations
189
+
190
+ The `dependencies.integrations` section defines which external services the bot connects to.
191
+
192
+ **How to explain:**
193
+
194
+ For each integration, describe:
195
+ 1. **What it is** — the platform or service it connects to
196
+ 2. **What it provides** — channels (for messaging), actions (for API calls), events (for triggers)
197
+ 3. **Whether it's configured** — check the `status` field from `adk status`
198
+
199
+ **Example explanation:**
200
+
201
+ ```typescript
202
+ dependencies: {
203
+ integrations: {
204
+ webchat: "webchat@0.3.0",
205
+ chat: "chat@1.0.0",
206
+ slack: {
207
+ version: "slack@2.5.5",
208
+ enabled: true,
209
+ config: { botToken: "{{secrets.SLACK_BOT_TOKEN}}" },
210
+ },
211
+ browser: "browser@0.8.7",
212
+ },
213
+ }
214
+ ```
215
+
216
+ > Your bot has 4 integrations:
217
+ >
218
+ > - **webchat** (v0.3.0) — Provides the Botpress webchat widget channel. Users can chat with your bot through an embeddable web widget.
219
+ > - **chat** (v1.0.0) — Provides the Botpress Chat API channel. Allows programmatic messaging via the Botpress API.
220
+ > - **slack** (v2.5.5) — Connects to Slack. Provides channels for DMs and group messages, plus actions like `sendMessage`, `addReaction`, etc. Configured with a bot token from environment variables.
221
+ > - **browser** (v0.8.7) — Provides web browsing and scraping actions like `webSearch` and `browsePages`. No channel — this is a tool-only integration.
222
+
223
+ **To get details about a specific integration's capabilities:**
224
+
225
+ ```bash
226
+ adk info slack
227
+ ```
228
+
229
+ **Potential issues:**
230
+ - Integration with `status: "unconfigured"` and `missing` fields — needs configuration before it works.
231
+ - Integration using hardcoded secrets instead of the ADK secrets API — security risk.
232
+ - Integration with `enabled: false` — installed but not active.
233
+
234
+ ### State Schemas
235
+
236
+ State schemas define what data the bot persists across interactions.
237
+
238
+ **Three state scopes:**
239
+
240
+ | Scope | Persisted Per | Typical Use |
241
+ |-------|--------------|-------------|
242
+ | `user.state` | User | Preferences, profile data, onboarding progress |
243
+ | `bot.state` | Bot (global) | Feature flags, counters, maintenance mode |
244
+ | `conversation.state` | Conversation | Context within a single conversation thread |
245
+
246
+ **How to explain:**
247
+
248
+ ```typescript
249
+ user: {
250
+ state: z.object({
251
+ name: z.string().optional().describe("The user's name"),
252
+ department: z.string().optional().describe("The user's department"),
253
+ role: z.string().optional().describe("The user's job role"),
254
+ age: z.number(),
255
+ }).default({ age: 10 }),
256
+ },
257
+ bot: {
258
+ state: z.object({
259
+ version: z.number(),
260
+ ticketCounter: z.number(),
261
+ }).default({ version: 0, ticketCounter: 0 }),
262
+ },
263
+ ```
264
+
265
+ > **User state** tracks per-user data:
266
+ > - `name` (optional string) — The user's name, collected during conversation
267
+ > - `department` (optional string) — The user's department
268
+ > - `role` (optional string) — The user's job role
269
+ > - `age` (number, defaults to 10) — The user's age
270
+ >
271
+ > **Bot state** tracks global data:
272
+ > - `version` (number, defaults to 0) — Bot configuration version
273
+ > - `ticketCounter` (number, defaults to 0) — Running count of tickets created
274
+ >
275
+ > No conversation state is defined — conversation-scoped data is not being tracked.
276
+
277
+ **Potential issues:**
278
+ - No `.default()` on required fields — will fail if state hasn't been initialized.
279
+ - Large state objects — can slow down read/write operations.
280
+ - Sensitive data in state (emails, tokens) — consider whether it needs to be stored.
281
+
282
+ ### Variables and Secrets
283
+
284
+ Check the `secrets` block in `agent.config.ts` for declared secrets, and look for hardcoded string literals in integration configs.
285
+
286
+ **How to explain:**
287
+
288
+ > Your config declares these secrets:
289
+ > - `SLACK_BOT_TOKEN` — Used to authenticate the Slack integration
290
+ > - `LINEAR_API_KEY` — Used to authenticate the Linear integration
291
+ >
292
+ > Secrets are managed via `adk secrets` and injected at runtime. Make sure they're set for both dev and production environments.
293
+
294
+ **Potential issues:**
295
+ - Hardcoded secrets in `agent.config.ts` — should use the ADK secrets API instead.
296
+ - Declared secrets that aren't set — the integration won't work at runtime.
297
+
298
+ ### Registered Primitives
299
+
300
+ The primitives from `adk status` show what the bot can actually do.
301
+
302
+ **How to explain each type:**
303
+
304
+ | Primitive | What It Means |
305
+ |-----------|--------------|
306
+ | **Actions** | Functions callable by the bot or external APIs. Each action has typed input/output. |
307
+ | **Tools** | AI-callable tools — these are what the LLM can invoke during autonomous reasoning. |
308
+ | **Workflows** | Long-running, resumable processes with step-based execution. |
309
+ | **Conversations** | Message handlers — routes incoming messages by channel. |
310
+ | **Triggers** | Event-driven handlers — react to specific events (e.g., new user, webhook). |
311
+ | **Tables** | Structured data storage with optional semantic search. |
312
+ | **Knowledge** | RAG knowledge bases — documents the bot can search and cite. |
313
+
314
+ **Example explanation from status output:**
315
+
316
+ > Your bot has **3 actions**, **2 tools**, **2 workflows**, **1 conversation handler**, **no triggers**, **1 table**, and **1 knowledge base**.
317
+ >
318
+ > **What it can do:**
319
+ > - Look up customers, send invoices, and triage tickets (actions)
320
+ > - Search docs and look up CRM records autonomously (tools — the LLM decides when to call these)
321
+ > - Escalate urgent tickets and schedule follow-ups (workflows — long-running processes)
322
+ > - Handle support conversations on chat and webchat channels (conversation handler)
323
+ > - Store contacts (table)
324
+ > - Answer questions from the FAQ knowledge base (knowledge)
325
+
326
+ ## Producing a Structured Explanation
327
+
328
+ ### High-Level Overview ("What does my bot do?")
329
+
330
+ Combine all sources into a concise summary:
331
+
332
+ 1. Start with the bot's name and description
333
+ 2. List what channels it operates on (from integrations + conversations)
334
+ 3. Summarize its capabilities (from primitives)
335
+ 4. Mention the AI models powering it
336
+ 5. Note any issues
337
+
338
+ **Example full explanation:**
339
+
340
+ > **customer-support-bot** is a customer support assistant that operates on **Slack**, **webchat**, and the **Chat API**.
341
+ >
342
+ > It uses **gpt-4o** for conversations and **gpt-4o-mini** for utility AI tasks.
343
+ >
344
+ > **Capabilities:**
345
+ > - Looks up customers, sends invoices, and triages support tickets
346
+ > - Can autonomously search documentation and look up CRM records
347
+ > - Runs escalation and follow-up workflows for ticket management
348
+ > - Stores contacts in a table and uses an FAQ knowledge base for answers
349
+ >
350
+ > **State tracking:**
351
+ > - Tracks user preferences (language, timezone, account tier)
352
+ > - Maintains global counters and feature flags
353
+ >
354
+ > **Issues to address:**
355
+ > - The `browser` integration is missing its `apiKey` configuration
356
+
357
+ ### Section-Specific Explanation
358
+
359
+ When the developer asks about a specific section, read the relevant part of `agent.config.ts` and explain just that section using the patterns above.
360
+
361
+ ### Identifying Issues
362
+
363
+ When reviewing the config, check for:
364
+
365
+ | Check | How to Detect | Severity |
366
+ |-------|--------------|----------|
367
+ | Unconfigured integrations | `status: "unconfigured"` in `adk status` output | High — integration won't work |
368
+ | Hardcoded secrets | String literals in `config` blocks instead of ADK secrets API | High — security risk |
369
+ | Missing default models | No `defaultModels` in `agent.config.ts` | Low — ADK defaults apply |
370
+ | No conversation handler | `conversations.count === 0` in status | High — bot can't respond to messages |
371
+ | No tools registered | `tools.count === 0` in status | Medium — LLM can't take autonomous actions |
372
+ | No knowledge base | `knowledge.count === 0` in status | Low — bot relies only on tools and actions |
373
+ | State without defaults | `z.object({...})` without `.default()` | Medium — may fail on first access |
374
+ | Unused integrations | Integration installed but no conversation handler or action references it | Low — wasted dependency |
375
+
376
+ ### Suggesting Improvements
377
+
378
+ Based on what's present vs missing, suggest concrete next steps:
379
+
380
+ - No tools? "Consider adding tools in `src/tools/` so the LLM can take autonomous actions during conversations."
381
+ - No knowledge base? "If your bot needs to answer questions from documents, add files to `src/knowledge/`."
382
+ - Using `"fast"` for autonomous model in production? "Consider upgrading the autonomous model to `gpt-4o` or `best` for better reasoning quality in production."
383
+ - No conversation state defined? "If you need to track context within a conversation (e.g., current topic, step in a flow), add a `conversation.state` schema."
384
+
385
+ ## Handling Common Questions
386
+
387
+ ### "What does my bot do?"
388
+
389
+ 1. Run `adk status --format json`
390
+ 2. Read `agent.config.ts`
391
+ 3. Produce a high-level overview (see template above)
392
+
393
+ ### "What integrations do I have?"
394
+
395
+ 1. Run `adk status --format json` — check the `integrations` array
396
+ 2. For each integration, explain what it provides
397
+ 3. Flag any with `status: "unconfigured"`
398
+ 4. Optionally run `adk info <name>` to show available actions/channels
399
+
400
+ ### "Explain my config"
401
+
402
+ 1. Read `agent.config.ts`
403
+ 2. Walk through each section: metadata, models, integrations, state, variables
404
+ 3. Use the section-specific explanation patterns above
405
+
406
+ ### "What models am I using?"
407
+
408
+ 1. Read `agent.config.ts` — find `defaultModels`
409
+ 2. Explain each slot (autonomous vs zai) and the tradeoffs
410
+ 3. If not set, mention the ADK defaults
411
+
412
+ ### "What state does my bot track?"
413
+
414
+ 1. Read `agent.config.ts` — find `user.state`, `bot.state`, `conversation.state`
415
+ 2. List each field with its type, whether it's optional, and its default value
416
+ 3. Explain the `.describe()` annotations if present — these document the field's purpose
417
+
418
+ ## See Also
419
+
420
+ - **[agent-config.md](./agent-config.md)** — Full configuration format and options reference
421
+ - **[model-configuration.md](./model-configuration.md)** — AI model configuration details and precedence
422
+ - **[integration-actions.md](./integration-actions.md)** — Using integration actions in code
423
+ - **[context-api.md](./context-api.md)** — Accessing runtime services like client and state
424
+ - **[cli.md](./cli.md)** — Complete CLI command reference