diff --git a/adk/advanced/hitl.mdx b/adk/advanced/hitl.mdx index a67867c1..afce21d5 100644 --- a/adk/advanced/hitl.mdx +++ b/adk/advanced/hitl.mdx @@ -7,11 +7,11 @@ description: Escalate conversations to live human agents. This covers the HITL integration and plugin, which connects your agent to external helpdesk platforms (Zendesk, Intercom, etc.). This is separate from integrating your ADK agent with [Botpress Desk](/desk/introduction). -HITL (Human-in-the-Loop) lets your agent hand off a conversation to a live human agent. This is powered by two dependencies working together: the **HITL integration** (provides the transport to a helpdesk or agent platform) and the **HITL plugin** (provides the actions your code calls). +HITL (Human-in-the-Loop) lets your agent hand off a conversation to a live human agent. It's powered by two dependencies working together: the **HITL integration** (the transport to a helpdesk or agent platform) and the **HITL plugin** (the actions your code calls). -## Setup +## Add HITL to your agent -Add both the integration and plugin to `agent.config.ts`: +Add both the integration and the plugin to `agent.config.ts`. The plugin's `dependencies` block points at the integration by alias: ```typescript import { defineConfig } from "@botpress/runtime" @@ -26,9 +26,9 @@ export default defineConfig({ dependencies: { integrations: { - chat: { version: "chat@0.7.3", enabled: true }, - webchat: { version: "webchat@0.3.0", enabled: true }, - hitl: { version: "hitl@2.0.2", enabled: true }, + chat: "chat@1.0.0", + webchat: "webchat@0.3.0", + hitl: "hitl@2.0.2", }, plugins: { @@ -46,44 +46,13 @@ export default defineConfig({ }) ``` -### How the plugin wiring works +`integrationAlias` must match a key in `dependencies.integrations`. The ADK validates this at build time, so a typo here fails fast. `integrationInterfaceAlias` tells the plugin which interface entity the integration implements (`hitlSession` for the generic HITL integration, `hitlTicket` for Zendesk, and so on). -The `plugins` block connects the plugin to the integration: +The HITL plugin also accepts a top-level `config` object for plugin-wide behavior. See the HITL plugin's Hub listing for the full set of fields. -```typescript -plugins: { - hitl: { - version: "hitl@1.3.0", - dependencies: { - hitl: { - integrationAlias: "hitl", // Must match a key in dependencies.integrations - integrationInterfaceAlias: "hitl", - }, - }, - }, -}, -``` - -`integrationAlias` tells the plugin which installed integration to use. It must match a key in `dependencies.integrations`. The ADK validates this at build time. - -### Optional plugin config - -```typescript -plugins: { - hitl: { - version: "hitl@1.3.0", - config: { - flowOnHitlStopped: false, - useHumanAgentInfo: false, - }, - dependencies: { /* ... */ }, - }, -}, -``` +## Start a handoff -## Starting a handoff - -Import `plugins` from `@botpress/runtime` and call `startHitl`. All inputs are fully typed. +Import `plugins` from `@botpress/runtime` and call `startHitl` from a conversation handler. All inputs are typed against the plugin: ```typescript import { Conversation, plugins } from "@botpress/runtime" @@ -113,14 +82,34 @@ export default new Conversation({ }) ``` -## Using a different provider +The fields passed to `startHitl`: + +| Field | Description | +|-------|-------------| +| `title` | Short label shown to the human agent when the ticket opens | +| `description` | Longer context the human agent sees alongside the conversation | +| `conversationId` | The conversation to hand off (use `conversation.id` from the handler) | +| `userId` | The user initiating the handoff | +| `configurationOverrides` | Optional per-handoff overrides of the plugin config | + +Common override fields: + +| Field | Description | +|-------|-------------| +| `onHitlHandoffMessage` | Message sent to the user when the handoff begins | +| `userHitlCloseCommand` | Message text the user can send to close the session | +| `agentAssignedTimeoutSeconds` | How long to wait for a human agent to pick up before timing out | + +For the full set of override fields, see the HITL plugin's Hub listing. -The HITL plugin works with any integration that implements the HITL interface. To use Zendesk instead of the generic HITL integration, swap the integration and update the alias: +## Use a different provider + +The HITL plugin works with any integration that implements the HITL interface. To swap the generic HITL integration for Zendesk, change the integration and update the alias. `hitlTicket` replaces `hitlSession` because Zendesk implements the interface with tickets instead of sessions: ```typescript dependencies: { integrations: { - zendesk: { version: "zendesk@1.0.0", enabled: true }, + zendesk: "zendesk@1.0.0", }, plugins: { hitl: { @@ -136,22 +125,16 @@ dependencies: { }, ``` -The plugin doesn't care about the specific provider, only that it implements the HITL interface. +Your application code doesn't change. `plugins.hitl.actions.startHitl` works the same regardless of which integration is wired underneath. ## Deploy and test +Run `adk deploy` to push the agent to Botpress Cloud. See the [CLI reference](/adk/cli-reference#adk-deploy) for all deploy flags: + ```bash adk deploy ``` - HITL does not work in dev mode because conversations don't exist on the dev bot. You must deploy and test on the production bot. + HITL only works against a deployed bot. `adk dev` downloads the plugin into `bp_modules/` and generates types, but handoffs need the integration's real connection to your helpdesk, which is configured on the production bot. - -When you run `adk dev`, the ADK downloads the plugin, installs it into `bp_modules/`, and generates TypeScript types. But testing the actual handoff requires a deployed bot. - ---- - - - All commands and flags available with the ADK CLI. - diff --git a/adk/ai-native/skills.mdx b/adk/ai-native/skills.mdx index 57e96b8b..5379036f 100644 --- a/adk/ai-native/skills.mdx +++ b/adk/ai-native/skills.mdx @@ -3,19 +3,19 @@ title: Skills description: Give AI coding assistants deep ADK knowledge with installable skills. --- -Skills are packaged instructions and documentation that teach AI coding assistants how to build with the ADK. When installed, your assistant (Claude Code, Cursor, Codex) automatically uses them when you ask it to build features, debug issues, write evals, or connect integrations. - -Skills are packaged with every new ADK project. When you run `adk init`, skills are installed automatically alongside your dependencies. +Skills are packaged instructions and documentation that teach AI coding assistants how to build with the ADK. When installed, assistants like Claude Code, Cursor, and Codex use them automatically when you ask them to build features, debug issues, write evals, or connect integrations. `adk init` installs them for you alongside your dependencies, so most projects get them out of the box. ## Manual installation -If you need to install skills in an existing project or reinstall them: +If you need to install skills in an existing project or reinstall them, run the same command `adk init` runs: ```bash -npx skills add botpress/skills -s '*' -a claude-code codex -y +npx skills add botpress/skills -s '*' -a codex claude-code -y ``` -Install a single skill: +Use `bunx` instead of `npx` if your project has a `bun.lockb`. + +To install a single skill instead of all of them: ```bash npx skills add botpress/skills --skill adk @@ -58,15 +58,17 @@ Skills come with slash commands for Claude Code. Type the command instead of des ## MCP server -The ADK also includes an MCP (Model Context Protocol) server that gives assistants live access to your running project. It provides tools for querying traces, searching integrations, sending test messages, and starting workflows. +Skills are the recommended way to give AI assistants ADK knowledge. The ADK also ships an MCP (Model Context Protocol) server that gives assistants live access to your running project, kept here for reference. -Generate the MCP configuration: +Generate the MCP configuration files: ```bash adk mcp:init --all ``` -This creates config files for Claude Code (`.mcp.json`), VS Code (`.vscode/mcp.json`), and Cursor (`.cursor/mcp.json`). +This writes config for Claude Code (`.mcp.json`), VS Code (`.vscode/mcp.json`), and Cursor (`.cursor/mcp.json`). See [`adk mcp:init`](/adk/cli-reference#adk-mcpinit) for all flags. + +The server exposes these tools: | Tool | What it does | |------|-------------| @@ -79,9 +81,4 @@ This creates config files for Claude Code (`.mcp.json`), VS Code (`.vscode/mcp.j | `adk_get_dev_logs` | Get dev server logs and errors | | `adk_list_workflows` | List available workflows | | `adk_start_workflow` | Start a workflow or get its input schema | - ---- - - - Escalate conversations to live human agents. - +| `adk_init_project` | Scaffold a new ADK project (only available outside an ADK project) | diff --git a/adk/assets/actions-console-dark.png b/adk/assets/actions-console-dark.png index 97584ea7..9f18cb44 100644 Binary files a/adk/assets/actions-console-dark.png and b/adk/assets/actions-console-dark.png differ diff --git a/adk/assets/actions-console.png b/adk/assets/actions-console.png index 97584ea7..925251ae 100644 Binary files a/adk/assets/actions-console.png and b/adk/assets/actions-console.png differ diff --git a/adk/assets/agent-steps-dark.png b/adk/assets/agent-steps-dark.png index 97584ea7..fee4fde3 100644 Binary files a/adk/assets/agent-steps-dark.png and b/adk/assets/agent-steps-dark.png differ diff --git a/adk/assets/agent-steps.png b/adk/assets/agent-steps.png index 97584ea7..470ab5a0 100644 Binary files a/adk/assets/agent-steps.png and b/adk/assets/agent-steps.png differ diff --git a/adk/assets/config-variables-console-dark.png b/adk/assets/config-variables-console-dark.png index 97584ea7..844d3307 100644 Binary files a/adk/assets/config-variables-console-dark.png and b/adk/assets/config-variables-console-dark.png differ diff --git a/adk/assets/config-variables-console.png b/adk/assets/config-variables-console.png index 97584ea7..f9685757 100644 Binary files a/adk/assets/config-variables-console.png and b/adk/assets/config-variables-console.png differ diff --git a/adk/assets/environment-selector-dark.png b/adk/assets/environment-selector-dark.png index 97584ea7..90ae5e50 100644 Binary files a/adk/assets/environment-selector-dark.png and b/adk/assets/environment-selector-dark.png differ diff --git a/adk/assets/environment-selector.png b/adk/assets/environment-selector.png index 97584ea7..93326e38 100644 Binary files a/adk/assets/environment-selector.png and b/adk/assets/environment-selector.png differ diff --git a/adk/assets/evals-console-dark.png b/adk/assets/evals-console-dark.png index 97584ea7..eef06434 100644 Binary files a/adk/assets/evals-console-dark.png and b/adk/assets/evals-console-dark.png differ diff --git a/adk/assets/evals-console.png b/adk/assets/evals-console.png index 97584ea7..a366230c 100644 Binary files a/adk/assets/evals-console.png and b/adk/assets/evals-console.png differ diff --git a/adk/assets/integration-config-console-dark.png b/adk/assets/integration-config-console-dark.png index 97584ea7..4103b9f1 100644 Binary files a/adk/assets/integration-config-console-dark.png and b/adk/assets/integration-config-console-dark.png differ diff --git a/adk/assets/integration-config-console.png b/adk/assets/integration-config-console.png index 97584ea7..72d598a6 100644 Binary files a/adk/assets/integration-config-console.png and b/adk/assets/integration-config-console.png differ diff --git a/adk/assets/integrations-console-dark.png b/adk/assets/integrations-console-dark.png index 97584ea7..9de8bc06 100644 Binary files a/adk/assets/integrations-console-dark.png and b/adk/assets/integrations-console-dark.png differ diff --git a/adk/assets/integrations-console.png b/adk/assets/integrations-console.png index 97584ea7..6fa808f3 100644 Binary files a/adk/assets/integrations-console.png and b/adk/assets/integrations-console.png differ diff --git a/adk/assets/knowledge-console-dark.png b/adk/assets/knowledge-console-dark.png index 97584ea7..843b0106 100644 Binary files a/adk/assets/knowledge-console-dark.png and b/adk/assets/knowledge-console-dark.png differ diff --git a/adk/assets/knowledge-console.png b/adk/assets/knowledge-console.png index 97584ea7..bd53f5e5 100644 Binary files a/adk/assets/knowledge-console.png and b/adk/assets/knowledge-console.png differ diff --git a/adk/assets/logs-view-dark.png b/adk/assets/logs-view-dark.png index 97584ea7..b1f6bf14 100644 Binary files a/adk/assets/logs-view-dark.png and b/adk/assets/logs-view-dark.png differ diff --git a/adk/assets/logs-view.png b/adk/assets/logs-view.png index 97584ea7..81b890da 100644 Binary files a/adk/assets/logs-view.png and b/adk/assets/logs-view.png differ diff --git a/adk/assets/quickstart-dark.png b/adk/assets/quickstart-dark.png index a4a3ea05..f0de5b90 100644 Binary files a/adk/assets/quickstart-dark.png and b/adk/assets/quickstart-dark.png differ diff --git a/adk/assets/quickstart.png b/adk/assets/quickstart.png index 97584ea7..51b67ffe 100644 Binary files a/adk/assets/quickstart.png and b/adk/assets/quickstart.png differ diff --git a/adk/assets/secrets-console-dark.png b/adk/assets/secrets-console-dark.png index 97584ea7..0198132d 100644 Binary files a/adk/assets/secrets-console-dark.png and b/adk/assets/secrets-console-dark.png differ diff --git a/adk/assets/secrets-console.png b/adk/assets/secrets-console.png index 97584ea7..b3b45b40 100644 Binary files a/adk/assets/secrets-console.png and b/adk/assets/secrets-console.png differ diff --git a/adk/assets/tables-console-dark.png b/adk/assets/tables-console-dark.png index 97584ea7..49fa1074 100644 Binary files a/adk/assets/tables-console-dark.png and b/adk/assets/tables-console-dark.png differ diff --git a/adk/assets/tables-console.png b/adk/assets/tables-console.png index 97584ea7..b3cbcdc8 100644 Binary files a/adk/assets/tables-console.png and b/adk/assets/tables-console.png differ diff --git a/adk/assets/traces-view-dark.png b/adk/assets/traces-view-dark.png index 97584ea7..ee698cc2 100644 Binary files a/adk/assets/traces-view-dark.png and b/adk/assets/traces-view-dark.png differ diff --git a/adk/assets/traces-view.png b/adk/assets/traces-view.png index 97584ea7..4874a360 100644 Binary files a/adk/assets/traces-view.png and b/adk/assets/traces-view.png differ diff --git a/adk/assets/triggers-console-dark.png b/adk/assets/triggers-console-dark.png index 97584ea7..d09b6b3e 100644 Binary files a/adk/assets/triggers-console-dark.png and b/adk/assets/triggers-console-dark.png differ diff --git a/adk/assets/triggers-console.png b/adk/assets/triggers-console.png index 97584ea7..4694af91 100644 Binary files a/adk/assets/triggers-console.png and b/adk/assets/triggers-console.png differ diff --git a/adk/assets/welcome-dark.png b/adk/assets/welcome-dark.png index eca93562..bc5ed623 100644 Binary files a/adk/assets/welcome-dark.png and b/adk/assets/welcome-dark.png differ diff --git a/adk/assets/welcome.png b/adk/assets/welcome.png index e5fe372e..8b0741ad 100644 Binary files a/adk/assets/welcome.png and b/adk/assets/welcome.png differ diff --git a/adk/assets/workflows-console-dark.png b/adk/assets/workflows-console-dark.png index 97584ea7..745b137a 100644 Binary files a/adk/assets/workflows-console-dark.png and b/adk/assets/workflows-console-dark.png differ diff --git a/adk/assets/workflows-console.png b/adk/assets/workflows-console.png index 97584ea7..196d0948 100644 Binary files a/adk/assets/workflows-console.png and b/adk/assets/workflows-console.png differ diff --git a/adk/cli-reference.mdx b/adk/cli-reference.mdx index 9cb2af21..a9987052 100644 --- a/adk/cli-reference.mdx +++ b/adk/cli-reference.mdx @@ -1,20 +1,27 @@ --- -title: CLI Reference +title: CLI reference description: All commands and flags available with the ADK CLI. --- +The `adk` CLI is how you scaffold, run, deploy, and debug ADK agents. Run `adk --help` for the top-level command list, or `adk --help` for flags on a specific command. + ## Global flags +These flags work with every command: + | Flag | Description | |------|-------------| | `--help`, `-h` | Show help information | | `--version`, `-V` | Show version number | | `--no-cache` | Disable caching for integration lookups | +| `--profile ` | Credentials profile to use (overrides the `ADK_PROFILE` env var and the current profile) | -All commands support `--format json` for machine-readable output unless noted otherwise. +Most commands also accept `--format json` for machine-readable output. The following commands don't: `dev`, `login`, `profiles list`, `profiles set`, `upgrade`, `remove`, `self-upgrade`, `telemetry`, `theme`, `mcp`, `mcp:init`, `run`, `assets pull`. ## Project +These commands manage an agent project from scaffold to deploy: + | Command | Description | |---------|-------------| | `adk init [name]` | Initialize a new project | @@ -27,6 +34,8 @@ All commands support `--format json` for machine-readable output unless noted ot ### adk init +Scaffold a new agent project. Pass a name, or omit it to be prompted: + ```bash adk init my-agent adk init my-agent --template hello-world @@ -35,13 +44,15 @@ adk init --list-templates | Flag | Description | |------|-------------| -| `-t, --template