@botpress/adk 1.18.2 → 1.19.0-beta.10

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 (299) hide show
  1. package/dist/agent-init/agent-project-generator.d.ts +10 -7
  2. package/dist/agent-init/agent-project-generator.d.ts.map +1 -1
  3. package/dist/agent-project/agent-project.d.ts +1 -1
  4. package/dist/agent-project/agent-project.d.ts.map +1 -1
  5. package/dist/agent-project/component-files.d.ts +10 -0
  6. package/dist/agent-project/component-files.d.ts.map +1 -0
  7. package/dist/agent-project/component-index-writer.d.ts +22 -0
  8. package/dist/agent-project/component-index-writer.d.ts.map +1 -0
  9. package/dist/agent-project/config-writer.d.ts +5 -0
  10. package/dist/agent-project/config-writer.d.ts.map +1 -1
  11. package/dist/agent-project/dependencies-parser.d.ts.map +1 -1
  12. package/dist/agent-project/file-watcher.d.ts.map +1 -1
  13. package/dist/agent-project/index.d.ts +3 -0
  14. package/dist/agent-project/index.d.ts.map +1 -1
  15. package/dist/agent-project/lock-to-dependencies.d.ts +11 -0
  16. package/dist/agent-project/lock-to-dependencies.d.ts.map +1 -0
  17. package/dist/agent-project/types.d.ts +1 -0
  18. package/dist/agent-project/types.d.ts.map +1 -1
  19. package/dist/agent-project/validation-errors.d.ts +1 -0
  20. package/dist/agent-project/validation-errors.d.ts.map +1 -1
  21. package/dist/agent0/capabilities/commands/adk-build.md +39 -0
  22. package/dist/agent0/capabilities/commands/adk-debug.md +23 -0
  23. package/dist/agent0/capabilities/commands/adk-dev-console.md +17 -0
  24. package/dist/agent0/capabilities/commands/adk-document.md +68 -0
  25. package/dist/agent0/capabilities/commands/adk-eval.md +17 -0
  26. package/dist/agent0/capabilities/commands/adk-explain.md +22 -0
  27. package/dist/agent0/capabilities/commands/adk-init.md +30 -0
  28. package/dist/agent0/capabilities/commands/adk-ship.md +29 -0
  29. package/dist/agent0/capabilities/commands/adk-test.md +27 -0
  30. package/dist/agent0/capabilities/commands/adk-validate.md +31 -0
  31. package/dist/agent0/capabilities/skills/adk/SKILL.md +548 -0
  32. package/dist/agent0/capabilities/skills/adk/references/actions.md +823 -0
  33. package/dist/agent0/capabilities/skills/adk/references/advanced-patterns.md +669 -0
  34. package/dist/agent0/capabilities/skills/adk/references/agent-config.md +450 -0
  35. package/dist/agent0/capabilities/skills/adk/references/assets.md +237 -0
  36. package/dist/agent0/capabilities/skills/adk/references/autonomous-execution.md +747 -0
  37. package/dist/agent0/capabilities/skills/adk/references/cli.md +1334 -0
  38. package/dist/agent0/capabilities/skills/adk/references/context-api.md +461 -0
  39. package/dist/agent0/capabilities/skills/adk/references/conversation-lifecycle.md +311 -0
  40. package/dist/agent0/capabilities/skills/adk/references/conversations.md +1111 -0
  41. package/dist/agent0/capabilities/skills/adk/references/custom-components.md +167 -0
  42. package/dist/agent0/capabilities/skills/adk/references/desk.md +852 -0
  43. package/dist/agent0/capabilities/skills/adk/references/evals.md +11 -0
  44. package/dist/agent0/capabilities/skills/adk/references/explain-config.md +424 -0
  45. package/dist/agent0/capabilities/skills/adk/references/files.md +918 -0
  46. package/dist/agent0/capabilities/skills/adk/references/integration-actions.md +659 -0
  47. package/dist/agent0/capabilities/skills/adk/references/integrations.md +266 -0
  48. package/dist/agent0/capabilities/skills/adk/references/interfaces.md +97 -0
  49. package/dist/agent0/capabilities/skills/adk/references/knowledge-bases.md +456 -0
  50. package/dist/agent0/capabilities/skills/adk/references/mcp-server.md +112 -0
  51. package/dist/agent0/capabilities/skills/adk/references/messages.md +769 -0
  52. package/dist/agent0/capabilities/skills/adk/references/model-configuration.md +201 -0
  53. package/dist/agent0/capabilities/skills/adk/references/patterns-mistakes.md +469 -0
  54. package/dist/agent0/capabilities/skills/adk/references/plugins.md +280 -0
  55. package/dist/agent0/capabilities/skills/adk/references/tables.md +1136 -0
  56. package/dist/agent0/capabilities/skills/adk/references/tags.md +516 -0
  57. package/dist/agent0/capabilities/skills/adk/references/tools.md +581 -0
  58. package/dist/agent0/capabilities/skills/adk/references/triggers.md +719 -0
  59. package/dist/agent0/capabilities/skills/adk/references/workflow-steps.md +851 -0
  60. package/dist/agent0/capabilities/skills/adk/references/workflows.md +1408 -0
  61. package/dist/agent0/capabilities/skills/adk/references/zai-agent-reference.md +454 -0
  62. package/dist/agent0/capabilities/skills/adk/references/zai-complete-guide.md +1408 -0
  63. package/dist/agent0/capabilities/skills/adk-debugger/SKILL.md +257 -0
  64. package/dist/agent0/capabilities/skills/adk-debugger/references/common-failures.md +231 -0
  65. package/dist/agent0/capabilities/skills/adk-debugger/references/conversation-analysis.md +420 -0
  66. package/dist/agent0/capabilities/skills/adk-debugger/references/debug-workflow.md +239 -0
  67. package/dist/agent0/capabilities/skills/adk-debugger/references/llm-debugging.md +209 -0
  68. package/dist/agent0/capabilities/skills/adk-debugger/references/trace-summarization.md +313 -0
  69. package/dist/agent0/capabilities/skills/adk-debugger/references/traces-and-logs.md +203 -0
  70. package/dist/agent0/capabilities/skills/adk-dev-console/SKILL.md +111 -0
  71. package/dist/agent0/capabilities/skills/adk-dev-console/references/agent-steps.md +115 -0
  72. package/dist/agent0/capabilities/skills/adk-dev-console/references/component-registry.md +43 -0
  73. package/dist/agent0/capabilities/skills/adk-dev-console/references/multi-agent-dashboard.md +70 -0
  74. package/dist/agent0/capabilities/skills/adk-dev-console/references/pages.md +273 -0
  75. package/dist/agent0/capabilities/skills/adk-docs/SKILL.md +114 -0
  76. package/dist/agent0/capabilities/skills/adk-docs/references/doc-standards.md +124 -0
  77. package/dist/agent0/capabilities/skills/adk-evals/SKILL.md +244 -0
  78. package/dist/agent0/capabilities/skills/adk-evals/references/eval-format.md +354 -0
  79. package/dist/agent0/capabilities/skills/adk-evals/references/test-patterns.md +355 -0
  80. package/dist/agent0/capabilities/skills/adk-evals/references/testing-workflow.md +225 -0
  81. package/dist/agent0/config/index.d.ts +5 -0
  82. package/dist/agent0/config/index.d.ts.map +1 -0
  83. package/dist/agent0/config/paths.d.ts +12 -0
  84. package/dist/agent0/config/paths.d.ts.map +1 -0
  85. package/dist/agent0/config/schema.d.ts +171 -0
  86. package/dist/agent0/config/schema.d.ts.map +1 -0
  87. package/dist/agent0/config/secrets.d.ts +4 -0
  88. package/dist/agent0/config/secrets.d.ts.map +1 -0
  89. package/dist/agent0/config/store.d.ts +26 -0
  90. package/dist/agent0/config/store.d.ts.map +1 -0
  91. package/dist/agent0/index.d.ts +6 -0
  92. package/dist/agent0/index.d.ts.map +1 -0
  93. package/dist/agent0/index.js +3381 -0
  94. package/dist/agent0/index.js.map +29 -0
  95. package/dist/agent0/providers/catalog.d.ts +189 -0
  96. package/dist/agent0/providers/catalog.d.ts.map +1 -0
  97. package/dist/agent0/providers/index.d.ts +4 -0
  98. package/dist/agent0/providers/index.d.ts.map +1 -0
  99. package/dist/agent0/providers/registry.d.ts +32 -0
  100. package/dist/agent0/providers/registry.d.ts.map +1 -0
  101. package/dist/agent0/providers/source.d.ts +105 -0
  102. package/dist/agent0/providers/source.d.ts.map +1 -0
  103. package/dist/agent0/runtime/client.d.ts +49 -0
  104. package/dist/agent0/runtime/client.d.ts.map +1 -0
  105. package/dist/agent0/runtime/engine.d.ts +79 -0
  106. package/dist/agent0/runtime/engine.d.ts.map +1 -0
  107. package/dist/agent0/runtime/index.d.ts +7 -0
  108. package/dist/agent0/runtime/index.d.ts.map +1 -0
  109. package/dist/agent0/runtime/manager.d.ts +81 -0
  110. package/dist/agent0/runtime/manager.d.ts.map +1 -0
  111. package/dist/agent0/runtime/permissions.d.ts +6 -0
  112. package/dist/agent0/runtime/permissions.d.ts.map +1 -0
  113. package/dist/agent0/runtime/process.d.ts +52 -0
  114. package/dist/agent0/runtime/process.d.ts.map +1 -0
  115. package/dist/agent0/runtime/project-discovery.d.ts +5 -0
  116. package/dist/agent0/runtime/project-discovery.d.ts.map +1 -0
  117. package/dist/agent0/types.d.ts +447 -0
  118. package/dist/agent0/types.d.ts.map +1 -0
  119. package/dist/assets/manager.d.ts +0 -2
  120. package/dist/assets/manager.d.ts.map +1 -1
  121. package/dist/assets/types.d.ts +3 -1
  122. package/dist/assets/types.d.ts.map +1 -1
  123. package/dist/auth/credentials.d.ts.map +1 -1
  124. package/dist/auth/index.d.ts +30 -0
  125. package/dist/auth/index.d.ts.map +1 -1
  126. package/dist/auth/service.d.ts.map +1 -1
  127. package/dist/bot-generator/dev-id-manager.d.ts.map +1 -1
  128. package/dist/bot-generator/generator.d.ts +5 -1
  129. package/dist/bot-generator/generator.d.ts.map +1 -1
  130. package/dist/bot-generator/integration-sync.d.ts +2 -0
  131. package/dist/bot-generator/integration-sync.d.ts.map +1 -1
  132. package/dist/bot-generator/interface-sync.d.ts +2 -0
  133. package/dist/bot-generator/interface-sync.d.ts.map +1 -1
  134. package/dist/bot-generator/plugin-sync.d.ts +2 -0
  135. package/dist/bot-generator/plugin-sync.d.ts.map +1 -1
  136. package/dist/bot-generator/table-validation.d.ts +17 -0
  137. package/dist/bot-generator/table-validation.d.ts.map +1 -0
  138. package/dist/chat-bundle.cjs +31 -0
  139. package/dist/cognitive/models.d.ts +32 -0
  140. package/dist/cognitive/models.d.ts.map +1 -0
  141. package/dist/commands/base-command.d.ts +1 -0
  142. package/dist/commands/base-command.d.ts.map +1 -1
  143. package/dist/commands/bp-add-command.d.ts.map +1 -1
  144. package/dist/commands/bp-build-command.d.ts.map +1 -1
  145. package/dist/commands/bp-chat-command.d.ts.map +1 -1
  146. package/dist/commands/bp-cli.d.ts +1 -0
  147. package/dist/commands/bp-cli.d.ts.map +1 -1
  148. package/dist/commands/bp-cli.js +147 -0
  149. package/dist/commands/bp-cli.js.map +12 -0
  150. package/dist/commands/bp-deploy-command.d.ts.map +1 -1
  151. package/dist/commands/bp-dev-command.d.ts +7 -0
  152. package/dist/commands/bp-dev-command.d.ts.map +1 -1
  153. package/dist/commands/bp-dev-stderr.d.ts +21 -0
  154. package/dist/commands/bp-dev-stderr.d.ts.map +1 -0
  155. package/dist/commands/bp-dev-worker-env.d.ts +7 -0
  156. package/dist/commands/bp-dev-worker-env.d.ts.map +1 -0
  157. package/dist/commands/index.d.ts +0 -5
  158. package/dist/commands/index.d.ts.map +1 -1
  159. package/dist/config/manager.d.ts +9 -1
  160. package/dist/config/manager.d.ts.map +1 -1
  161. package/dist/constants.d.ts +1 -0
  162. package/dist/constants.d.ts.map +1 -1
  163. package/dist/dependencies/alias-utils.d.ts +13 -0
  164. package/dist/dependencies/alias-utils.d.ts.map +1 -0
  165. package/dist/dependencies/dependency-manager.d.ts +89 -0
  166. package/dist/dependencies/dependency-manager.d.ts.map +1 -0
  167. package/dist/dependencies/errors.d.ts +19 -0
  168. package/dist/dependencies/errors.d.ts.map +1 -0
  169. package/dist/dependencies/index.d.ts +17 -0
  170. package/dist/dependencies/index.d.ts.map +1 -0
  171. package/dist/dependencies/index.js +6233 -0
  172. package/dist/dependencies/index.js.map +61 -0
  173. package/dist/dependencies/json-utils.d.ts +3 -0
  174. package/dist/dependencies/json-utils.d.ts.map +1 -0
  175. package/dist/dependencies/lock-file.d.ts +15 -0
  176. package/dist/dependencies/lock-file.d.ts.map +1 -0
  177. package/dist/dependencies/migration.d.ts +8 -0
  178. package/dist/dependencies/migration.d.ts.map +1 -0
  179. package/dist/dependencies/registry/integration-registry.d.ts +17 -0
  180. package/dist/dependencies/registry/integration-registry.d.ts.map +1 -0
  181. package/dist/dependencies/registry/interface-registry.d.ts +11 -0
  182. package/dist/dependencies/registry/interface-registry.d.ts.map +1 -0
  183. package/dist/dependencies/registry/plugin-registry.d.ts +16 -0
  184. package/dist/dependencies/registry/plugin-registry.d.ts.map +1 -0
  185. package/dist/dependencies/resolvers/integration-resolver.d.ts +30 -0
  186. package/dist/dependencies/resolvers/integration-resolver.d.ts.map +1 -0
  187. package/dist/dependencies/resolvers/plugin-resolver.d.ts +38 -0
  188. package/dist/dependencies/resolvers/plugin-resolver.d.ts.map +1 -0
  189. package/dist/dependencies/types.d.ts +254 -0
  190. package/dist/dependencies/types.d.ts.map +1 -0
  191. package/dist/deploy-manifest/index.d.ts +608 -0
  192. package/dist/deploy-manifest/index.d.ts.map +1 -0
  193. package/dist/file-watcher/watcher.d.ts +21 -5
  194. package/dist/file-watcher/watcher.d.ts.map +1 -1
  195. package/dist/generators/action-types.d.ts.map +1 -1
  196. package/dist/generators/assets.d.ts +2 -2
  197. package/dist/generators/assets.d.ts.map +1 -1
  198. package/dist/generators/client-wrapper.d.ts.map +1 -1
  199. package/dist/generators/tests.d.ts +6 -6
  200. package/dist/generators/tests.d.ts.map +1 -1
  201. package/dist/generators/utils.d.ts.map +1 -1
  202. package/dist/index.d.ts +15 -12
  203. package/dist/index.d.ts.map +1 -1
  204. package/dist/index.js +17612 -5520
  205. package/dist/index.js.map +83 -66
  206. package/dist/integrations/config-utils.d.ts.map +1 -1
  207. package/dist/integrations/hub-cache.d.ts.map +1 -1
  208. package/dist/integrations/index.d.ts +0 -6
  209. package/dist/integrations/index.d.ts.map +1 -1
  210. package/dist/integrations/manager.d.ts +17 -1
  211. package/dist/integrations/manager.d.ts.map +1 -1
  212. package/dist/interfaces/index.d.ts +0 -2
  213. package/dist/interfaces/index.d.ts.map +1 -1
  214. package/dist/interfaces/manager.d.ts +3 -1
  215. package/dist/interfaces/manager.d.ts.map +1 -1
  216. package/dist/interfaces/parser.d.ts.map +1 -1
  217. package/dist/knowledge/manager.d.ts +3 -1
  218. package/dist/knowledge/manager.d.ts.map +1 -1
  219. package/dist/knowledge/types.d.ts +2 -2
  220. package/dist/knowledge/types.d.ts.map +1 -1
  221. package/dist/plugins/manager.d.ts +34 -1
  222. package/dist/plugins/manager.d.ts.map +1 -1
  223. package/dist/preflight/checker.d.ts +5 -6
  224. package/dist/preflight/checker.d.ts.map +1 -1
  225. package/dist/preflight/index.d.ts +2 -2
  226. package/dist/preflight/index.d.ts.map +1 -1
  227. package/dist/preflight/types.d.ts +30 -32
  228. package/dist/preflight/types.d.ts.map +1 -1
  229. package/dist/runner/script-runner.d.ts +2 -0
  230. package/dist/runner/script-runner.d.ts.map +1 -1
  231. package/dist/runner/supervise-child.d.ts +24 -0
  232. package/dist/runner/supervise-child.d.ts.map +1 -0
  233. package/dist/secrets/manager.d.ts.map +1 -1
  234. package/dist/tables/table-manager.d.ts.map +1 -1
  235. package/dist/tables/types.d.ts +3 -2
  236. package/dist/tables/types.d.ts.map +1 -1
  237. package/dist/templates/README.md +14 -13
  238. package/dist/templates/blank/agent.config.ts +0 -3
  239. package/dist/templates/blank/evals/index.eval.ts +30 -0
  240. package/dist/templates/blank/src/conversations/index.ts +16 -16
  241. package/dist/templates/blank/tsconfig.json +1 -1
  242. package/dist/templates/botpress-desk/README.md +87 -0
  243. package/dist/templates/botpress-desk/agent.config.ts +19 -0
  244. package/dist/templates/botpress-desk/evals/index.eval.ts +30 -0
  245. package/dist/templates/botpress-desk/package.json +17 -0
  246. package/dist/templates/botpress-desk/src/actions/index.ts +19 -0
  247. package/dist/templates/botpress-desk/src/conversations/index.ts +16 -0
  248. package/dist/templates/botpress-desk/src/knowledge/index.ts +20 -0
  249. package/dist/templates/botpress-desk/src/tables/index.ts +16 -0
  250. package/dist/templates/botpress-desk/src/tools/handToSupport.ts +23 -0
  251. package/dist/templates/botpress-desk/src/triggers/index.ts +17 -0
  252. package/dist/templates/botpress-desk/src/workflows/index.ts +21 -0
  253. package/dist/templates/crm-enrichment/agent.config.ts +0 -3
  254. package/dist/templates/crm-enrichment/evals/example.eval.ts +29 -0
  255. package/dist/templates/crm-enrichment/package.json +1 -0
  256. package/dist/templates/crm-enrichment/tsconfig.json +1 -1
  257. package/dist/templates/hello-world/agent.config.ts +0 -3
  258. package/dist/templates/hello-world/evals/context-retention.eval.ts +37 -0
  259. package/dist/templates/hello-world/evals/greeting.eval.ts +43 -0
  260. package/dist/templates/hello-world/package.json +1 -0
  261. package/dist/templates/hello-world/tsconfig.json +1 -1
  262. package/dist/templates/knowledge-assistant/agent.config.ts +0 -3
  263. package/dist/templates/knowledge-assistant/evals/engineering-practices.eval.ts +45 -0
  264. package/dist/templates/knowledge-assistant/evals/out-of-scope.eval.ts +33 -0
  265. package/dist/templates/knowledge-assistant/evals/pto-policy.eval.ts +44 -0
  266. package/dist/templates/knowledge-assistant/package.json +1 -0
  267. package/dist/templates/knowledge-assistant/tsconfig.json +1 -1
  268. package/dist/templates/slack-triage/agent.config.ts +0 -8
  269. package/dist/templates/slack-triage/evals/triage-basic.eval.ts +9 -39
  270. package/dist/templates/slack-triage/package.json +1 -0
  271. package/dist/templates/slack-triage/src/conversations/slack-dm.ts +4 -1
  272. package/dist/templates/slack-triage/tsconfig.json +1 -1
  273. package/dist/templates/template.config.json +16 -16
  274. package/dist/test-utils/mock-module.d.ts +29 -0
  275. package/dist/test-utils/mock-module.d.ts.map +1 -0
  276. package/dist/utils/require-chat.d.ts +3 -24
  277. package/dist/utils/require-chat.d.ts.map +1 -1
  278. package/dist/utils/search-ranking.d.ts +15 -0
  279. package/dist/utils/search-ranking.d.ts.map +1 -0
  280. package/dist/utils/source-map-optimizer.d.ts +10 -11
  281. package/dist/utils/source-map-optimizer.d.ts.map +1 -1
  282. package/dist/workspace/workspace-cache.d.ts.map +1 -1
  283. package/package.json +23 -11
  284. package/dist/commands/copilot-config-reader.d.ts +0 -12
  285. package/dist/commands/copilot-config-reader.d.ts.map +0 -1
  286. package/dist/commands/copilot-server.d.ts +0 -26
  287. package/dist/commands/copilot-server.d.ts.map +0 -1
  288. package/dist/commands/opencode-config.d.ts +0 -29
  289. package/dist/commands/opencode-config.d.ts.map +0 -1
  290. package/dist/integrations/checker.d.ts +0 -41
  291. package/dist/integrations/checker.d.ts.map +0 -1
  292. package/dist/integrations/operations.d.ts +0 -140
  293. package/dist/integrations/operations.d.ts.map +0 -1
  294. package/dist/integrations/sync-manager.d.ts +0 -19
  295. package/dist/integrations/sync-manager.d.ts.map +0 -1
  296. package/dist/interfaces/operations.d.ts +0 -48
  297. package/dist/interfaces/operations.d.ts.map +0 -1
  298. package/dist/preflight/formatter.d.ts +0 -12
  299. package/dist/preflight/formatter.d.ts.map +0 -1
@@ -0,0 +1,203 @@
1
+ # Traces & Logs
2
+
3
+ Traces and logs are the primary debugging interface for ADK agents. Every conversation turn, tool call, LLM reasoning step, and error is recorded as a trace with spans. The CLI provides structured access to all of it.
4
+
5
+ ## CLI Debugging Tools
6
+
7
+ Most commands support `--format json` for structured output — **always use it** when consuming output programmatically. The exception is `adk dev`, which has no `--format` flag: use `adk dev --non-interactive` to get a structured NDJSON event stream instead.
8
+
9
+ | Command | Purpose | Options / tokens |
10
+ |---------|---------|-----------------|
11
+ | `adk check --format json` | Offline project validation — catches config/schema issues before runtime | — |
12
+ | `adk logs --format json` | Browse or stream log entries | `--follow`, `--summary`, level filters (`error`, `warning`) |
13
+ | `adk traces --format json` | Query traces with span details — filter by workflow, action, trigger, conversation, error, time | `workflow=`, `action=`, `trigger=`, `conversation=`, `trace=`, `error`, `since=`, `until=`, `limit=`, `--follow`, `--include-llm` |
14
+ | `adk workflows runs --format json` | List or inspect durable workflow runs by id, name, or status | `name=`, `status=`, `limit=`, `nextToken=`, `<wrkflow_id>` |
15
+ | `adk chat --single "msg" --format json` | Send a test message and get structured response | `--conversation-id` |
16
+ | `adk dev --non-interactive` | Start dev server with structured NDJSON event stream (no TUI) | — |
17
+
18
+ ## Querying Logs
19
+
20
+ Logs give a high-level view of what happened. Start here before diving into traces.
21
+
22
+ ```bash
23
+ adk logs --format json # last 50 entries
24
+ adk logs error --format json # errors only
25
+ adk logs warning --format json # warnings and above
26
+ adk logs warning since=1h --format json # warnings from the last hour
27
+ adk logs error limit=10 --format json # last 10 errors
28
+ adk logs --follow --format json # stream live as NDJSON
29
+ adk logs --summary --format json # single snapshot summary
30
+ ```
31
+
32
+ ### When to use logs vs traces
33
+
34
+ - **Logs** — quick error scanning, startup issues, integration failures, deployment problems
35
+ - **Traces** — detailed per-conversation analysis, tool call inspection, LLM reasoning review
36
+
37
+ ## Querying Traces
38
+
39
+ Traces provide the full picture of a conversation turn: every span in order. The command takes positional filter tokens (not flags) for slicing the trace store.
40
+
41
+ ```bash
42
+ adk traces --format json # recent traces (default limit 20)
43
+ adk traces error --format json # error traces only
44
+ adk traces workflow=<name> --format json # traces for a workflow
45
+ adk traces conversation=<id> --format json # traces for a conversation
46
+ adk traces trace=<id> --include-llm --format json # drill into one trace with LLM content
47
+ adk traces since=1h limit=50 --format json # last hour, up to 50
48
+ adk traces error --follow --format json # stream errors live (NDJSON)
49
+ ```
50
+
51
+ Combine tokens freely (`adk traces error workflow=onboarding since=1h`). `--format` only accepts `json`; omit it for the default text output.
52
+
53
+ ### Trace Structure
54
+
55
+ A trace represents one unit of agent activity. Each trace contains:
56
+
57
+ - **Trace ID** — unique identifier
58
+ - **Timestamp** — when the trace was recorded
59
+ - **Conversation ID** — which conversation it belongs to
60
+ - **Type** — the kind of activity
61
+ - **Spans** — ordered list of sub-events within the trace
62
+
63
+ ### Span Types
64
+
65
+ Spans are the atomic units inside a trace. Each span has a `type` field:
66
+
67
+ | Span Type | Key Fields | What It Means |
68
+ |-----------|-----------|---------------|
69
+ | `tool_call` | `tool_name`, `input`, `output`, `success`, `error` | A tool was invoked. Check `success` to see if it worked. |
70
+ | `code_execution_exception` | `message`, `stackTrace` | Code error in the LLMz sandbox. Read `stackTrace` to find the source. |
71
+ | `think` | `content` | LLM reasoning step — shows why the model made a decision. |
72
+ | `end` | — | Conversation turn completed. |
73
+
74
+ ### Reading a Trace
75
+
76
+ When analyzing a trace:
77
+
78
+ 1. Look at spans in chronological order
79
+ 2. Find where behavior diverges from expected
80
+ 3. For `tool_call` spans: check `success`, read `error` if false, verify `input` matches expectations
81
+ 4. For `think` spans: understand model reasoning before a tool call
82
+ 5. For `code_execution_exception`: read the stack trace, correlate with source code
83
+
84
+ ## Reproducing Issues with `adk chat`
85
+
86
+ Use `adk chat` to send test messages and generate fresh traces:
87
+
88
+ ```bash
89
+ # Single message with structured output
90
+ adk chat --single "Hello" --format json
91
+
92
+ # Continue an existing conversation
93
+ adk chat --single "Follow-up message" --conversation-id <id> --format json
94
+ ```
95
+
96
+ The JSON output includes the bot's response and conversation ID, which you can use to query traces for that specific conversation and send subsequent messages.
97
+
98
+ ## Programmatic Trace Access: `onTrace` Hook
99
+
100
+ For monitoring traces in code, use the `onTrace` hook in conversation handlers. This is useful for custom logging, performance monitoring, and automated error detection. The Botpress ADK also has an OTLP endpoint that can be enabled with the `--otlp` flag on `adk dev`, if the current environment is setup for OTLP traces.
101
+
102
+ ### Basic Trace Logging
103
+
104
+ ```typescript
105
+ // src/conversations/extensions/logging.ts
106
+ import { Autonomous } from "@botpress/runtime";
107
+
108
+ export const onTraceLogging: Autonomous.Hooks["onTrace"] = ({ trace, iteration }) => {
109
+ if (trace.type === "code_execution_exception") {
110
+ console.error(`Code Execution Error: ${trace.message}`, trace.stackTrace);
111
+ }
112
+
113
+ if (trace.type === "tool_call" && !trace.success) {
114
+ console.error(
115
+ `Error during tool call to "${trace.tool_name}" with input "${JSON.stringify(trace.input)}":`,
116
+ trace.error
117
+ );
118
+ }
119
+ };
120
+ ```
121
+
122
+ ### Comprehensive Trace Logging
123
+
124
+ ```typescript
125
+ export const onTraceLogging: Autonomous.Hooks["onTrace"] = ({ trace, iteration }) => {
126
+ switch (trace.type) {
127
+ case "code_execution_exception":
128
+ console.error(`[CODE ERROR] ${trace.message}`, trace.stackTrace);
129
+ break;
130
+ case "tool_call":
131
+ if (trace.success) {
132
+ console.log(`[TOOL SUCCESS] ${trace.tool_name}`, trace.output);
133
+ } else {
134
+ console.error(`[TOOL ERROR] ${trace.tool_name}`, trace.error);
135
+ }
136
+ break;
137
+ case "think":
138
+ console.debug(`[THINK] ${trace.content}`);
139
+ break;
140
+ default:
141
+ console.log(`[TRACE] ${trace.type}`, trace);
142
+ }
143
+ };
144
+ ```
145
+
146
+ ### Using in a Conversation
147
+
148
+ ```typescript
149
+ import { Conversation } from "@botpress/runtime";
150
+ import { onTraceLogging } from "./extensions/logging";
151
+
152
+ export default new Conversation({
153
+ channel: "*",
154
+ handler: async ({ execute }) => {
155
+ await execute({
156
+ instructions: `You are a helpful assistant...`,
157
+ hooks: {
158
+ onTrace: (props) => onTraceLogging!(props),
159
+ },
160
+ });
161
+ },
162
+ });
163
+ ```
164
+
165
+ ### Performance Monitoring
166
+
167
+ ```typescript
168
+ export const makePerformanceMonitor = () => {
169
+ const startTime = Date.now();
170
+ const toolStartTimes = new Map<string, number>();
171
+ const toolMetrics = new Map<string, number[]>();
172
+
173
+ const onBeforeTool: Autonomous.Hooks["onBeforeTool"] = async ({ tool }) => {
174
+ toolStartTimes.set(tool.name, Date.now());
175
+ };
176
+
177
+ const onAfterTool: Autonomous.Hooks["onAfterTool"] = async ({ tool }) => {
178
+ const start = toolStartTimes.get(tool.name);
179
+ const duration = start ? Date.now() - start : 0;
180
+ const metrics = toolMetrics.get(tool.name) || [];
181
+ metrics.push(duration);
182
+ toolMetrics.set(tool.name, metrics);
183
+ console.log(`[PERF] ${tool.name}: ${duration}ms`);
184
+ };
185
+
186
+ const onTrace: Autonomous.Hooks["onTrace"] = ({ trace }) => {
187
+ if (trace.type === "end") {
188
+ console.log(`[PERF] Total conversation: ${Date.now() - startTime}ms`);
189
+ console.log(`[PERF] Tool metrics:`, Object.fromEntries(toolMetrics));
190
+ }
191
+ };
192
+
193
+ return { onBeforeTool, onAfterTool, onTrace };
194
+ };
195
+ ```
196
+
197
+ ### Hook Reference
198
+
199
+ | Hook | Parameters | When It Fires |
200
+ |------|-----------|--------------|
201
+ | `onBeforeTool` | `{ iteration, tool, input, controller }` | Before each tool call |
202
+ | `onAfterTool` | `{ tool, output }` | After each tool call |
203
+ | `onTrace` | `{ trace, iteration }` | On every trace event |
@@ -0,0 +1,111 @@
1
+ ---
2
+ name: adk-dev-console
3
+ description: Explains the ADK Dev Console — what each tab shows, how to read Agent Steps, traces, multi-agent dashboard, agent switching, console modes, and other UI features visible at localhost:3001 during adk dev
4
+ license: MIT
5
+ ---
6
+
7
+ # ADK Dev Console
8
+
9
+ The Dev Console is a local app served at port `3001` (by default, but can be customized) during `adk dev`. It gives developers real-time visibility into their agent's behavior — conversations, execution traces, data, integrations, and configuration.
10
+
11
+ The Dev Console is a **singleton shared dashboard**: one UI server per user, with multiple `adk dev` agents registering and deregistering dynamically. Developers can switch between running agents in the sidebar, toggle between dev and prod targets, and connect to deployed Cloud bots — all from the same browser tab.
12
+
13
+ ## When to Use This Skill
14
+
15
+ Activate when users ask about:
16
+
17
+ - **UI concepts** — "What are Agent Steps?", "What does the Observe tab show?", "What is a turn?", "What is the component registry?", "What is the Agent Map?"
18
+ - **Dev Console navigation** — "What tabs are available?", "Where do I find traces?", "How do I test RAG?"
19
+ - **Reading execution data** — "What do the steps mean?", "Why is my step red?", "What's the cost shown?"
20
+ - **Component registry** — "Where do I find custom components?", "How do I install a component?", "What components are available?"
21
+ - **Multi-agent dashboard** — "How do I switch between agents?", "How do I run multiple agents?", "What does the agent selector show?", "How do I see which agents are running?"
22
+ - **Console modes and targets** — "What's the difference between dev and prod?", "How do I connect to a Cloud bot?", "What is Cloud Dev Console?"
23
+ - **Agent management CLI** — "How do I list running agents?", "How do I stop an agent?", "What does `adk ps` show?", "How do I open the dashboard?"
24
+ - **Specific pages** — "How do I use the evals page?", "Where do I configure integrations?", "How do I search knowledge?"
25
+ - **Comparing UI vs CLI** — "Should I use the Dev Console or CLI for debugging?"
26
+ - Mentions of `localhost:3001`, "dev console", "Dev Console", "component registry", "agent selector", "agent picker", "agent map", "Cloud Dev Console", or specific tab names (Chat, Build, Components, Data, Test, Observe, Config)
27
+
28
+ ## Available Documentation
29
+
30
+ | File | Contents |
31
+ |------|----------|
32
+ | `references/agent-steps.md` | Agent Steps visualization — turns, iterations, tools, messages, state mutations, cost tracking, status indicators |
33
+ | `references/pages.md` | Every page/tab in the Dev Console — what it shows, key features, layout |
34
+ | `references/component-registry.md` | Component Registry — installed vs registry tabs, component lifecycle, runtime registry internals, UI features |
35
+ | `references/multi-agent-dashboard.md` | Multi-agent architecture, agent selector, console modes (local/cloud), dev/prod targets, CLI commands (`adk ps`, `adk kill`, `adk dashboard`, `adk status`) |
36
+
37
+ ## How to Answer
38
+
39
+ Match depth to the question:
40
+
41
+ - **"What is X?"** (e.g., "What are Agent Steps?") → One sentence definition + what the user sees. Don't dump the full data model.
42
+ - **"Where do I find X?"** → Name the tab group and page, give the URL path.
43
+ - **"How do I read X?"** → Explain the visual hierarchy and what each element means.
44
+ - **"What does this mean?"** (pointing at something in the UI) → Identify the component, explain its meaning.
45
+
46
+ ## Quick Reference
47
+
48
+ ### Tab Groups
49
+
50
+ | Group | Pages | Purpose |
51
+ |-------|-------|---------|
52
+ | **Chat** | Chat | Test the agent via webchat + see Agent Steps |
53
+ | **Build** | Agent Map | Interactive agent architecture graph (experimental, feature-flagged behind `enable_agent_forge`) |
54
+ | **Components** | Webchat Components, Actions, Workflows, Triggers | Browse component registry, test bot primitives |
55
+ | **Test** | RAG Search, Evals | Test knowledge search and run automated evals |
56
+ | **Data** | Knowledge, Tables, Files | Manage knowledge bases, tables, and files |
57
+ | **Observe** | Conversations, Traces, Logs | View conversation history, execution traces, runtime logs |
58
+ | **Config** | Settings, Integrations | Agent config, secrets, LLM settings, integration management |
59
+
60
+ ### Multi-Agent Sidebar
61
+
62
+ The sidebar header shows the currently selected agent with a status indicator and mode pill (dev/prod/cloud). Clicking it opens the **Agent Selector** dropdown:
63
+
64
+ - **Active agents** — all running local agents with status dot, name, project path, and a close button
65
+ - **Cloud Dev Console** — switch to a deployed Botpress Cloud bot (workspace + bot picker)
66
+ - **Recent projects** — previously opened projects not currently running
67
+ - **Footer actions** — Create new project, Open existing, Switch environment (dev↔prod), About
68
+
69
+ ### Agent Steps (Chat Page)
70
+
71
+ The right panel of the Chat page shows **Agent Steps** — a real-time visualization of what the agent did to process each message.
72
+
73
+ **Hierarchy:** Turn → Iterations → Tools / Messages / State Mutations
74
+
75
+ - **Turn** = one conversation exchange (user message → agent processing → response)
76
+ - **Iteration** = one loop of the autonomous agent (think → decide → act)
77
+ - **Tool** = a tool call within an iteration (violet card)
78
+ - **Message** = a bot message sent (blue card)
79
+ - **State Mutation** = a state change (teal card, shows before/after)
80
+
81
+ **Status indicators:** ✓ green = ok, ✗ red = error, ⟳ blue spinning = running
82
+
83
+ **AI metrics per iteration:** model name, input/output tokens, cost (USD)
84
+
85
+ ### Key URLs
86
+
87
+ | Path | Page |
88
+ |------|------|
89
+ | `/chat` | Chat + Agent Steps |
90
+ | `/agent-map` | Agent Map — interactive architecture graph (experimental) |
91
+ | `/components` | Component registry + installed components |
92
+ | `/actions` | Actions browser |
93
+ | `/workflows` | Workflows + run history |
94
+ | `/search` | RAG search testing |
95
+ | `/evals` | Eval definitions + runs |
96
+ | `/knowledge` | Knowledge base management |
97
+ | `/tables` | Table data management |
98
+ | `/traces` | Full trace viewer |
99
+ | `/conversations` | Conversation history |
100
+ | `/logs` | Runtime logs |
101
+ | `/settings` | Agent configuration |
102
+ | `/integrations` | Integration management |
103
+
104
+ ### Multi-Agent CLI Commands
105
+
106
+ | Command | Purpose |
107
+ |---------|---------|
108
+ | `adk ps` | List running agents and processes with PIDs, ports, uptime (supports `--watch`) |
109
+ | `adk dashboard` | Open the DevConsole in standalone mode (no agent required) |
110
+ | `adk kill` | Stop agents or the entire DevConsole (`--all`, `--current`, `--pid`, or by name) |
111
+ | `adk status` | Show project health and status info |
@@ -0,0 +1,115 @@
1
+ # Agent Steps
2
+
3
+ Agent Steps is the execution visualizer on the right side of the **Chat** page. It shows exactly what the agent did to process each conversation message — in real time.
4
+
5
+ ## What Users See
6
+
7
+ When a user sends a message in the webchat (left panel), the Agent Steps panel (right panel) shows the execution flow as a sequence of collapsible cards:
8
+
9
+ ```
10
+ ┌─ User Message: "Help me with order #123"
11
+ │
12
+ ├─ 🤖 Bot Handler (onWebchatConversation)
13
+ │ ├─ Iteration 1
14
+ │ │ ├─ 🟣 Tool: lookupOrder (input: {orderId: "123"})
15
+ │ │ └─ → continued
16
+ │ ├─ Iteration 2
17
+ │ │ ├─ 🔵 Message: "I found order #123. It was shipped yesterday..."
18
+ │ │ └─ → message_sent
19
+ │ └─ 🟢 State: conversation.lastOrderId = "123"
20
+ │
21
+ └─ Total: 2 iterations, $0.0034, 1.2s
22
+ ```
23
+
24
+ ## Data Model
25
+
26
+ ### Turns
27
+
28
+ A **Turn** is one conversation exchange — from the user's input through the agent's complete response. Each turn contains:
29
+
30
+ - **User message** or **event** that triggered processing
31
+ - **Handler span** — the conversation/event/trigger handler that processed it
32
+ - **Steps** — autonomous iterations (the agent's think-decide-act loops)
33
+ - **Direct messages** — messages sent outside iterations
34
+ - **State mutations** — state changes made during the turn
35
+ - **Total cost** — aggregated AI cost across all iterations
36
+
37
+ ### Steps (Autonomous Iterations)
38
+
39
+ Each **Step** is one iteration of the autonomous agent loop. The agent:
40
+ 1. Receives context (conversation history, available tools)
41
+ 2. Makes an LLM call (the **cognitive request**)
42
+ 3. Decides what to do: call a tool, send a message, or stop
43
+
44
+ Each step shows:
45
+ - **Iteration number** (1, 2, 3...)
46
+ - **Exit reason**: "continued" (more work to do), "tool_called", "message_sent", "errored"
47
+ - **Cognitive request** metadata: model, input/output tokens, cost, duration
48
+ - **Tools called** in this iteration
49
+ - **Messages sent** in this iteration
50
+
51
+ ### Tool Calls
52
+
53
+ Displayed as **violet cards** (or green for `search_knowledge`). Each shows:
54
+ - Tool name
55
+ - Input (JSON)
56
+ - Output (JSON or markdown for knowledge search results)
57
+ - Duration
58
+ - Status (ok / error / running)
59
+
60
+ ### Bot Messages
61
+
62
+ Displayed as **blue cards**. Each shows:
63
+ - Message content (markdown rendered)
64
+ - Duration
65
+ - Long messages are clamped at 300 characters — click to expand
66
+
67
+ ### State Mutations
68
+
69
+ Displayed as **teal cards**. Each shows:
70
+ - State type (bot, user, conversation)
71
+ - Two-column "Before" and "After" view
72
+ - Only changed keys shown by default (toggle for full state)
73
+ - JSON tree view for complex objects
74
+
75
+ ### Trigger Handlers
76
+
77
+ When a trigger fires instead of a conversation message, the turn shows an **amber card** with:
78
+ - Trigger name
79
+ - Event type that fired it
80
+ - Same iteration/tool/message structure inside
81
+
82
+ ## Status Indicators
83
+
84
+ | Visual | Meaning |
85
+ |--------|---------|
86
+ | ✓ Green checkmark | Completed successfully |
87
+ | ✗ Red X | Failed (error message in detail panel) |
88
+ | ⟳ Blue spinner | Currently executing |
89
+ | Shimmer text ("thinking...") | LLM is generating |
90
+
91
+ ## AI Metrics
92
+
93
+ Each iteration's cognitive request shows:
94
+ - **Model**: e.g., "claude-3.5-sonnet"
95
+ - **Input tokens**: count + cost
96
+ - **Output tokens**: count + cost
97
+ - **Total cost**: USD with 4 decimal places
98
+ - **Duration**: milliseconds
99
+
100
+ Turn-level cost is the sum of all iteration costs.
101
+
102
+ ## Interactions
103
+
104
+ - **Collapse/Expand**: Click any card to toggle children. "Collapse All" / "Expand All" buttons in header.
105
+ - **Detail Panel**: Click a step to open a resizable detail panel on the right with full span data.
106
+ - **Copy**: Copy buttons on IDs, tokens, error messages.
107
+ - **Open Traces**: "Open conversation traces" link in the header navigates to the full Traces page filtered to this conversation.
108
+
109
+ ## Real-Time Updates
110
+
111
+ Agent Steps streams data via SSE (Server-Sent Events):
112
+ - Running spans show a live timer
113
+ - New spans animate in from the top
114
+ - Auto-scrolls to bottom when new content arrives
115
+ - Stale detection marks spans as errored if the CLI stops sending updates for 5+ seconds
@@ -0,0 +1,43 @@
1
+ # Component Registry
2
+
3
+ The Components page (`/components`) lets developers browse, inspect, and install custom webchat components — UI elements the LLM can yield during conversations.
4
+
5
+ Accessed from the **Components** tab group. Available in both dev and production modes.
6
+
7
+ ## Two-Tab Interface
8
+
9
+ ### Installed Tab
10
+
11
+ Shows components currently present in the agent's `src/components/` directory.
12
+
13
+ - Masonry card layout with live component preview (rendered in shadow DOM for style isolation)
14
+ - Click a card to expand an overlay with full component details
15
+ - Reflects hot-reload changes — components update as source files are modified
16
+ - Empty state: "No components installed yet" with guidance to add under `src/components` or pull from the registry
17
+
18
+ ### Registry Tab
19
+
20
+ Shows available components from the external component registry.
21
+
22
+ - Same masonry layout as the Installed tab
23
+ - Click a card to expand an overlay with installation instructions and metadata
24
+ - Empty state: "Registry is empty"
25
+
26
+ ## What Drives the UI
27
+
28
+ The dev console reads component metadata to render previews:
29
+
30
+ - **description** — shown alongside the component card
31
+ - **props** (Zod schema) — drives the props playground form
32
+ - **exampleValues** — seed the preview with realistic data
33
+
34
+ Components without metadata still appear in the Installed tab but have no preview or props form.
35
+
36
+ For how to create components, register metadata, and use them in conversations, see the **custom-components** reference in the ADK skill.
37
+
38
+ ## UI Features
39
+
40
+ - **Shadow DOM previews** — component previews render in isolated shadow DOM to prevent style leaking
41
+ - **Loading skeletons** — placeholder cards while fetching components
42
+ - **Error states** — red alerts if components fail to load or registry fetch fails
43
+ - **Live reload** — listens for component change events and refreshes the gallery
@@ -0,0 +1,70 @@
1
+ # Multi-Agent Dashboard
2
+
3
+ The Dev Console is a **singleton shared dashboard** that coordinates multiple running agents. Each `adk dev` process registers its agent with the shared DevConsole, and the UI lets developers switch between them instantly.
4
+
5
+ ## How It Works
6
+
7
+ Running `adk dev` in multiple project directories registers each agent with a single shared DevConsole. The UI automatically updates to show all running agents, and developers can switch between them from the sidebar.
8
+
9
+ Each agent shows a status indicator:
10
+
11
+ | Status | Meaning |
12
+ |--------|---------|
13
+ | `starting` | Agent is initializing (building, syncing) |
14
+ | `ready` | Agent is running and accepting requests |
15
+ | `error` | Agent encountered a fatal error |
16
+
17
+ If all agents are stopped, the DevConsole exits automatically (unless started in standalone mode via `adk dashboard`).
18
+
19
+ ## Console Modes
20
+
21
+ The Dev Console supports two orthogonal concepts:
22
+
23
+ ### Console Mode — where is the console operating?
24
+
25
+ - **Local Dev Console** — selects a local project registered over the socket. This is the default during `adk dev`.
26
+ - **Cloud Dev Console** — selects a deployed Botpress Cloud prod bot from the prod bot picker. No local project backend needed.
27
+
28
+ ### Target — which bot data is used?
29
+
30
+ - **Dev target** — uses the local project's dev bot ID and local backend. All pages available.
31
+ - **Prod target** — uses the deployed prod bot data. Hides dev-only pages (Actions, Workflows, Triggers, Evals, Files, Conversations, Traces, Logs).
32
+
33
+ | Console Mode | Dev Target | Prod Target |
34
+ |-------------|------------|-------------|
35
+ | Local | Local dev bot + all pages | Prod bot data + restricted pages |
36
+ | Cloud | Not available | Prod bot data + restricted pages |
37
+
38
+ Prod views that need ADK source-shaped definitions (actions, workflows, triggers, tables, knowledge) read **deployed metadata** published by `adk deploy`, not local source files. This is true in both local-prod and cloud-prod modes.
39
+
40
+ ## Agent Selector UI
41
+
42
+ ### Sidebar Header
43
+
44
+ Full-width dropdown trigger showing: ADK logo, status ring (color matches agent status), agent name, mode pill (dev/prod/cloud), chevron.
45
+
46
+ ### Dropdown Content
47
+
48
+ - **Active agents section** — lists running local agents with status dot, name, project path (truncated right-to-left), and close button
49
+ - **Cloud Dev Console** — switches to the prod bot picker (workspace dropdown → bot list), shows recent prod bots
50
+ - **Recent projects** — projects previously opened but not currently running
51
+ - **Footer actions** — Create new project, Open existing project, Switch environment (dev↔prod), About
52
+
53
+ ### Topbar Agent Picker
54
+
55
+ Compact pill in the top navigation center: status dot + agent name + mode pill + chevron. Opens the same dropdown content. Falls back to a non-interactive label if no agents are connected.
56
+
57
+ ## CLI Commands
58
+
59
+ See the [CLI Reference](../../adk/references/cli.md) for full options and examples.
60
+
61
+ | Command | What it does |
62
+ |---------|-------------|
63
+ | `adk ps` | List running agents and processes |
64
+ | `adk dashboard` | Open Dev Console without an agent |
65
+ | `adk kill` | Stop agents or the Dev Console |
66
+ | `adk status` | Show project health info |
67
+
68
+ ## Data Isolation
69
+
70
+ Each agent's data is isolated to its own project directory (`.adk/`). Traces, logs, eval results, and dev bot IDs stay per-project — switching agents in the UI switches the data you see.