@botpress/adk 1.19.0-beta.7 → 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.
- package/dist/agent-init/agent-project-generator.d.ts +5 -1
- package/dist/agent-init/agent-project-generator.d.ts.map +1 -1
- package/dist/agent-project/agent-project.d.ts +3 -3
- package/dist/agent-project/agent-project.d.ts.map +1 -1
- package/dist/agent-project/agent-resolver.d.ts.map +1 -1
- package/dist/agent-project/config-writer.d.ts +1 -1
- package/dist/agent-project/config-writer.d.ts.map +1 -1
- package/dist/agent-project/dependencies-parser.d.ts.map +1 -1
- package/dist/agent-project/dependency-state-to-dependencies.d.ts +11 -0
- package/dist/agent-project/dependency-state-to-dependencies.d.ts.map +1 -0
- package/dist/agent-project/file-watcher.d.ts.map +1 -1
- package/dist/agent-project/types.d.ts +9 -4
- package/dist/agent-project/types.d.ts.map +1 -1
- package/dist/agent0/capabilities/commands/adk-build.md +6 -5
- package/dist/agent0/capabilities/commands/adk-debug.md +1 -1
- package/dist/agent0/capabilities/commands/adk-dev-console.md +1 -1
- package/dist/agent0/capabilities/commands/adk-document.md +10 -2
- package/dist/agent0/capabilities/commands/adk-eval.md +1 -1
- package/dist/agent0/capabilities/commands/adk-explain.md +2 -2
- package/dist/agent0/capabilities/commands/adk-init.md +2 -2
- package/dist/agent0/capabilities/commands/adk-ship.md +1 -1
- package/dist/agent0/capabilities/commands/adk-test.md +3 -3
- package/dist/agent0/capabilities/commands/adk-validate.md +3 -3
- package/dist/agent0/capabilities/skills/adk/SKILL.md +21 -21
- package/dist/agent0/capabilities/skills/adk/references/actions.md +245 -239
- package/dist/agent0/capabilities/skills/adk/references/advanced-patterns.md +185 -218
- package/dist/agent0/capabilities/skills/adk/references/agent-config.md +74 -71
- package/dist/agent0/capabilities/skills/adk/references/assets.md +45 -48
- package/dist/agent0/capabilities/skills/adk/references/autonomous-execution.md +40 -46
- package/dist/agent0/capabilities/skills/adk/references/cli.md +17 -7
- package/dist/agent0/capabilities/skills/adk/references/context-api.md +98 -94
- package/dist/agent0/capabilities/skills/adk/references/conversation-lifecycle.md +65 -62
- package/dist/agent0/capabilities/skills/adk/references/conversations.md +395 -385
- package/dist/agent0/capabilities/skills/adk/references/custom-components.md +1 -1
- package/dist/agent0/capabilities/skills/adk/references/desk.md +236 -234
- package/dist/agent0/capabilities/skills/adk/references/explain-config.md +54 -37
- package/dist/agent0/capabilities/skills/adk/references/files.md +301 -306
- package/dist/agent0/capabilities/skills/adk/references/integration-actions.md +211 -214
- package/dist/agent0/capabilities/skills/adk/references/integrations.md +33 -31
- package/dist/agent0/capabilities/skills/adk/references/interfaces.md +13 -12
- package/dist/agent0/capabilities/skills/adk/references/knowledge-bases.md +98 -111
- package/dist/agent0/capabilities/skills/adk/references/mcp-server.md +6 -0
- package/dist/agent0/capabilities/skills/adk/references/messages.md +280 -256
- package/dist/agent0/capabilities/skills/adk/references/model-configuration.md +52 -49
- package/dist/agent0/capabilities/skills/adk/references/patterns-mistakes.md +102 -101
- package/dist/agent0/capabilities/skills/adk/references/plugins.md +15 -15
- package/dist/agent0/capabilities/skills/adk/references/tables.md +204 -210
- package/dist/agent0/capabilities/skills/adk/references/tags.md +141 -143
- package/dist/agent0/capabilities/skills/adk/references/tools.md +191 -199
- package/dist/agent0/capabilities/skills/adk/references/triggers.md +331 -336
- package/dist/agent0/capabilities/skills/adk/references/workflow-steps.md +132 -96
- package/dist/agent0/capabilities/skills/adk/references/workflows.md +479 -464
- package/dist/agent0/capabilities/skills/adk/references/zai-agent-reference.md +127 -129
- package/dist/agent0/capabilities/skills/adk/references/zai-complete-guide.md +255 -276
- package/dist/agent0/capabilities/skills/adk-debugger/SKILL.md +21 -17
- package/dist/agent0/capabilities/skills/adk-debugger/references/common-failures.md +25 -25
- package/dist/agent0/capabilities/skills/adk-debugger/references/conversation-analysis.md +49 -41
- package/dist/agent0/capabilities/skills/adk-debugger/references/debug-workflow.md +20 -14
- package/dist/agent0/capabilities/skills/adk-debugger/references/llm-debugging.md +13 -13
- package/dist/agent0/capabilities/skills/adk-debugger/references/trace-summarization.md +18 -18
- package/dist/agent0/capabilities/skills/adk-debugger/references/traces-and-logs.md +67 -67
- package/dist/agent0/capabilities/skills/adk-dev-console/SKILL.md +36 -36
- package/dist/agent0/capabilities/skills/adk-dev-console/references/agent-steps.md +14 -6
- package/dist/agent0/capabilities/skills/adk-dev-console/references/multi-agent-dashboard.md +13 -13
- package/dist/agent0/capabilities/skills/adk-dev-console/references/pages.md +18 -0
- package/dist/agent0/capabilities/skills/adk-docs/SKILL.md +13 -13
- package/dist/agent0/capabilities/skills/adk-docs/references/doc-standards.md +15 -0
- package/dist/agent0/capabilities/skills/adk-evals/SKILL.md +29 -23
- package/dist/agent0/capabilities/skills/adk-evals/references/eval-format.md +31 -23
- package/dist/agent0/capabilities/skills/adk-evals/references/test-patterns.md +25 -36
- package/dist/agent0/capabilities/skills/adk-evals/references/testing-workflow.md +6 -4
- package/dist/agent0/config/schema.d.ts.map +1 -1
- package/dist/agent0/config/store.d.ts +8 -3
- package/dist/agent0/config/store.d.ts.map +1 -1
- package/dist/agent0/index.js +214 -59
- package/dist/agent0/index.js.map +17 -15
- package/dist/agent0/providers/catalog.d.ts.map +1 -1
- package/dist/agent0/providers/registry.d.ts.map +1 -1
- package/dist/agent0/providers/source.d.ts +8 -3
- package/dist/agent0/providers/source.d.ts.map +1 -1
- package/dist/agent0/runtime/client.d.ts +4 -3
- package/dist/agent0/runtime/client.d.ts.map +1 -1
- package/dist/agent0/runtime/engine.d.ts +7 -1
- package/dist/agent0/runtime/engine.d.ts.map +1 -1
- package/dist/agent0/runtime/manager.d.ts +2 -3
- package/dist/agent0/runtime/manager.d.ts.map +1 -1
- package/dist/agent0/runtime/process.d.ts +10 -0
- package/dist/agent0/runtime/process.d.ts.map +1 -1
- package/dist/assets/manager.d.ts +3 -0
- package/dist/assets/manager.d.ts.map +1 -1
- package/dist/auth/credentials.d.ts +1 -1
- package/dist/auth/credentials.d.ts.map +1 -1
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/service.d.ts.map +1 -1
- package/dist/bot-generator/generator.d.ts +22 -0
- package/dist/bot-generator/generator.d.ts.map +1 -1
- package/dist/bot-generator/integration-sync.d.ts +2 -0
- package/dist/bot-generator/integration-sync.d.ts.map +1 -1
- package/dist/bot-generator/interface-sync.d.ts +2 -0
- package/dist/bot-generator/interface-sync.d.ts.map +1 -1
- package/dist/bot-generator/plugin-sync.d.ts +2 -0
- package/dist/bot-generator/plugin-sync.d.ts.map +1 -1
- package/dist/cognitive/models.d.ts.map +1 -1
- package/dist/commands/base-command.d.ts +1 -0
- package/dist/commands/base-command.d.ts.map +1 -1
- package/dist/commands/bp-cli.d.ts.map +1 -1
- package/dist/commands/bp-cli.js +147 -0
- package/dist/commands/bp-cli.js.map +12 -0
- package/dist/commands/bp-dev-command.d.ts +3 -1
- package/dist/commands/bp-dev-command.d.ts.map +1 -1
- package/dist/commands/bp-dev-stderr.d.ts +9 -0
- package/dist/commands/bp-dev-stderr.d.ts.map +1 -1
- package/dist/commands/bp-dev-worker-env.d.ts +7 -0
- package/dist/commands/bp-dev-worker-env.d.ts.map +1 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/config/manager.d.ts.map +1 -1
- package/dist/dependencies/catalog/catalog-service.d.ts +53 -0
- package/dist/dependencies/catalog/catalog-service.d.ts.map +1 -0
- package/dist/dependencies/catalog/client-factory.d.ts +33 -0
- package/dist/dependencies/catalog/client-factory.d.ts.map +1 -0
- package/dist/dependencies/catalog/integration-source.d.ts +34 -0
- package/dist/dependencies/catalog/integration-source.d.ts.map +1 -0
- package/dist/dependencies/catalog/interface-source.d.ts +23 -0
- package/dist/dependencies/catalog/interface-source.d.ts.map +1 -0
- package/dist/dependencies/catalog/plugin-source.d.ts +49 -0
- package/dist/dependencies/catalog/plugin-source.d.ts.map +1 -0
- package/dist/dependencies/catalog/resolution-cache.d.ts +76 -0
- package/dist/dependencies/catalog/resolution-cache.d.ts.map +1 -0
- package/dist/dependencies/dependency-manager.d.ts +31 -16
- package/dist/dependencies/dependency-manager.d.ts.map +1 -1
- package/dist/dependencies/errors.d.ts +9 -6
- package/dist/dependencies/errors.d.ts.map +1 -1
- package/dist/dependencies/index.d.ts +5 -4
- package/dist/dependencies/index.d.ts.map +1 -1
- package/dist/dependencies/index.js +2309 -1697
- package/dist/dependencies/index.js.map +41 -32
- package/dist/dependencies/legacy-lock-file.d.ts +15 -0
- package/dist/dependencies/legacy-lock-file.d.ts.map +1 -0
- package/dist/dependencies/migration.d.ts +19 -0
- package/dist/dependencies/migration.d.ts.map +1 -1
- package/dist/dependencies/resolvers/integration-resolver.d.ts +4 -3
- package/dist/dependencies/resolvers/integration-resolver.d.ts.map +1 -1
- package/dist/dependencies/resolvers/plugin-resolver.d.ts +4 -4
- package/dist/dependencies/resolvers/plugin-resolver.d.ts.map +1 -1
- package/dist/dependencies/snapshot-store.d.ts +59 -0
- package/dist/dependencies/snapshot-store.d.ts.map +1 -0
- package/dist/dependencies/status-resolver.d.ts +36 -0
- package/dist/dependencies/status-resolver.d.ts.map +1 -0
- package/dist/dependencies/status.d.ts +214 -0
- package/dist/dependencies/status.d.ts.map +1 -0
- package/dist/dependencies/types.d.ts +388 -37
- package/dist/dependencies/types.d.ts.map +1 -1
- package/dist/file-watcher/watcher.d.ts +21 -5
- package/dist/file-watcher/watcher.d.ts.map +1 -1
- package/dist/generators/action-types.d.ts.map +1 -1
- package/dist/generators/client-wrapper.d.ts.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3643 -2345
- package/dist/index.js.map +68 -58
- package/dist/integrations/config-utils.d.ts +11 -7
- package/dist/integrations/config-utils.d.ts.map +1 -1
- package/dist/integrations/hub-cache.d.ts +0 -58
- package/dist/integrations/hub-cache.d.ts.map +1 -1
- package/dist/integrations/index.d.ts +1 -3
- package/dist/integrations/index.d.ts.map +1 -1
- package/dist/integrations/manager.d.ts +19 -53
- package/dist/integrations/manager.d.ts.map +1 -1
- package/dist/interfaces/enhanced-cache.d.ts +7 -7
- package/dist/interfaces/enhanced-cache.d.ts.map +1 -1
- package/dist/interfaces/manager.d.ts +11 -17
- package/dist/interfaces/manager.d.ts.map +1 -1
- package/dist/interfaces/parser.d.ts.map +1 -1
- package/dist/knowledge/manager.d.ts +3 -0
- package/dist/knowledge/manager.d.ts.map +1 -1
- package/dist/plugins/index.d.ts +0 -1
- package/dist/plugins/index.d.ts.map +1 -1
- package/dist/plugins/manager.d.ts +16 -48
- package/dist/plugins/manager.d.ts.map +1 -1
- package/dist/preflight/checker.d.ts +6 -1
- package/dist/preflight/checker.d.ts.map +1 -1
- package/dist/preflight/dependency-gate.d.ts +37 -0
- package/dist/preflight/dependency-gate.d.ts.map +1 -0
- package/dist/preflight/index.d.ts +2 -1
- package/dist/preflight/index.d.ts.map +1 -1
- package/dist/preflight/types.d.ts +18 -0
- package/dist/preflight/types.d.ts.map +1 -1
- package/dist/runner/script-runner.d.ts.map +1 -1
- package/dist/secrets/manager.d.ts.map +1 -1
- package/dist/tables/table-manager.d.ts +3 -0
- package/dist/tables/table-manager.d.ts.map +1 -1
- package/dist/templates/README.md +23 -13
- package/dist/templates/blank/agent.config.ts +3 -3
- package/dist/templates/blank/src/triggers/index.ts +1 -1
- package/dist/templates/botpress-desk/evals/index.eval.ts +1 -1
- package/dist/templates/botpress-desk/src/triggers/index.ts +1 -1
- package/dist/templates/crm-enrichment/README.md +3 -3
- package/dist/templates/crm-enrichment/agent.config.ts +2 -2
- package/dist/templates/crm-enrichment/src/conversations/index.ts +1 -1
- package/dist/templates/hello-world/agent.config.ts +3 -3
- package/dist/templates/hello-world/src/triggers/index.ts +1 -1
- package/dist/templates/knowledge-assistant/src/triggers/index.ts +1 -1
- package/dist/templates/template.config.json +3 -3
- package/dist/test-utils/mock-module.d.ts +29 -0
- package/dist/test-utils/mock-module.d.ts.map +1 -0
- package/dist/utils/ids.d.ts +10 -0
- package/dist/utils/ids.d.ts.map +1 -1
- package/dist/utils/require-chat.d.ts.map +1 -1
- package/dist/utils/source-map-optimizer.d.ts +10 -11
- package/dist/utils/source-map-optimizer.d.ts.map +1 -1
- package/dist/workspace/workspace-cache.d.ts +2 -1
- package/dist/workspace/workspace-cache.d.ts.map +1 -1
- package/package.json +8 -4
- package/dist/agent-project/lock-to-dependencies.d.ts +0 -11
- package/dist/agent-project/lock-to-dependencies.d.ts.map +0 -1
- package/dist/dependencies/lock-file.d.ts +0 -15
- package/dist/dependencies/lock-file.d.ts.map +0 -1
- package/dist/integrations/enhanced-cache.d.ts +0 -53
- package/dist/integrations/enhanced-cache.d.ts.map +0 -1
- package/dist/plugins/enhanced-cache.d.ts +0 -53
- package/dist/plugins/enhanced-cache.d.ts.map +0 -1
- package/dist/templates/blank/package.json +0 -17
- package/dist/templates/blank/tsconfig.json +0 -25
- package/dist/templates/botpress-desk/package.json +0 -17
- package/dist/templates/crm-enrichment/package.json +0 -18
- package/dist/templates/crm-enrichment/tsconfig.json +0 -25
- package/dist/templates/hello-world/package.json +0 -18
- package/dist/templates/hello-world/tsconfig.json +0 -25
- package/dist/templates/knowledge-assistant/package.json +0 -18
- package/dist/templates/knowledge-assistant/tsconfig.json +0 -25
- package/dist/templates/slack-triage/package.json +0 -18
- package/dist/templates/slack-triage/tsconfig.json +0 -25
|
@@ -19,21 +19,27 @@ Choose the appropriate style based on what you're documenting:
|
|
|
19
19
|
Brief introduction (1-2 sentences)
|
|
20
20
|
|
|
21
21
|
## Quick Start
|
|
22
|
+
|
|
22
23
|
5-10 line essential usage example from actual project
|
|
23
24
|
|
|
24
25
|
## Commands / Endpoints
|
|
26
|
+
|
|
25
27
|
### command-name / GET /endpoint
|
|
28
|
+
|
|
26
29
|
Brief description
|
|
27
30
|
**Options:** (if applicable)
|
|
28
31
|
**Example:** (one example from project code)
|
|
29
32
|
|
|
30
33
|
## Common Workflows
|
|
34
|
+
|
|
31
35
|
Only 3-4 workflows verified from actual project code
|
|
32
36
|
|
|
33
37
|
## Quick Reference
|
|
38
|
+
|
|
34
39
|
Command summary table or list
|
|
35
40
|
|
|
36
41
|
## See Also
|
|
42
|
+
|
|
37
43
|
Links to related docs
|
|
38
44
|
```
|
|
39
45
|
|
|
@@ -57,20 +63,26 @@ Links to related docs
|
|
|
57
63
|
Brief introduction (2-3 sentences)
|
|
58
64
|
|
|
59
65
|
## Table of Contents
|
|
66
|
+
|
|
60
67
|
- Clear links to major sections
|
|
61
68
|
- Include subsection highlights
|
|
62
69
|
|
|
63
70
|
## Core Concepts
|
|
71
|
+
|
|
64
72
|
Basic understanding needed
|
|
65
73
|
|
|
66
74
|
## [Main Feature 1]
|
|
75
|
+
|
|
67
76
|
### Basic Usage (example from actual project code)
|
|
77
|
+
|
|
68
78
|
### Edge Cases (only if critical and seen in project)
|
|
69
79
|
|
|
70
80
|
## [Main Feature 2]
|
|
81
|
+
|
|
71
82
|
...
|
|
72
83
|
|
|
73
84
|
## Quick Reference
|
|
85
|
+
|
|
74
86
|
Essential patterns at a glance (if helpful)
|
|
75
87
|
```
|
|
76
88
|
|
|
@@ -102,14 +114,17 @@ Essential patterns at a glance (if helpful)
|
|
|
102
114
|
## Document Health Metrics
|
|
103
115
|
|
|
104
116
|
**Reference Docs (CLI, API):**
|
|
117
|
+
|
|
105
118
|
- Good: 400-500 lines, Quick Start at top, one example per command, 3-4 workflows
|
|
106
119
|
- Warning: >600 lines, multiple examples per command, separate best practices section
|
|
107
120
|
|
|
108
121
|
**Conceptual Guides:**
|
|
122
|
+
|
|
109
123
|
- Good: 500-700 lines, progressive examples, verified workflows
|
|
110
124
|
- Warning: >800 lines, vague sections, missing patterns
|
|
111
125
|
|
|
112
126
|
**All Documents:**
|
|
127
|
+
|
|
113
128
|
- Good: Every concept has code example, clear `##` headers, searchable section names
|
|
114
129
|
- Warning: Vague section names ("Advanced", "Other"), no table of contents
|
|
115
130
|
|
|
@@ -26,6 +26,7 @@ Use this skill when the developer asks about:
|
|
|
26
26
|
Or when you are developing an ADK bot and need to write the equivalent of unit/end-to-end tests.
|
|
27
27
|
|
|
28
28
|
**Trigger questions:**
|
|
29
|
+
|
|
29
30
|
- "How do I write an eval?"
|
|
30
31
|
- "How do I test my workflow?"
|
|
31
32
|
- "How do I assert that a tool was called with specific params?"
|
|
@@ -37,11 +38,11 @@ Or when you are developing an ADK bot and need to write the equivalent of unit/e
|
|
|
37
38
|
|
|
38
39
|
## Available Documentation
|
|
39
40
|
|
|
40
|
-
| File
|
|
41
|
-
|
|
42
|
-
| `references/eval-format.md`
|
|
43
|
-
| `references/testing-workflow.md` | Running evals, interpreting output, using traces, the write → test → iterate loop, CI integration
|
|
44
|
-
| `references/test-patterns.md`
|
|
41
|
+
| File | Contents |
|
|
42
|
+
| -------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
43
|
+
| `references/eval-format.md` | Complete file format — all fields, turn types, assertion categories, match operators, setup, outcome, options |
|
|
44
|
+
| `references/testing-workflow.md` | Running evals, interpreting output, using traces, the write → test → iterate loop, CI integration |
|
|
45
|
+
| `references/test-patterns.md` | Per-primitive patterns for actions, tools, workflows, conversations, and state |
|
|
45
46
|
|
|
46
47
|
## How to Answer
|
|
47
48
|
|
|
@@ -73,10 +74,7 @@ export default new Eval({
|
|
|
73
74
|
{
|
|
74
75
|
user: 'Hi!',
|
|
75
76
|
assert: {
|
|
76
|
-
response: [
|
|
77
|
-
{ not_contains: 'error' },
|
|
78
|
-
{ llm_judge: 'Response is friendly and offers to help' },
|
|
79
|
-
],
|
|
77
|
+
response: [{ not_contains: 'error' }, { llm_judge: 'Response is friendly and offers to help' }],
|
|
80
78
|
tools: [{ not_called: 'createTicket' }],
|
|
81
79
|
state: [{ path: 'conversation.greeted', equals: true }],
|
|
82
80
|
},
|
|
@@ -96,21 +94,21 @@ export default new Eval({
|
|
|
96
94
|
|
|
97
95
|
### Turn types
|
|
98
96
|
|
|
99
|
-
| Turn
|
|
100
|
-
|
|
101
|
-
| `user: 'message'`
|
|
97
|
+
| Turn | When to use |
|
|
98
|
+
| -------------------------- | ------------------------------------------------ |
|
|
99
|
+
| `user: 'message'` | Standard user message |
|
|
102
100
|
| `event: { type, payload }` | Non-message trigger (webhook, integration event) |
|
|
103
|
-
| `expectSilence: true`
|
|
101
|
+
| `expectSilence: true` | Assert bot does NOT respond |
|
|
104
102
|
|
|
105
103
|
### Assertion categories
|
|
106
104
|
|
|
107
|
-
| Category
|
|
108
|
-
|
|
105
|
+
| Category | What it checks |
|
|
106
|
+
| ---------- | ----------------------------------------------------------- |
|
|
109
107
|
| `response` | Bot reply text (contains, not_contains, matches, llm_judge) |
|
|
110
|
-
| `tools`
|
|
111
|
-
| `state`
|
|
112
|
-
| `workflow` | Workflow execution (entered, completed)
|
|
113
|
-
| `timing`
|
|
108
|
+
| `tools` | Tool calls (called, not_called, call_order, params) |
|
|
109
|
+
| `state` | Bot/user/conversation state (equals, changed) |
|
|
110
|
+
| `workflow` | Workflow execution (entered, completed) |
|
|
111
|
+
| `timing` | Response time in ms (lte, gte) |
|
|
114
112
|
|
|
115
113
|
### CLI commands
|
|
116
114
|
|
|
@@ -143,7 +141,9 @@ adk evals runs --latest -v # with full details
|
|
|
143
141
|
|
|
144
142
|
```typescript
|
|
145
143
|
// WRONG — missing user or event
|
|
146
|
-
{
|
|
144
|
+
{
|
|
145
|
+
expectSilence: true
|
|
146
|
+
}
|
|
147
147
|
```
|
|
148
148
|
|
|
149
149
|
---
|
|
@@ -159,7 +159,9 @@ adk evals runs --latest -v # with full details
|
|
|
159
159
|
|
|
160
160
|
```typescript
|
|
161
161
|
// INCOMPLETE — doesn't verify params were correct
|
|
162
|
-
{
|
|
162
|
+
{
|
|
163
|
+
called: 'createTicket'
|
|
164
|
+
}
|
|
163
165
|
```
|
|
164
166
|
|
|
165
167
|
---
|
|
@@ -193,8 +195,8 @@ setup: {
|
|
|
193
195
|
```typescript
|
|
194
196
|
// WRONG — depends on the bot correctly processing setup turns
|
|
195
197
|
conversation: [
|
|
196
|
-
{ user: 'I am on the pro plan' },
|
|
197
|
-
{ user: 'I need help with billing' },
|
|
198
|
+
{ user: 'I am on the pro plan' }, // hoping bot sets user.plan
|
|
199
|
+
{ user: 'I need help with billing' }, // actual test turn
|
|
198
200
|
]
|
|
199
201
|
```
|
|
200
202
|
|
|
@@ -203,20 +205,24 @@ conversation: [
|
|
|
203
205
|
## Example Questions
|
|
204
206
|
|
|
205
207
|
**Writing evals:**
|
|
208
|
+
|
|
206
209
|
- "Write an eval that tests my createTicket tool is called with the right priority"
|
|
207
210
|
- "How do I assert that the bot stays silent after an internal event?"
|
|
208
211
|
- "How do I test a multi-turn conversation where context is retained?"
|
|
209
212
|
|
|
210
213
|
**Running evals:**
|
|
214
|
+
|
|
211
215
|
- "How do I run only regression evals?"
|
|
212
216
|
- "How do I see which assertions failed and why?"
|
|
213
217
|
- "How do I integrate evals into GitHub Actions?"
|
|
214
218
|
|
|
215
219
|
**Debugging:**
|
|
220
|
+
|
|
216
221
|
- "My eval says the tool wasn't called but I think it was — how do I check?"
|
|
217
222
|
- "How do I inspect what the bot actually did during an eval?"
|
|
218
223
|
|
|
219
224
|
**Per-primitive:**
|
|
225
|
+
|
|
220
226
|
- "How do I test a workflow that uses step.sleep()?"
|
|
221
227
|
- "How do I test that state changed from the seeded value?"
|
|
222
228
|
|
|
@@ -26,10 +26,10 @@ my-agent/
|
|
|
26
26
|
import { Eval } from '@botpress/evals'
|
|
27
27
|
|
|
28
28
|
export default new Eval({
|
|
29
|
-
name: 'my-eval',
|
|
29
|
+
name: 'my-eval', // unique identifier (required)
|
|
30
30
|
description: 'What this tests', // optional
|
|
31
|
-
type: 'regression',
|
|
32
|
-
tags: ['tools', 'multi-turn'],
|
|
31
|
+
type: 'regression', // 'capability' or 'regression' — optional, for filtering
|
|
32
|
+
tags: ['tools', 'multi-turn'], // optional, for filtering
|
|
33
33
|
|
|
34
34
|
setup: {
|
|
35
35
|
// Seed state or trigger a workflow before the conversation (optional)
|
|
@@ -38,21 +38,27 @@ export default new Eval({
|
|
|
38
38
|
conversation: [
|
|
39
39
|
{
|
|
40
40
|
user: 'message from user', // or: event, expectSilence
|
|
41
|
-
assert: {
|
|
41
|
+
assert: {
|
|
42
|
+
/* per-turn assertions */
|
|
43
|
+
},
|
|
42
44
|
},
|
|
43
45
|
],
|
|
44
46
|
|
|
45
|
-
outcome: {
|
|
47
|
+
outcome: {
|
|
48
|
+
/* post-conversation assertions (optional) */
|
|
49
|
+
},
|
|
46
50
|
|
|
47
|
-
options: {
|
|
51
|
+
options: {
|
|
52
|
+
/* per-eval overrides (optional) */
|
|
53
|
+
},
|
|
48
54
|
})
|
|
49
55
|
```
|
|
50
56
|
|
|
51
57
|
## Types
|
|
52
58
|
|
|
53
|
-
| Type
|
|
54
|
-
|
|
55
|
-
| `capability` | Verify the bot can do something new
|
|
59
|
+
| Type | Purpose |
|
|
60
|
+
| ------------ | -------------------------------------- |
|
|
61
|
+
| `capability` | Verify the bot can do something new |
|
|
56
62
|
| `regression` | Verify the bot still does it correctly |
|
|
57
63
|
|
|
58
64
|
## Multiple Evals Per File
|
|
@@ -190,21 +196,21 @@ assert: {
|
|
|
190
196
|
|
|
191
197
|
Used in tool params, state values, and workflow params:
|
|
192
198
|
|
|
193
|
-
| Operator
|
|
194
|
-
|
|
195
|
-
| `equals`
|
|
196
|
-
| `contains`
|
|
197
|
-
| `not_contains` | `{ not_contains: 'test' }`
|
|
198
|
-
| `matches`
|
|
199
|
-
| `in`
|
|
200
|
-
| `exists`
|
|
199
|
+
| Operator | Example | Description |
|
|
200
|
+
| -------------- | ---------------------------- | ------------------ |
|
|
201
|
+
| `equals` | `{ equals: 'urgent' }` | Exact match |
|
|
202
|
+
| `contains` | `{ contains: 'HR' }` | Substring |
|
|
203
|
+
| `not_contains` | `{ not_contains: 'test' }` | Excludes substring |
|
|
204
|
+
| `matches` | `{ matches: '\\d+' }` | Regex |
|
|
205
|
+
| `in` | `{ in: ['high', 'urgent'] }` | One of |
|
|
206
|
+
| `exists` | `{ exists: true }` | Property exists |
|
|
201
207
|
|
|
202
208
|
**Numeric-only operators** (for `timing` and numeric state values):
|
|
203
209
|
|
|
204
|
-
| Operator | Example
|
|
205
|
-
|
|
206
|
-
| `gte`
|
|
207
|
-
| `lte`
|
|
210
|
+
| Operator | Example | Description |
|
|
211
|
+
| -------- | --------------- | --------------------- |
|
|
212
|
+
| `gte` | `{ gte: 100 }` | Greater than or equal |
|
|
213
|
+
| `lte` | `{ lte: 5000 }` | Less than or equal |
|
|
208
214
|
|
|
209
215
|
---
|
|
210
216
|
|
|
@@ -294,7 +300,7 @@ export default defineConfig({
|
|
|
294
300
|
evals: {
|
|
295
301
|
idleTimeout: 20000,
|
|
296
302
|
judgePassThreshold: 3,
|
|
297
|
-
judgeModel: 'fast',
|
|
303
|
+
judgeModel: 'fast', // 'fast', 'best', or a model ref like 'openai:gpt-4o'
|
|
298
304
|
},
|
|
299
305
|
})
|
|
300
306
|
```
|
|
@@ -307,7 +313,9 @@ export default defineConfig({
|
|
|
307
313
|
|
|
308
314
|
```typescript
|
|
309
315
|
// WRONG — every turn needs a trigger
|
|
310
|
-
{
|
|
316
|
+
{
|
|
317
|
+
expectSilence: true
|
|
318
|
+
}
|
|
311
319
|
```
|
|
312
320
|
|
|
313
321
|
✅ **Correct**
|
|
@@ -19,13 +19,8 @@ export default new Eval({
|
|
|
19
19
|
{
|
|
20
20
|
user: 'What is the status of order ORD-123?',
|
|
21
21
|
assert: {
|
|
22
|
-
response: [
|
|
23
|
-
|
|
24
|
-
{ llm_judge: 'Response includes order status information' },
|
|
25
|
-
],
|
|
26
|
-
tools: [
|
|
27
|
-
{ called: 'lookupOrder', params: { orderId: { equals: 'ORD-123' } } },
|
|
28
|
-
],
|
|
22
|
+
response: [{ contains: 'ORD-123' }, { llm_judge: 'Response includes order status information' }],
|
|
23
|
+
tools: [{ called: 'lookupOrder', params: { orderId: { equals: 'ORD-123' } } }],
|
|
29
24
|
},
|
|
30
25
|
},
|
|
31
26
|
],
|
|
@@ -33,6 +28,7 @@ export default new Eval({
|
|
|
33
28
|
```
|
|
34
29
|
|
|
35
30
|
**What to assert:**
|
|
31
|
+
|
|
36
32
|
- `tools.called` with expected params — verify the action was invoked correctly
|
|
37
33
|
- `response.contains` — verify the bot surfaced the action's result
|
|
38
34
|
- `state` — if the action writes to state, verify the write
|
|
@@ -59,10 +55,13 @@ export default new Eval({
|
|
|
59
55
|
user: 'Yes, please create a ticket for this',
|
|
60
56
|
assert: {
|
|
61
57
|
tools: [
|
|
62
|
-
{
|
|
58
|
+
{
|
|
59
|
+
called: 'createTicket',
|
|
60
|
+
params: {
|
|
63
61
|
category: { equals: 'billing' },
|
|
64
62
|
priority: { in: ['normal', 'high'] },
|
|
65
|
-
|
|
63
|
+
},
|
|
64
|
+
},
|
|
66
65
|
],
|
|
67
66
|
response: [{ contains: 'ticket' }],
|
|
68
67
|
},
|
|
@@ -72,6 +71,7 @@ export default new Eval({
|
|
|
72
71
|
```
|
|
73
72
|
|
|
74
73
|
**What to assert:**
|
|
74
|
+
|
|
75
75
|
- `tools.called` with `params` — verify inputs are correctly extracted from the conversation
|
|
76
76
|
- `tools.not_called` — verify tools are NOT called prematurely or inappropriately
|
|
77
77
|
- `tools.call_order` — verify the correct sequence when multiple tools are involved
|
|
@@ -108,23 +108,15 @@ export default new Eval({
|
|
|
108
108
|
{
|
|
109
109
|
user: 'What happens next?',
|
|
110
110
|
assert: {
|
|
111
|
-
workflow: [
|
|
112
|
-
|
|
113
|
-
],
|
|
114
|
-
response: [
|
|
115
|
-
{ llm_judge: 'Response explains the onboarding next steps' },
|
|
116
|
-
],
|
|
111
|
+
workflow: [{ name: 'onboarding', entered: true }],
|
|
112
|
+
response: [{ llm_judge: 'Response explains the onboarding next steps' }],
|
|
117
113
|
},
|
|
118
114
|
},
|
|
119
115
|
],
|
|
120
116
|
|
|
121
117
|
outcome: {
|
|
122
|
-
workflow: [
|
|
123
|
-
|
|
124
|
-
],
|
|
125
|
-
state: [
|
|
126
|
-
{ path: 'user.onboardingComplete', equals: true },
|
|
127
|
-
],
|
|
118
|
+
workflow: [{ name: 'onboarding', completed: true }],
|
|
119
|
+
state: [{ path: 'user.onboardingComplete', equals: true }],
|
|
128
120
|
},
|
|
129
121
|
})
|
|
130
122
|
```
|
|
@@ -156,6 +148,7 @@ setup: {
|
|
|
156
148
|
```
|
|
157
149
|
|
|
158
150
|
**What to assert:**
|
|
151
|
+
|
|
159
152
|
- `workflow.entered` — workflow was triggered
|
|
160
153
|
- `workflow.completed` — workflow ran to completion (use in `outcome`)
|
|
161
154
|
- `state` — final state after the workflow completes
|
|
@@ -203,9 +196,7 @@ export default new Eval({
|
|
|
203
196
|
payload: { amount: 99.99, currency: 'USD', customerId: 'cust-001' },
|
|
204
197
|
},
|
|
205
198
|
assert: {
|
|
206
|
-
response: [
|
|
207
|
-
{ llm_judge: 'Bot notifies about the failed payment and offers help' },
|
|
208
|
-
],
|
|
199
|
+
response: [{ llm_judge: 'Bot notifies about the failed payment and offers help' }],
|
|
209
200
|
tools: [{ called: 'lookupCustomer' }],
|
|
210
201
|
},
|
|
211
202
|
},
|
|
@@ -246,9 +237,7 @@ export default new Eval({
|
|
|
246
237
|
{
|
|
247
238
|
user: 'I prefer to be contacted by email',
|
|
248
239
|
assert: {
|
|
249
|
-
state: [
|
|
250
|
-
{ path: 'user.contactPreference', equals: 'email' },
|
|
251
|
-
],
|
|
240
|
+
state: [{ path: 'user.contactPreference', equals: 'email' }],
|
|
252
241
|
},
|
|
253
242
|
},
|
|
254
243
|
],
|
|
@@ -296,13 +285,13 @@ outcome: {
|
|
|
296
285
|
|
|
297
286
|
## Quick Reference: What to Assert Per Primitive
|
|
298
287
|
|
|
299
|
-
| Primitive
|
|
300
|
-
|
|
301
|
-
| Actions
|
|
302
|
-
| Tools
|
|
303
|
-
| Workflows
|
|
304
|
-
| Conversations | `response` (multi-turn)
|
|
305
|
-
| State
|
|
288
|
+
| Primitive | Primary assertions | Secondary assertions |
|
|
289
|
+
| ------------- | ------------------------------------ | -------------------- |
|
|
290
|
+
| Actions | `tools.called` + params | `response`, `state` |
|
|
291
|
+
| Tools | `tools.called/not_called/call_order` | `response` |
|
|
292
|
+
| Workflows | `workflow.entered/completed` | `state`, `outcome` |
|
|
293
|
+
| Conversations | `response` (multi-turn) | `tools`, `state` |
|
|
294
|
+
| State | `state.equals/changed` | `outcome.state` |
|
|
306
295
|
|
|
307
296
|
---
|
|
308
297
|
|
|
@@ -313,11 +302,11 @@ Always test what the bot should NOT do, not just what it should do.
|
|
|
313
302
|
```typescript
|
|
314
303
|
conversation: [
|
|
315
304
|
{
|
|
316
|
-
user: 'Show me all users in the system',
|
|
305
|
+
user: 'Show me all users in the system', // unauthorized request
|
|
317
306
|
assert: {
|
|
318
307
|
tools: [{ not_called: 'listAllUsers' }], // should not call admin tool
|
|
319
308
|
response: [
|
|
320
|
-
{ not_contains: 'user@example.com' },
|
|
309
|
+
{ not_contains: 'user@example.com' }, // should not leak data
|
|
321
310
|
{ llm_judge: 'Response politely declines the request' },
|
|
322
311
|
],
|
|
323
312
|
},
|
|
@@ -53,10 +53,10 @@ adk evals --format json # machine-readable JSON output (for CI)
|
|
|
53
53
|
|
|
54
54
|
### Exit codes
|
|
55
55
|
|
|
56
|
-
| Code | Meaning
|
|
57
|
-
|
|
58
|
-
| `0`
|
|
59
|
-
| `1`
|
|
56
|
+
| Code | Meaning |
|
|
57
|
+
| ---- | ------------------------ |
|
|
58
|
+
| `0` | All evals passed |
|
|
59
|
+
| `1` | One or more evals failed |
|
|
60
60
|
|
|
61
61
|
Use this in CI to gate merges on eval results.
|
|
62
62
|
|
|
@@ -120,6 +120,7 @@ adk chat
|
|
|
120
120
|
```
|
|
121
121
|
|
|
122
122
|
This opens an interactive chat session with your dev bot. Use it to:
|
|
123
|
+
|
|
123
124
|
- Manually test a flow before formalizing it as an eval
|
|
124
125
|
- Quickly verify a fix after a failing eval
|
|
125
126
|
- Explore edge cases interactively
|
|
@@ -146,6 +147,7 @@ adk logs # browse recent logs
|
|
|
146
147
|
```
|
|
147
148
|
|
|
148
149
|
Use traces to verify:
|
|
150
|
+
|
|
149
151
|
- Which tools were called (and with what inputs/outputs)
|
|
150
152
|
- Whether a workflow was entered or completed
|
|
151
153
|
- Where the bot spent its time (latency analysis)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/agent0/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/agent0/config/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,eAAe,CAAA;AAEjC,OAAO,EAAgC,KAAK,YAAY,EAAE,KAAK,uBAAuB,EAAE,MAAM,aAAa,CAAA;AAE3G,eAAO,MAAM,wBAAwB;;;;;;;;;;;;EAM1B,CAAA;AAEX,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQhC,CAAA;AAEX,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAM/B,CAAA;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASpB,CAAA;AAEX,eAAO,MAAM,0BAA0B,EAAE,uBAGxC,CAAA;AAED,wBAAgB,yBAAyB,CAAC,GAAG,OAAa,GAAG,YAAY,CAUxE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,YAAY,CAc9D"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
+
import { AdkError } from '@botpress/analytics';
|
|
1
2
|
import type { Agent0Config } from '../types.js';
|
|
2
3
|
import { type Agent0PathOptions } from './paths.js';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
export type Agent0ConfigErrorCode = 'AGENT0_CONFIG_READ_FAILED' | 'AGENT0_CONFIG_INVALID';
|
|
5
|
+
/**
|
|
6
|
+
* The Agent(0) config file is user-owned (hand-editable, on-disk), so both
|
|
7
|
+
* read and parse failures are expected user/environment conditions.
|
|
8
|
+
*/
|
|
9
|
+
export declare class Agent0ConfigError extends AdkError<Agent0ConfigErrorCode> {
|
|
10
|
+
constructor(message: string, cause?: unknown, code?: Agent0ConfigErrorCode);
|
|
6
11
|
}
|
|
7
12
|
export interface Agent0ConfigStoreOptions extends Agent0PathOptions {
|
|
8
13
|
configPath?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/agent0/config/store.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAA8C,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAG/F,qBAAa,iBAAkB,SAAQ,
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/agent0/config/store.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAA8C,KAAK,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAG/F,MAAM,MAAM,qBAAqB,GAAG,2BAA2B,GAAG,uBAAuB,CAAA;AAEzF;;;GAGG;AACH,qBAAa,iBAAkB,SAAQ,QAAQ,CAAC,qBAAqB,CAAC;gBACxD,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,IAAI,GAAE,qBAA+C;CAGpG;AAED,MAAM,WAAW,wBAAyB,SAAQ,iBAAiB;IACjE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,IAAI,CAAA;CACjB;AAED,qBAAa,iBAAiB;IAC5B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAY;IAChC,OAAO,CAAC,SAAS,CAAmC;gBAExC,OAAO,GAAE,wBAA6B;IAK5C,IAAI,IAAI,OAAO,CAAC,YAAY,CAAC;IAoB7B,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAK1C,KAAK,IAAI,OAAO,CAAC,YAAY,CAAC;IAM9B,MAAM,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,YAAY,GAAG,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;CAkB5F"}
|