-
Notifications
You must be signed in to change notification settings - Fork 70
docs(adk): rewrite Managing Integrations page #451
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
Open
jacksonyzj
wants to merge
11
commits into
master
Choose a base branch
from
feat/adk-integrations-restructure
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+137
−98
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
e8460fd
docs(adk): rewrite integrations page for string shorthand and Control…
jacksonyzj 21af4a5
chore: trigger mintlify preview
jacksonyzj 74bf870
docs(adk): diversify integration examples across linear, notion, webhook
jacksonyzj 7472697
docs(adk): rename to Botpress Integration Hub
jacksonyzj a5bb285
docs(adk): add Control Panel integrations screenshot
jacksonyzj c6399c7
docs(adk): remove duplicate adk info tip
jacksonyzj bc50021
docs(adk): sentence case title, reword disabled note, active voice
jacksonyzj 854e237
docs(adk): add CLI reference link for command flags
jacksonyzj 2bb50dc
docs(adk): add note about built-in integration alias restriction
jacksonyzj db1af30
docs(adk): add light and dark mode integration screenshots
jacksonyzj 78ee07a
docs(adk): use valid TS identifier for alias, clarify alias key in list
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
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.
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 |
|---|---|---|
|
|
@@ -2,162 +2,201 @@ | |
| title: Managing integrations | ||
| --- | ||
|
|
||
| Integrations connect your agent to external services and platforms. This guide covers how to add, configure, and manage integrations in your ADK project. | ||
| Integrations connect your agent to external services and platforms. This guide covers how to find, add, configure, and manage integrations in your ADK project. | ||
|
|
||
| ## Adding integrations | ||
| ## Finding integrations | ||
|
|
||
| ### Using the CLI | ||
| ### Search the Botpress Integration Hub | ||
|
|
||
| Add an integration using the `adk add` command: | ||
| Search for integrations by keyword: | ||
|
|
||
| ```bash | ||
| adk add webchat | ||
| adk add slack@latest | ||
| adk add my-workspace/custom-integration@1.0.0 | ||
| adk search crm | ||
| ``` | ||
|
|
||
| ### Using an alias | ||
| ### List available integrations | ||
|
|
||
| Add an integration with a custom alias: | ||
| Browse all available integrations from the Botpress Integration Hub: | ||
|
|
||
| ```bash | ||
| adk add webchat --alias custom-webchat | ||
| adk list --available | ||
| ``` | ||
|
|
||
| This automatically: | ||
| - Adds the integration to `agent.config.ts` | ||
| - Generates TypeScript types for the integration | ||
| ### View integration details | ||
|
|
||
| ### Manual configuration | ||
| Get detailed information about a specific integration, including its actions, events, and channels: | ||
|
|
||
| You can also manually edit `agent.config.ts`: | ||
| ```bash | ||
| adk info linear | ||
| ``` | ||
|
|
||
| ```typescript | ||
| export default defineConfig({ | ||
| // ... other config ... | ||
| dependencies: { | ||
| integrations: { | ||
| webchat: { | ||
| version: "webchat@latest", | ||
| enabled: true, | ||
| }, | ||
| slack: { | ||
| version: "slack@0.5.0", | ||
| enabled: true, | ||
| }, | ||
| }, | ||
| }, | ||
| }); | ||
| You can also filter the output: | ||
|
|
||
| ```bash | ||
| adk info linear --actions # Show only actions | ||
| adk info linear --events # Show only events | ||
| adk info linear --channels # Show only channels | ||
| ``` | ||
|
|
||
| After editing manually, run `adk dev` or `adk build` to regenerate types. | ||
| See the [CLI reference](/adk/cli-reference) for all available flags and options. | ||
|
|
||
| ## Integration versions | ||
| ## Adding integrations | ||
|
|
||
| Integration versions use the format `name@version`: | ||
| Add an integration using the `adk add` command: | ||
|
|
||
| - `webchat@latest` - Use the latest version | ||
| - `slack@0.5.0` - Use a specific version | ||
| - `my-workspace/custom@1.2.3` - Use an integration from a specific workspace | ||
| ```bash | ||
| adk add linear | ||
| ``` | ||
|
|
||
| <Tip> | ||
| Use `@latest` when you want to automatically receive updates. Use specific versions for production deployments to ensure stability. | ||
| </Tip> | ||
| ```txt | ||
| ✓ Added linear version 2.1.2 as linear to agent.config.ts dependencies | ||
|
|
||
| ## Enabling and disabling | ||
| Added as disabled. Enable and configure it in the Control Panel. | ||
| ``` | ||
|
|
||
| Control which integrations are active: | ||
| This adds the integration to your `agent.config.ts` as a string shorthand: | ||
|
|
||
| ```typescript | ||
| dependencies: { | ||
| integrations: { | ||
| webchat: { | ||
| version: "webchat@latest", | ||
| enabled: true, | ||
| }, | ||
| slack: { | ||
| version: "slack@latest", | ||
| enabled: false, | ||
| }, | ||
| chat: "chat@0.7.7", | ||
| webchat: "webchat@0.3.0", | ||
| linear: "linear@2.1.2", | ||
| }, | ||
| } | ||
| }, | ||
| ``` | ||
|
|
||
| Disabled integrations are still included in your project but won't be active when your agent runs. | ||
| <Note> | ||
| Newly added integrations are disabled by default. Enable and configure them in the Control Panel during `adk dev`. | ||
| </Note> | ||
|
|
||
| ## Integration configuration | ||
| ### Pinning a version | ||
|
|
||
| If you install an integration that requires configuration, you'll receive a message instructing you to configure it: | ||
| Add a specific version instead of the latest: | ||
|
|
||
| ```bash | ||
| adk add instagram | ||
| adk add notion@3.0.0 | ||
| ``` | ||
|
|
||
| ```text | ||
| ✓ Added instagram version x.x.x to agent.config.ts | ||
| ### Using an alias | ||
|
|
||
jacksonyzj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Please configure it in the UI using the adk dev command to start using it. | ||
| ``` | ||
| Add an integration with a custom alias. This is useful when you need multiple instances of the same integration: | ||
|
|
||
| ## Updating integrations | ||
| ```bash | ||
| adk add webhook --alias webhookOrders | ||
| ``` | ||
|
|
||
| To update an integration: | ||
| The alias is how you reference the integration in your code: | ||
|
|
||
| ### Using the CLI | ||
| ```typescript | ||
| import { actions } from "@botpress/runtime"; | ||
|
|
||
| await actions.webhookOrders.send({ url: "https://api.example.com/orders", data: payload }); | ||
| ``` | ||
| adk upgrade <integration-name> | ||
|
|
||
| <Note> | ||
| Avoid aliasing built-in channel integrations (webchat, chat, slack, teams, telegram, whatsapp). The runtime uses the alias to identify these integrations, and a custom alias will prevent default message components from loading. | ||
| </Note> | ||
|
|
||
| ### Workspace-scoped integrations | ||
|
|
||
| Add a private or custom integration from your workspace: | ||
|
|
||
| ```bash | ||
| adk add my-workspace/custom-integration@1.0.0 | ||
| ``` | ||
|
|
||
| ### Manually | ||
| ## Configuring integrations | ||
|
|
||
| You can also update the version it manually: | ||
| Integration settings (API keys, tokens, OAuth credentials) are managed in the Control Panel, not in `agent.config.ts`. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: I think it's worth it to explicitly mention that this is behaviour that changed from before and add a walkthrough of the migration steps in the CLI (the modal that pops up and asks users to switch to the new format) |
||
|
|
||
| 1. Update the version in `agent.config.ts`: | ||
| ```typescript | ||
| dependencies: { | ||
| integrations: { | ||
| webchat: { | ||
| version: "webchat@0.3.0", | ||
| enabled: true, | ||
| }, | ||
| }, | ||
| } | ||
| ``` | ||
| 1. Run `adk dev` to start the development server | ||
| 2. Open the Control Panel at `http://localhost:3001/integrations` | ||
| 3. Find the integration and click to configure it | ||
| 4. Enter the required settings and enable it | ||
|
|
||
| 2. Run `adk dev` or `adk build` to regenerate types | ||
| <Frame> | ||
jacksonyzj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| <img alt="Integrations in the Control Panel" className="block dark:hidden" src="./assets/adk-integration-page.png" /> | ||
| <img alt="Integrations in the Control Panel" className="hidden dark:block" src="./assets/adk-integration-page-dark.png" /> | ||
| </Frame> | ||
|
|
||
| 3. Test your agent to ensure compatibility | ||
| Each integration card in the Control Panel shows its current status: | ||
|
|
||
| ## Removing integrations | ||
| | Status | Meaning | | ||
| |--------|---------| | ||
| | Connected | Enabled, registered, and configured | | ||
| | Disabled | Turned off, can be enabled | | ||
| | Needs Action | Requires installation, configuration, or enabling | | ||
| | Failed | Registration error | | ||
|
|
||
| ## Listing installed integrations | ||
|
|
||
| ### Using the CLI | ||
| View integrations currently installed in your project. The **Alias** column shows the key you use to reference each integration in your code: | ||
|
|
||
| Remove an integration using the `adk remove` command: | ||
| ```bash | ||
| adk list | ||
| ``` | ||
|
|
||
| ```txt | ||
| Installed Integrations (3) | ||
|
|
||
| Alias Name Version | ||
| ─────────────────────────────────────────────────────────────── | ||
| chat chat 0.7.7 | ||
| webchat webchat 0.3.0 | ||
| linear linear 2.1.2 | ||
| ``` | ||
|
|
||
| ## Updating integrations | ||
|
|
||
| ### Update a specific integration | ||
|
|
||
| ```bash | ||
| adk remove <integration-name> | ||
| adk upgrade linear | ||
jacksonyzj marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ``` | ||
|
|
||
| ### Manually | ||
| ### Update all integrations interactively | ||
|
|
||
| You can also remove an integration by deleting it from `agent.config.ts`: | ||
| ```bash | ||
| adk upgrade | ||
| ``` | ||
|
|
||
| ```typescript | ||
| dependencies: { | ||
| integrations: { | ||
| webchat: { | ||
| version: "webchat@latest", | ||
| enabled: true, | ||
| }, | ||
| // Removed slack integration | ||
| }, | ||
| } | ||
| This shows available updates and lets you choose which to upgrade: | ||
|
|
||
| ```txt | ||
| ✓ Upgraded: | ||
| • linear (2.0.0 → 2.1.2) | ||
|
|
||
| Run adk dev to install the updated integrations | ||
| ``` | ||
|
|
||
| ## Removing integrations | ||
|
|
||
| Remove an integration from your project: | ||
|
|
||
| ```bash | ||
| adk remove linear | ||
| ``` | ||
|
|
||
| Run `adk dev` or `adk build` to update generated types. | ||
| ```txt | ||
| ✓ Removed linear from agent.config.ts dependencies | ||
| Run adk dev to update your project | ||
| ``` | ||
|
|
||
| <Tip> | ||
| Always test your agent after adding, updating, or removing integrations to ensure everything works correctly. | ||
| </Tip> | ||
| You can also run `adk remove` without a name to choose interactively. | ||
|
|
||
| ## Using integrations in code | ||
|
|
||
| Once an integration is installed and enabled, its actions become available in your agent: | ||
|
|
||
| ```typescript | ||
| import { actions } from "@botpress/runtime"; | ||
|
|
||
| // Call an integration action | ||
| await actions.linear.createIssue({ | ||
| title: "Bug report from user", | ||
| teamId: "TEAM-123", | ||
| }); | ||
| ``` | ||
|
|
||
| You can subscribe to integration events in [Triggers](/adk/concepts/triggers) and [Conversations](/adk/concepts/conversations) (via the `events` prop). | ||
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.
Uh oh!
There was an error while loading. Please reload this page.