-
Notifications
You must be signed in to change notification settings - Fork 71
final audit of ADK docs #464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
fc8b1df
remove default expand
adkah 22537f7
align get started section
adkah 95a4146
audit configuration guide
adkah ceb76bc
quick fix to quickstart description
adkah ce64b70
audit environment setup guide
adkah 7be95f4
audit integrations
adkah 828d32a
audit conversations/setup
adkah 14b92a4
docs(adk): audit and polish ADK sections against source
jacksonyzj 7c115c6
audit ai execution guide
adkah bd96ad6
revert next steps sections
adkah 6994579
audit tools page
adkah bc98145
docs(adk): audit Handling longform logic, conversations, and setup se…
jacksonyzj d8fe2ce
Merge Adrian's ADK docs audit into final audit
jacksonyzj 329d34c
docs(adk): audit introduction and quickstart pages
jacksonyzj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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). | ||
| </Info> | ||
|
|
||
| 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: "[email protected]", enabled: true }, | ||
| hitl: { version: "[email protected]", enabled: true }, | ||
| chat: "chat@1.0.0", | ||
| webchat: "[email protected]", | ||
| hitl: "[email protected]", | ||
| }, | ||
|
|
||
| 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: "[email protected]", | ||
| dependencies: { | ||
| hitl: { | ||
| integrationAlias: "hitl", // Must match a key in dependencies.integrations | ||
| integrationInterfaceAlias: "hitl<hitlSession>", | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
| ``` | ||
|
|
||
| `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: "[email protected]", | ||
| 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: "[email protected]", enabled: true }, | ||
| zendesk: "[email protected]", | ||
| }, | ||
| 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 | ||
| ``` | ||
|
|
||
| <Warning> | ||
| 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. | ||
| </Warning> | ||
|
|
||
| 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. | ||
|
|
||
| --- | ||
|
|
||
| <Card title="CLI Reference" icon="terminal" href="/adk/cli-reference"> | ||
| All commands and flags available with the ADK CLI. | ||
| </Card> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [vale] reported by reviewdog 🐶
[Vale.Spelling] Did you really mean 'helpdesk'?