@botpress/adk 1.19.0-beta.9 → 2.0.0-alpha.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.
Files changed (199) hide show
  1. package/dist/agent-init/agent-project-generator.d.ts +5 -1
  2. package/dist/agent-init/agent-project-generator.d.ts.map +1 -1
  3. package/dist/agent-project/agent-project.d.ts +3 -3
  4. package/dist/agent-project/agent-project.d.ts.map +1 -1
  5. package/dist/agent-project/agent-resolver.d.ts.map +1 -1
  6. package/dist/agent-project/config-writer.d.ts +1 -1
  7. package/dist/agent-project/dependency-state-to-dependencies.d.ts +11 -0
  8. package/dist/agent-project/dependency-state-to-dependencies.d.ts.map +1 -0
  9. package/dist/agent-project/types.d.ts +9 -4
  10. package/dist/agent-project/types.d.ts.map +1 -1
  11. package/dist/agent0/capabilities/commands/adk-build.md +6 -5
  12. package/dist/agent0/capabilities/commands/adk-debug.md +1 -1
  13. package/dist/agent0/capabilities/commands/adk-dev-console.md +1 -1
  14. package/dist/agent0/capabilities/commands/adk-document.md +10 -2
  15. package/dist/agent0/capabilities/commands/adk-eval.md +1 -1
  16. package/dist/agent0/capabilities/commands/adk-explain.md +2 -2
  17. package/dist/agent0/capabilities/commands/adk-init.md +2 -2
  18. package/dist/agent0/capabilities/commands/adk-ship.md +1 -1
  19. package/dist/agent0/capabilities/commands/adk-test.md +3 -3
  20. package/dist/agent0/capabilities/commands/adk-validate.md +3 -3
  21. package/dist/agent0/capabilities/skills/adk/SKILL.md +21 -21
  22. package/dist/agent0/capabilities/skills/adk/references/actions.md +245 -239
  23. package/dist/agent0/capabilities/skills/adk/references/advanced-patterns.md +185 -218
  24. package/dist/agent0/capabilities/skills/adk/references/agent-config.md +74 -71
  25. package/dist/agent0/capabilities/skills/adk/references/assets.md +45 -48
  26. package/dist/agent0/capabilities/skills/adk/references/autonomous-execution.md +40 -46
  27. package/dist/agent0/capabilities/skills/adk/references/cli.md +17 -7
  28. package/dist/agent0/capabilities/skills/adk/references/context-api.md +98 -94
  29. package/dist/agent0/capabilities/skills/adk/references/conversation-lifecycle.md +65 -62
  30. package/dist/agent0/capabilities/skills/adk/references/conversations.md +395 -385
  31. package/dist/agent0/capabilities/skills/adk/references/custom-components.md +1 -1
  32. package/dist/agent0/capabilities/skills/adk/references/desk.md +236 -234
  33. package/dist/agent0/capabilities/skills/adk/references/explain-config.md +54 -37
  34. package/dist/agent0/capabilities/skills/adk/references/files.md +301 -306
  35. package/dist/agent0/capabilities/skills/adk/references/integration-actions.md +211 -214
  36. package/dist/agent0/capabilities/skills/adk/references/integrations.md +33 -31
  37. package/dist/agent0/capabilities/skills/adk/references/interfaces.md +13 -12
  38. package/dist/agent0/capabilities/skills/adk/references/knowledge-bases.md +98 -111
  39. package/dist/agent0/capabilities/skills/adk/references/mcp-server.md +6 -0
  40. package/dist/agent0/capabilities/skills/adk/references/messages.md +280 -256
  41. package/dist/agent0/capabilities/skills/adk/references/model-configuration.md +52 -49
  42. package/dist/agent0/capabilities/skills/adk/references/patterns-mistakes.md +102 -101
  43. package/dist/agent0/capabilities/skills/adk/references/plugins.md +15 -15
  44. package/dist/agent0/capabilities/skills/adk/references/tables.md +204 -210
  45. package/dist/agent0/capabilities/skills/adk/references/tags.md +141 -143
  46. package/dist/agent0/capabilities/skills/adk/references/tools.md +191 -199
  47. package/dist/agent0/capabilities/skills/adk/references/triggers.md +331 -336
  48. package/dist/agent0/capabilities/skills/adk/references/workflow-steps.md +132 -96
  49. package/dist/agent0/capabilities/skills/adk/references/workflows.md +479 -464
  50. package/dist/agent0/capabilities/skills/adk/references/zai-agent-reference.md +127 -129
  51. package/dist/agent0/capabilities/skills/adk/references/zai-complete-guide.md +255 -276
  52. package/dist/agent0/capabilities/skills/adk-debugger/SKILL.md +21 -17
  53. package/dist/agent0/capabilities/skills/adk-debugger/references/common-failures.md +25 -25
  54. package/dist/agent0/capabilities/skills/adk-debugger/references/conversation-analysis.md +49 -41
  55. package/dist/agent0/capabilities/skills/adk-debugger/references/debug-workflow.md +20 -14
  56. package/dist/agent0/capabilities/skills/adk-debugger/references/llm-debugging.md +13 -13
  57. package/dist/agent0/capabilities/skills/adk-debugger/references/trace-summarization.md +18 -18
  58. package/dist/agent0/capabilities/skills/adk-debugger/references/traces-and-logs.md +67 -67
  59. package/dist/agent0/capabilities/skills/adk-dev-console/SKILL.md +36 -36
  60. package/dist/agent0/capabilities/skills/adk-dev-console/references/agent-steps.md +14 -6
  61. package/dist/agent0/capabilities/skills/adk-dev-console/references/multi-agent-dashboard.md +13 -13
  62. package/dist/agent0/capabilities/skills/adk-dev-console/references/pages.md +18 -0
  63. package/dist/agent0/capabilities/skills/adk-docs/SKILL.md +13 -13
  64. package/dist/agent0/capabilities/skills/adk-docs/references/doc-standards.md +15 -0
  65. package/dist/agent0/capabilities/skills/adk-evals/SKILL.md +29 -23
  66. package/dist/agent0/capabilities/skills/adk-evals/references/eval-format.md +31 -23
  67. package/dist/agent0/capabilities/skills/adk-evals/references/test-patterns.md +25 -36
  68. package/dist/agent0/capabilities/skills/adk-evals/references/testing-workflow.md +6 -4
  69. package/dist/agent0/index.js +41 -19
  70. package/dist/agent0/index.js.map +7 -7
  71. package/dist/agent0/runtime/client.d.ts +2 -0
  72. package/dist/agent0/runtime/client.d.ts.map +1 -1
  73. package/dist/agent0/runtime/engine.d.ts +2 -1
  74. package/dist/agent0/runtime/engine.d.ts.map +1 -1
  75. package/dist/agent0/runtime/process.d.ts +1 -0
  76. package/dist/agent0/runtime/process.d.ts.map +1 -1
  77. package/dist/assets/manager.d.ts +3 -0
  78. package/dist/assets/manager.d.ts.map +1 -1
  79. package/dist/auth/credentials.d.ts +1 -1
  80. package/dist/bot-generator/generator.d.ts +22 -0
  81. package/dist/bot-generator/generator.d.ts.map +1 -1
  82. package/dist/bot-generator/plugin-sync.d.ts.map +1 -1
  83. package/dist/commands/base-command.d.ts +1 -0
  84. package/dist/commands/base-command.d.ts.map +1 -1
  85. package/dist/commands/bp-dev-command.d.ts +1 -1
  86. package/dist/commands/bp-dev-command.d.ts.map +1 -1
  87. package/dist/commands/bp-dev-stderr.d.ts +9 -0
  88. package/dist/commands/bp-dev-stderr.d.ts.map +1 -1
  89. package/dist/commands/index.d.ts +1 -0
  90. package/dist/commands/index.d.ts.map +1 -1
  91. package/dist/dependencies/catalog/catalog-service.d.ts +53 -0
  92. package/dist/dependencies/catalog/catalog-service.d.ts.map +1 -0
  93. package/dist/dependencies/catalog/client-factory.d.ts +33 -0
  94. package/dist/dependencies/catalog/client-factory.d.ts.map +1 -0
  95. package/dist/dependencies/catalog/integration-source.d.ts +34 -0
  96. package/dist/dependencies/catalog/integration-source.d.ts.map +1 -0
  97. package/dist/dependencies/catalog/interface-source.d.ts +23 -0
  98. package/dist/dependencies/catalog/interface-source.d.ts.map +1 -0
  99. package/dist/dependencies/catalog/plugin-source.d.ts +49 -0
  100. package/dist/dependencies/catalog/plugin-source.d.ts.map +1 -0
  101. package/dist/dependencies/catalog/resolution-cache.d.ts +76 -0
  102. package/dist/dependencies/catalog/resolution-cache.d.ts.map +1 -0
  103. package/dist/dependencies/dependency-manager.d.ts +31 -16
  104. package/dist/dependencies/dependency-manager.d.ts.map +1 -1
  105. package/dist/dependencies/errors.d.ts +2 -2
  106. package/dist/dependencies/errors.d.ts.map +1 -1
  107. package/dist/dependencies/index.d.ts +5 -4
  108. package/dist/dependencies/index.d.ts.map +1 -1
  109. package/dist/dependencies/index.js +2089 -1670
  110. package/dist/dependencies/index.js.map +37 -30
  111. package/dist/dependencies/legacy-lock-file.d.ts +15 -0
  112. package/dist/dependencies/legacy-lock-file.d.ts.map +1 -0
  113. package/dist/dependencies/migration.d.ts +19 -0
  114. package/dist/dependencies/migration.d.ts.map +1 -1
  115. package/dist/dependencies/resolvers/integration-resolver.d.ts +4 -3
  116. package/dist/dependencies/resolvers/integration-resolver.d.ts.map +1 -1
  117. package/dist/dependencies/resolvers/plugin-resolver.d.ts +4 -4
  118. package/dist/dependencies/resolvers/plugin-resolver.d.ts.map +1 -1
  119. package/dist/dependencies/snapshot-store.d.ts +59 -0
  120. package/dist/dependencies/snapshot-store.d.ts.map +1 -0
  121. package/dist/dependencies/status-resolver.d.ts +36 -0
  122. package/dist/dependencies/status-resolver.d.ts.map +1 -0
  123. package/dist/dependencies/status.d.ts +214 -0
  124. package/dist/dependencies/status.d.ts.map +1 -0
  125. package/dist/dependencies/types.d.ts +380 -29
  126. package/dist/dependencies/types.d.ts.map +1 -1
  127. package/dist/file-watcher/watcher.d.ts +21 -5
  128. package/dist/file-watcher/watcher.d.ts.map +1 -1
  129. package/dist/generators/action-types.d.ts.map +1 -1
  130. package/dist/generators/client-wrapper.d.ts.map +1 -1
  131. package/dist/index.d.ts +4 -5
  132. package/dist/index.d.ts.map +1 -1
  133. package/dist/index.js +3134 -2226
  134. package/dist/index.js.map +55 -48
  135. package/dist/integrations/config-utils.d.ts +11 -7
  136. package/dist/integrations/config-utils.d.ts.map +1 -1
  137. package/dist/integrations/hub-cache.d.ts +0 -58
  138. package/dist/integrations/hub-cache.d.ts.map +1 -1
  139. package/dist/integrations/index.d.ts +1 -3
  140. package/dist/integrations/index.d.ts.map +1 -1
  141. package/dist/integrations/manager.d.ts +19 -53
  142. package/dist/integrations/manager.d.ts.map +1 -1
  143. package/dist/interfaces/enhanced-cache.d.ts +7 -7
  144. package/dist/interfaces/enhanced-cache.d.ts.map +1 -1
  145. package/dist/interfaces/manager.d.ts +11 -17
  146. package/dist/interfaces/manager.d.ts.map +1 -1
  147. package/dist/knowledge/manager.d.ts +3 -0
  148. package/dist/knowledge/manager.d.ts.map +1 -1
  149. package/dist/plugins/index.d.ts +0 -1
  150. package/dist/plugins/index.d.ts.map +1 -1
  151. package/dist/plugins/manager.d.ts +16 -48
  152. package/dist/plugins/manager.d.ts.map +1 -1
  153. package/dist/preflight/checker.d.ts +6 -1
  154. package/dist/preflight/checker.d.ts.map +1 -1
  155. package/dist/preflight/dependency-gate.d.ts +37 -0
  156. package/dist/preflight/dependency-gate.d.ts.map +1 -0
  157. package/dist/preflight/index.d.ts +2 -1
  158. package/dist/preflight/index.d.ts.map +1 -1
  159. package/dist/preflight/types.d.ts +18 -0
  160. package/dist/preflight/types.d.ts.map +1 -1
  161. package/dist/runner/script-runner.d.ts.map +1 -1
  162. package/dist/tables/table-manager.d.ts +3 -0
  163. package/dist/tables/table-manager.d.ts.map +1 -1
  164. package/dist/templates/README.md +23 -13
  165. package/dist/templates/blank/agent.config.ts +3 -3
  166. package/dist/templates/blank/src/triggers/index.ts +1 -1
  167. package/dist/templates/botpress-desk/evals/index.eval.ts +1 -1
  168. package/dist/templates/botpress-desk/src/triggers/index.ts +1 -1
  169. package/dist/templates/crm-enrichment/README.md +3 -3
  170. package/dist/templates/crm-enrichment/agent.config.ts +2 -2
  171. package/dist/templates/crm-enrichment/src/conversations/index.ts +1 -1
  172. package/dist/templates/hello-world/agent.config.ts +3 -3
  173. package/dist/templates/hello-world/src/triggers/index.ts +1 -1
  174. package/dist/templates/knowledge-assistant/src/triggers/index.ts +1 -1
  175. package/dist/templates/template.config.json +3 -3
  176. package/dist/utils/ids.d.ts +10 -0
  177. package/dist/utils/ids.d.ts.map +1 -1
  178. package/dist/workspace/workspace-cache.d.ts +2 -1
  179. package/dist/workspace/workspace-cache.d.ts.map +1 -1
  180. package/package.json +3 -3
  181. package/dist/agent-project/lock-to-dependencies.d.ts +0 -11
  182. package/dist/agent-project/lock-to-dependencies.d.ts.map +0 -1
  183. package/dist/dependencies/lock-file.d.ts +0 -15
  184. package/dist/dependencies/lock-file.d.ts.map +0 -1
  185. package/dist/integrations/enhanced-cache.d.ts +0 -53
  186. package/dist/integrations/enhanced-cache.d.ts.map +0 -1
  187. package/dist/plugins/enhanced-cache.d.ts +0 -53
  188. package/dist/plugins/enhanced-cache.d.ts.map +0 -1
  189. package/dist/templates/blank/package.json +0 -17
  190. package/dist/templates/blank/tsconfig.json +0 -25
  191. package/dist/templates/botpress-desk/package.json +0 -17
  192. package/dist/templates/crm-enrichment/package.json +0 -18
  193. package/dist/templates/crm-enrichment/tsconfig.json +0 -25
  194. package/dist/templates/hello-world/package.json +0 -18
  195. package/dist/templates/hello-world/tsconfig.json +0 -25
  196. package/dist/templates/knowledge-assistant/package.json +0 -18
  197. package/dist/templates/knowledge-assistant/tsconfig.json +0 -25
  198. package/dist/templates/slack-triage/package.json +0 -18
  199. package/dist/templates/slack-triage/tsconfig.json +0 -25
@@ -10,34 +10,34 @@ All integration management uses the `adk integrations` subcommand family. Every
10
10
 
11
11
  ### Discovery
12
12
 
13
- | Command | Description | Key Flags |
14
- |---------|-------------|-----------|
15
- | `adk integrations search <query>` | Search by keyword | `--format json`, `--limit <n>` (default: 20) |
16
- | `adk integrations list --available` | Browse all Hub integrations | `--format json`, `--limit <n>` (default: 50) |
17
- | `adk integrations list` | Show installed dependencies | `--format json`, `--verbose` |
18
- | `adk integrations info <name>` | Full integration details | `--actions`, `--channels`, `--events`, `--full`, `--format json` |
13
+ | Command | Description | Key Flags |
14
+ | ----------------------------------- | --------------------------- | ---------------------------------------------------------------- |
15
+ | `adk integrations search <query>` | Search by keyword | `--format json`, `--limit <n>` (default: 20) |
16
+ | `adk integrations list --available` | Browse all Hub integrations | `--format json`, `--limit <n>` (default: 50) |
17
+ | `adk integrations list` | Show installed dependencies | `--format json`, `--verbose` |
18
+ | `adk integrations info <name>` | Full integration details | `--actions`, `--channels`, `--events`, `--full`, `--format json` |
19
19
 
20
20
  Use `--format json` for programmatic inspection of config schemas, action shapes, and event payloads.
21
21
 
22
22
  ### Mutations
23
23
 
24
- | Command | Description | Key Flags |
25
- |---------|-------------|-----------|
26
- | `adk integrations add <name>@<version>` | Install an integration | `--alias <name>`, `--target <env>`, `--config key=value` |
27
- | `adk integrations remove <alias>` | Uninstall an integration | `--target <env>` |
28
- | `adk integrations upgrade <alias>` | Upgrade to latest (or specific) version | `--to <version>`, `--target <env>` |
29
- | `adk integrations enable <alias>` | Enable a disabled integration | `--target <env>` |
30
- | `adk integrations disable <alias>` | Disable without removing | `--target <env>` |
31
- | `adk integrations configure <alias>` | Set or unset config values | `--set key=value`, `--unset key`, `--target <env>` |
24
+ | Command | Description | Key Flags |
25
+ | --------------------------------------- | --------------------------------------- | -------------------------------------------------------- |
26
+ | `adk integrations add <name>@<version>` | Install an integration | `--alias <name>`, `--target <env>`, `--config key=value` |
27
+ | `adk integrations remove <alias>` | Uninstall an integration | `--target <env>` |
28
+ | `adk integrations upgrade <alias>` | Upgrade to latest (or specific) version | `--to <version>`, `--target <env>` |
29
+ | `adk integrations enable <alias>` | Enable a disabled integration | `--target <env>` |
30
+ | `adk integrations disable <alias>` | Disable without removing | `--target <env>` |
31
+ | `adk integrations configure <alias>` | Set or unset config values | `--set key=value`, `--unset key`, `--target <env>` |
32
32
 
33
33
  ### State Management
34
34
 
35
- | Command | Description | Key Flags |
36
- |---------|-------------|-----------|
37
- | `adk integrations pull-lock` | Pull cloud state into lock file | `--target <env>`, `--dry-run` |
38
- | `adk integrations push-lock` | Push lock file to cloud | `--target <env>`, `--dry-run`, `--yes` |
39
- | `adk integrations copy` | Copy integration state between environments | `--from <env>`, `--to <env>` |
40
- | `adk integrations diff` | Show differences between lock file and cloud | `--target <env>` |
35
+ | Command | Description | Key Flags |
36
+ | ---------------------------- | -------------------------------------------- | -------------------------------------- |
37
+ | `adk integrations pull-lock` | Pull cloud state into lock file | `--target <env>`, `--dry-run` |
38
+ | `adk integrations push-lock` | Push lock file to cloud | `--target <env>`, `--dry-run`, `--yes` |
39
+ | `adk integrations copy` | Copy integration state between environments | `--from <env>`, `--to <env>` |
40
+ | `adk integrations diff` | Show differences between lock file and cloud | `--target <env>` |
41
41
 
42
42
  ## Lock File System
43
43
 
@@ -72,6 +72,7 @@ Integration state lives in per-environment lock files at the project root:
72
72
  ```
73
73
 
74
74
  **Key principles:**
75
+
75
76
  - Cloud is the source of truth. The lock file is a local reflection refreshed after every mutation.
76
77
  - Never edit lock files by hand — use `adk integrations` commands.
77
78
  - The `--target` flag controls which environment (dev/prod) a command operates on.
@@ -161,6 +162,7 @@ Zero configuration properties. Just enable it.
161
162
  Has configuration properties but none are required. Works out of the box.
162
163
 
163
164
  **Examples:**
165
+
164
166
  - `chat` — optional `encryptionKey`, `webhookUrl`, `webhookSecret`
165
167
  - `webchat` — ~38 optional theming/behavior props (`primaryColor`, `fontFamily`, `allowFileUpload`, etc.)
166
168
  - `webhook` — optional `secret` and `allowedOrigins`
@@ -193,11 +195,11 @@ Testing mode using a shared Botpress account. The integration provides a sandbox
193
195
 
194
196
  Inspect `adk integrations info <name> --format json`:
195
197
 
196
- | JSON Key | What It Tells You |
197
- |----------|-------------------|
198
- | `configuration.schema` | Default config schema (properties, required fields) |
199
- | `configuration.identifier` | Whether OAuth/link-based auth is used |
200
- | `configurations` | Alternative configuration types (if any) |
198
+ | JSON Key | What It Tells You |
199
+ | -------------------------- | --------------------------------------------------- |
200
+ | `configuration.schema` | Default config schema (properties, required fields) |
201
+ | `configuration.identifier` | Whether OAuth/link-based auth is used |
202
+ | `configurations` | Alternative configuration types (if any) |
201
203
 
202
204
  If `configuration.schema.properties` is empty or all optional → no manual config needed.
203
205
  If `configuration.identifier.linkTemplateScript` exists → OAuth.
@@ -256,11 +258,11 @@ Receives external HTTP webhooks. Only fires events when a payload arrives.
256
258
 
257
259
  ## Name Resolution
258
260
 
259
- | Format | Example | Meaning |
260
- |--------|---------|---------|
261
- | Plain name | `slack` | Official/public integration, latest version |
262
- | `name@version` | `slack@3.0.0` | Specific version |
263
- | `workspace/name` | `agi/linear` | Private (workspace-scoped) integration |
264
- | `intver_<ULID>` | `intver_01KM6EB027NRCST3M696XT0GTW` | Exact integration version ID |
261
+ | Format | Example | Meaning |
262
+ | ---------------- | ----------------------------------- | ------------------------------------------- |
263
+ | Plain name | `slack` | Official/public integration, latest version |
264
+ | `name@version` | `slack@3.0.0` | Specific version |
265
+ | `workspace/name` | `agi/linear` | Private (workspace-scoped) integration |
266
+ | `intver_<ULID>` | `intver_01KM6EB027NRCST3M696XT0GTW` | Exact integration version ID |
265
267
 
266
268
  Official integrations use just the name. Private integrations are prefixed with the workspace slug and are only visible to workspace members.
@@ -12,11 +12,11 @@ Interfaces are an abstraction layer over integrations. They define a standard co
12
12
 
13
13
  Every ADK project includes these interfaces (defined in `@botpress/adk` constants):
14
14
 
15
- | Interface | Version | Purpose |
16
- |-----------|---------|---------|
15
+ | Interface | Version | Purpose |
16
+ | ------------------ | ------- | ---------------------------------------------------------- |
17
17
  | `typing-indicator` | `0.0.3` | Start/stop typing indicators across messaging integrations |
18
- | `llm` | `9.0.0` | Standard LLM operations |
19
- | `listable` | `0.0.2` | List operations on integration resources |
18
+ | `llm` | `9.0.0` | Standard LLM operations |
19
+ | `listable` | `0.0.2` | List operations on integration resources |
20
20
 
21
21
  These are hard-coded in the ADK and synced automatically during `adk dev` and `adk build`. Users cannot modify this list.
22
22
 
@@ -29,22 +29,22 @@ These are hard-coded in the ADK and synced automatically during `adk dev` and `a
29
29
  The `typing-indicator` interface powers `conversation.startTyping()` and `conversation.stopTyping()`. These work automatically for any integration that implements the interface (webchat, Slack, etc.) with no integration-specific code needed:
30
30
 
31
31
  ```typescript
32
- import { Conversation } from "@botpress/runtime";
32
+ import { Conversation } from '@botpress/runtime'
33
33
 
34
34
  export const Chat = new Conversation({
35
- channel: "webchat.channel",
35
+ channel: 'webchat.channel',
36
36
 
37
37
  async handler({ conversation, execute }) {
38
- await conversation.startTyping();
38
+ await conversation.startTyping()
39
39
 
40
40
  // Do work...
41
41
 
42
42
  await execute({
43
- instructions: "Help the user",
44
- });
43
+ instructions: 'Help the user',
44
+ })
45
45
  // Typing stops automatically when a message is sent
46
- }
47
- });
46
+ },
47
+ })
48
48
  ```
49
49
 
50
50
  If the conversation's integration does not implement `typing-indicator`, the calls silently no-op (errors are caught and swallowed).
@@ -70,6 +70,7 @@ The ADK generates interface types in `.adk/interfaces/`. Each interface gets:
70
70
  - `<interface_name>/actions.ts` - Per-integration action types and mapping constants
71
71
 
72
72
  These are aggregated in:
73
+
73
74
  - `.adk/interfaces.d.ts` - Global `Interfaces` type declaration
74
75
  - `.adk/interfaces.ts` - Runtime `Interfaces` const (the mapping object)
75
76
 
@@ -78,7 +79,7 @@ These are aggregated in:
78
79
  Interfaces and integrations are complementary. See **[integrations.md](./integrations.md)** for integration management.
79
80
 
80
81
  - **Integrations** are concrete connections to external services (Slack, webchat, Linear). You add them with `adk add`.
81
- - **Interfaces** are abstract contracts. An integration *implements* an interface by declaring compatible actions with matching schemas.
82
+ - **Interfaces** are abstract contracts. An integration _implements_ an interface by declaring compatible actions with matching schemas.
82
83
  - When you add an integration that implements an interface, the ADK automatically detects this and generates the mapping. No user action is required.
83
84
 
84
85
  ## Scope and Limitations
@@ -21,20 +21,20 @@ Knowledge Bases enable RAG (Retrieval Augmented Generation) by indexing document
21
21
  ### Basic Structure
22
22
 
23
23
  ```typescript
24
- import { Knowledge, DataSource } from "@botpress/runtime";
24
+ import { Knowledge, DataSource } from '@botpress/runtime'
25
25
 
26
26
  // Define a data source
27
- const docsSource = DataSource.Directory.fromPath("src/knowledge/docs", {
28
- id: "docs",
29
- filter: (path) => path.endsWith(".md") || path.endsWith(".pdf"),
30
- });
27
+ const docsSource = DataSource.Directory.fromPath('src/knowledge/docs', {
28
+ id: 'docs',
29
+ filter: (path) => path.endsWith('.md') || path.endsWith('.pdf'),
30
+ })
31
31
 
32
32
  // Create knowledge base
33
33
  export const DocsKnowledgeBase = new Knowledge({
34
- name: "docsKB",
35
- description: "Documentation knowledge base",
34
+ name: 'docsKB',
35
+ description: 'Documentation knowledge base',
36
36
  sources: [docsSource],
37
- });
37
+ })
38
38
  ```
39
39
 
40
40
  ## Data Source Types
@@ -44,16 +44,14 @@ export const DocsKnowledgeBase = new Knowledge({
44
44
  Index local markdown, PDF, and text files:
45
45
 
46
46
  ```typescript
47
- const docsSource = DataSource.Directory.fromPath("src/knowledge", {
48
- id: "docs",
47
+ const docsSource = DataSource.Directory.fromPath('src/knowledge', {
48
+ id: 'docs',
49
49
 
50
50
  // Filter specific file types
51
51
  filter: (path) => {
52
- return (
53
- path.endsWith(".md") || path.endsWith(".pdf") || path.endsWith(".txt")
54
- );
52
+ return path.endsWith('.md') || path.endsWith('.pdf') || path.endsWith('.txt')
55
53
  },
56
- });
54
+ })
57
55
  ```
58
56
 
59
57
  **Note**: Local file sources are for development only and won't work in production.
@@ -64,46 +62,36 @@ Index websites via sitemap or direct URLs:
64
62
 
65
63
  ```typescript
66
64
  // From sitemap
67
- const websiteSource = DataSource.Website.fromSitemap(
68
- "https://docs.example.com/sitemap.xml",
69
- {
70
- id: "website",
71
- maxPages: 500, // Maximum pages to crawl (1-50000)
72
- maxDepth: 3, // Maximum crawl depth (1-20)
73
- fetch: "node:fetch", // Optional: 'node:fetch' or 'integration:browser'
74
-
75
- // Filter pages
76
- filter: (context) => {
77
- // Skip archive pages
78
- if (context.url.includes("/archive/")) {
79
- return false;
80
- }
81
- // Only include documentation pages
82
- return context.url.includes("/docs/");
83
- },
65
+ const websiteSource = DataSource.Website.fromSitemap('https://docs.example.com/sitemap.xml', {
66
+ id: 'website',
67
+ maxPages: 500, // Maximum pages to crawl (1-50000)
68
+ maxDepth: 3, // Maximum crawl depth (1-20)
69
+ fetch: 'node:fetch', // Optional: 'node:fetch' or 'integration:browser'
70
+
71
+ // Filter pages
72
+ filter: (context) => {
73
+ // Skip archive pages
74
+ if (context.url.includes('/archive/')) {
75
+ return false
76
+ }
77
+ // Only include documentation pages
78
+ return context.url.includes('/docs/')
84
79
  },
85
- );
80
+ })
86
81
 
87
82
  // From direct URLs
88
83
  const urlsSource = DataSource.Website.fromUrls(
89
- [
90
- "https://example.com/page1",
91
- "https://example.com/page2",
92
- "https://example.com/page3",
93
- ],
84
+ ['https://example.com/page1', 'https://example.com/page2', 'https://example.com/page3'],
94
85
  {
95
- id: "specific_pages",
96
- },
97
- );
86
+ id: 'specific_pages',
87
+ }
88
+ )
98
89
 
99
90
  // From llms.txt (AI-friendly site manifest)
100
- const llmsTxtSource = DataSource.Website.fromLlmsTxt(
101
- "https://example.com/llms.txt",
102
- {
103
- id: "llms_txt",
104
- maxPages: 100,
105
- },
106
- );
91
+ const llmsTxtSource = DataSource.Website.fromLlmsTxt('https://example.com/llms.txt', {
92
+ id: 'llms_txt',
93
+ maxPages: 100,
94
+ })
107
95
  ```
108
96
 
109
97
  ### 3. Table-Based
@@ -111,10 +99,10 @@ const llmsTxtSource = DataSource.Website.fromLlmsTxt(
111
99
  Table-backed knowledge sources are not fully implemented yet. The shape below is useful as a forward-looking pattern, but today you should treat it as experimental and prefer directory- or website-backed sources for production workflows.
112
100
 
113
101
  ```typescript
114
- import { FAQTable } from "../tables/FAQ";
102
+ import { FAQTable } from '../tables/FAQ'
115
103
 
116
104
  const tableSource = DataSource.Table.fromTable(FAQTable, {
117
- id: "faq_kb",
105
+ id: 'faq_kb',
118
106
 
119
107
  // Transform row data into searchable text
120
108
  transform: ({ row }) => {
@@ -123,14 +111,14 @@ const tableSource = DataSource.Table.fromTable(FAQTable, {
123
111
  Answer: ${row.answer}
124
112
 
125
113
  Category: ${row.category}
126
- Tags: ${row.tags.join(", ")}`;
114
+ Tags: ${row.tags.join(', ')}`
127
115
  },
128
116
 
129
117
  // Optional: Filter rows
130
118
  filter: ({ row }) => {
131
- return row.published === true;
119
+ return row.published === true
132
120
  },
133
- });
121
+ })
134
122
  ```
135
123
 
136
124
  ### 4. Multiple Sources
@@ -139,27 +127,27 @@ Combine different source types:
139
127
 
140
128
  ```typescript
141
129
  export const CombinedKnowledgeBase = new Knowledge({
142
- name: "combinedKB",
143
- description: "Knowledge from multiple sources",
130
+ name: 'combinedKB',
131
+ description: 'Knowledge from multiple sources',
144
132
  sources: [
145
133
  // Local documentation
146
- DataSource.Directory.fromPath("src/knowledge/docs", {
147
- id: "local_docs",
134
+ DataSource.Directory.fromPath('src/knowledge/docs', {
135
+ id: 'local_docs',
148
136
  }),
149
137
 
150
138
  // Website documentation
151
- DataSource.Website.fromSitemap("https://docs.example.com/sitemap.xml", {
152
- id: "online_docs",
139
+ DataSource.Website.fromSitemap('https://docs.example.com/sitemap.xml', {
140
+ id: 'online_docs',
153
141
  maxPages: 100,
154
142
  }),
155
143
 
156
144
  // FAQ from database
157
145
  DataSource.Table.fromTable(FAQTable, {
158
- id: "faq",
146
+ id: 'faq',
159
147
  transform: ({ row }) => `Q: ${row.question}\nA: ${row.answer}`,
160
148
  }),
161
149
  ],
162
- });
150
+ })
163
151
  ```
164
152
 
165
153
  ## Using Knowledge Bases
@@ -169,25 +157,24 @@ export const CombinedKnowledgeBase = new Knowledge({
169
157
  Provide knowledge bases to AI during execution:
170
158
 
171
159
  ```typescript
172
- import { Conversation } from "@botpress/runtime";
173
- import { DocsKnowledgeBase, FAQKnowledgeBase } from "../knowledge";
160
+ import { Conversation } from '@botpress/runtime'
161
+ import { DocsKnowledgeBase, FAQKnowledgeBase } from '../knowledge'
174
162
 
175
163
  export const Chat = new Conversation({
176
- channel: "chat.channel",
164
+ channel: 'chat.channel',
177
165
 
178
166
  async handler({ execute }) {
179
167
  await execute({
180
- instructions:
181
- "You are a helpful assistant. Use the provided knowledge to answer questions accurately.",
168
+ instructions: 'You are a helpful assistant. Use the provided knowledge to answer questions accurately.',
182
169
 
183
170
  // Add knowledge bases
184
171
  knowledge: [DocsKnowledgeBase, FAQKnowledgeBase],
185
172
 
186
173
  // Optional: Add tools that can search knowledge
187
174
  tools: [searchTool],
188
- });
175
+ })
189
176
  },
190
- });
177
+ })
191
178
  ```
192
179
 
193
180
  ### In Workflows
@@ -195,22 +182,22 @@ export const Chat = new Conversation({
195
182
  Knowledge bases work the same in workflows:
196
183
 
197
184
  ```typescript
198
- import { Workflow } from "@botpress/runtime";
199
- import { DocsKnowledgeBase } from "../knowledge";
185
+ import { Workflow } from '@botpress/runtime'
186
+ import { DocsKnowledgeBase } from '../knowledge'
200
187
 
201
188
  export const ResearchWorkflow = new Workflow({
202
- name: "research",
189
+ name: 'research',
203
190
 
204
191
  handler: async ({ input, execute }) => {
205
192
  const result = await execute({
206
193
  instructions: `Research the topic: ${input.topic}`,
207
194
  knowledge: [DocsKnowledgeBase],
208
- model: "openai:gpt-4o",
209
- });
195
+ model: 'openai:gpt-4o',
196
+ })
210
197
 
211
- return { research: result };
198
+ return { research: result }
212
199
  },
213
- });
200
+ })
214
201
  ```
215
202
 
216
203
  ### Manual Search
@@ -218,25 +205,25 @@ export const ResearchWorkflow = new Workflow({
218
205
  Search knowledge bases programmatically:
219
206
 
220
207
  ```typescript
221
- import { context } from "@botpress/runtime";
222
- import { DocsKnowledgeBase } from "../knowledge";
208
+ import { context } from '@botpress/runtime'
209
+ import { DocsKnowledgeBase } from '../knowledge'
223
210
 
224
211
  export const searchAction = new Action({
225
- name: "searchDocs",
212
+ name: 'searchDocs',
226
213
  input: z.object({ query: z.string() }),
227
214
 
228
215
  async handler({ input }) {
229
- const client = context.get("client");
216
+ const client = context.get('client')
230
217
 
231
218
  // Search knowledge base
232
219
  const { passages } = await client.searchFiles({
233
220
  query: input.query,
234
221
  tags: {
235
- source: "knowledge-base",
222
+ source: 'knowledge-base',
236
223
  kbName: [DocsKnowledgeBase.name],
237
224
  },
238
225
  limit: 5,
239
- });
226
+ })
240
227
 
241
228
  return {
242
229
  results: passages.map((p) => ({
@@ -244,9 +231,9 @@ export const searchAction = new Action({
244
231
  score: p.score,
245
232
  source: p.file.key,
246
233
  })),
247
- };
234
+ }
248
235
  },
249
- });
236
+ })
250
237
  ```
251
238
 
252
239
  ## Syncing Knowledge Bases
@@ -287,13 +274,13 @@ Refresh knowledge bases programmatically:
287
274
 
288
275
  ```typescript
289
276
  // Smart refresh - only changed files (uses SHA256 hashing)
290
- await MyKnowledgeBase.refresh();
277
+ await MyKnowledgeBase.refresh()
291
278
 
292
279
  // Force refresh - re-indexes everything
293
- await MyKnowledgeBase.refresh({ force: true });
280
+ await MyKnowledgeBase.refresh({ force: true })
294
281
 
295
282
  // Refresh specific source
296
- await MyKnowledgeBase.refreshSource("docs");
283
+ await MyKnowledgeBase.refreshSource('docs')
297
284
  ```
298
285
 
299
286
  For scheduled or triggered refresh, use the same refresh methods in workflows, actions, or conversation handlers.
@@ -303,17 +290,17 @@ For scheduled or triggered refresh, use the same refresh methods in workflows, a
303
290
  Track knowledge sources used in responses:
304
291
 
305
292
  ```typescript
306
- const citations = context.get("citations");
293
+ const citations = context.get('citations')
307
294
 
308
295
  // Register source when using knowledge passage
309
296
  const { tag } = citations.registerSource({
310
297
  file: passage.file.key,
311
298
  title: passage.file.tags.title,
312
299
  url: passage.file.tags.url,
313
- });
300
+ })
314
301
 
315
302
  // Include citation tag in content
316
- const citedContent = `<${tag}>${passage.content}</${tag}>`;
303
+ const citedContent = `<${tag}>${passage.content}</${tag}>`
317
304
  ```
318
305
 
319
306
  For complete citation implementation examples, see the autonomous execution documentation.
@@ -326,19 +313,19 @@ Select knowledge bases based on user context:
326
313
 
327
314
  ```typescript
328
315
  // Select knowledge based on user department
329
- const knowledgeBases = [GeneralKB];
316
+ const knowledgeBases = [GeneralKB]
330
317
 
331
- if (user.department === "engineering") {
332
- knowledgeBases.push(EngineeringKB, TechnicalDocsKB);
333
- } else if (user.department === "sales") {
334
- knowledgeBases.push(SalesKB, ProductKB);
318
+ if (user.department === 'engineering') {
319
+ knowledgeBases.push(EngineeringKB, TechnicalDocsKB)
320
+ } else if (user.department === 'sales') {
321
+ knowledgeBases.push(SalesKB, ProductKB)
335
322
  }
336
323
 
337
324
  // Pass to execute()
338
325
  await execute({
339
- instructions: "Answer based on department-specific knowledge",
326
+ instructions: 'Answer based on department-specific knowledge',
340
327
  knowledge: knowledgeBases,
341
- });
328
+ })
342
329
  ```
343
330
 
344
331
  ### Content Transformation
@@ -348,11 +335,11 @@ Enhance content with metadata before indexing (Table and Website sources support
348
335
  ```typescript
349
336
  // Table source with transformation
350
337
  const docsTableSource = DataSource.Table.fromTable(DocsTable, {
351
- id: "docs_table",
338
+ id: 'docs_table',
352
339
 
353
340
  // Filter specific rows
354
341
  filter: ({ row }) => {
355
- return row.status === "published" && !row.deprecated;
342
+ return row.status === 'published' && !row.deprecated
356
343
  },
357
344
 
358
345
  // Transform row data into searchable text with metadata
@@ -360,12 +347,12 @@ const docsTableSource = DataSource.Table.fromTable(DocsTable, {
360
347
  return `
361
348
  Title: ${row.title}
362
349
  Category: ${row.category}
363
- Tags: ${row.tags.join(", ")}
350
+ Tags: ${row.tags.join(', ')}
364
351
  Author: ${row.author}
365
352
 
366
- ${row.content}`;
353
+ ${row.content}`
367
354
  },
368
- });
355
+ })
369
356
  ```
370
357
 
371
358
  **Note**: Directory sources only support `filter`, not `transform`. Use Table or Website sources for content transformation.
@@ -376,17 +363,17 @@ Create separate knowledge bases per language:
376
363
 
377
364
  ```typescript
378
365
  export const EnglishKB = new Knowledge({
379
- name: "englishKB",
380
- sources: [DataSource.Directory.fromPath("src/knowledge/en", { id: "docs_en" })],
381
- });
366
+ name: 'englishKB',
367
+ sources: [DataSource.Directory.fromPath('src/knowledge/en', { id: 'docs_en' })],
368
+ })
382
369
 
383
370
  export const SpanishKB = new Knowledge({
384
- name: "spanishKB",
385
- sources: [DataSource.Directory.fromPath("src/knowledge/es", { id: "docs_es" })],
386
- });
371
+ name: 'spanishKB',
372
+ sources: [DataSource.Directory.fromPath('src/knowledge/es', { id: 'docs_es' })],
373
+ })
387
374
 
388
375
  // Select based on user language
389
- const kb = userLanguage === "es" ? SpanishKB : EnglishKB;
376
+ const kb = userLanguage === 'es' ? SpanishKB : EnglishKB
390
377
  ```
391
378
 
392
379
  ## Best Practices
@@ -411,12 +398,12 @@ src/knowledge/
411
398
 
412
399
  ```typescript
413
400
  // ✅ Good
414
- export const TechnicalDocsKB = new Knowledge({ name: "technicalDocs" });
415
- export const CustomerFAQKB = new Knowledge({ name: "customerFAQ" });
401
+ export const TechnicalDocsKB = new Knowledge({ name: 'technicalDocs' })
402
+ export const CustomerFAQKB = new Knowledge({ name: 'customerFAQ' })
416
403
 
417
404
  // ❌ Bad
418
- export const KB1 = new Knowledge({ name: "kb1" });
419
- export const Stuff = new Knowledge({ name: "stuff" });
405
+ export const KB1 = new Knowledge({ name: 'kb1' })
406
+ export const Stuff = new Knowledge({ name: 'stuff' })
420
407
  ```
421
408
 
422
409
  ### 3. Refresh Frequently-Changing Content
@@ -13,6 +13,7 @@ adk mcp:init --all --project-dir ./bot
13
13
  ```
14
14
 
15
15
  This generates configuration files for:
16
+
16
17
  - **Claude Code**: `.mcp.json`
17
18
  - **VS Code**: `.vscode/mcp.json`
18
19
  - **Cursor**: `.cursor/mcp.json`
@@ -50,6 +51,7 @@ adk mcp:init [options]
50
51
  ```
51
52
 
52
53
  **Options:**
54
+
53
55
  - `--tool <name>` - Generate for specific tool (claude-code, vscode, cursor)
54
56
  - `--all` - Generate for all supported tools
55
57
  - `--force` - Overwrite existing config
@@ -88,16 +90,20 @@ The generated config includes `--cwd` to target the correct directory:
88
90
  ## Troubleshooting
89
91
 
90
92
  **"Not in an ADK project directory"**
93
+
91
94
  - Ensure `--cwd` points to directory with `agent.config.ts`
92
95
 
93
96
  **"Dev server is not running"**
97
+
94
98
  - Start the dev server: `adk dev`
95
99
 
96
100
  **"MCP can connect, but messaging/workflow tools fail"**
101
+
97
102
  - Use the default console port: `adk dev --port-console 3001`
98
103
  - Current MCP dev-server-backed tools assume `http://localhost:3001`
99
104
 
100
105
  **"No chat or webchat integration found"**
106
+
101
107
  - Add an integration: `adk add chat` or `adk add webchat`
102
108
 
103
109
  **Inspect the MCP server:**