Skip to content
Closed
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 129 additions & 97 deletions adk/managing-integrations.mdx
Original file line number Diff line number Diff line change
@@ -1,163 +1,195 @@
---
title: Managing integrations
title: Managing Integrations
Comment thread
jacksonyzj marked this conversation as resolved.
Outdated
---

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 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

Comment thread
jacksonyzj marked this conversation as resolved.
Add an integration with a custom alias:
Browse all available integrations from the Botpress 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`:

```typescript
export default defineConfig({
// ... other config ...
dependencies: {
integrations: {
webchat: {
version: "webchat@latest",
enabled: true,
},
slack: {
version: "slack@0.5.0",
enabled: true,
},
},
},
});
```bash
adk info linear
```

After editing manually, run `adk dev` or `adk build` to regenerate types.
You can also filter the output:

## Integration versions
```bash
adk info linear --actions # Show only actions
adk info linear --events # Show only events
adk info linear --channels # Show only channels
```

Integration versions use the format `name@version`:
## Adding integrations

- `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
Add an integration using the `adk add` command:

<Tip>
Use `@latest` when you want to automatically receive updates. Use specific versions for production deployments to ensure stability.
</Tip>
```bash
adk add linear
```

## Enabling and disabling
```txt
✓ Added linear version 2.1.2 as linear to agent.config.ts dependencies

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>
Integrations are added as disabled by default. Enable and configure them in the Control Panel during `adk dev`.
Comment thread
jacksonyzj marked this conversation as resolved.
Outdated
</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

Comment thread
jacksonyzj marked this conversation as resolved.
Add an integration with a custom alias. This is useful when you need multiple instances of the same integration:

Please configure it in the UI using the adk dev command to start using it.
```bash
adk add webhook --alias webhook-orders
Comment thread
jacksonyzj marked this conversation as resolved.
Outdated
```

## Updating integrations
The alias is how you reference the integration in your code:

```typescript
import { actions } from "@botpress/runtime";

await actions["webhook-orders"].send({ url: "https://api.example.com/orders", data: payload });
```

### Workspace-scoped integrations

Add a private or custom integration from your workspace:

```bash
adk add my-workspace/custom-integration@1.0.0
```

## Configuring integrations

Integration settings (API keys, tokens, OAuth credentials) are managed in the Control Panel, not in `agent.config.ts`.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The 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. 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

Each integration card in the Control Panel shows its current status:

| Status | Meaning |
|--------|---------|
| Connected | Enabled, registered, and configured |
| Disabled | Turned off, can be enabled |
| Needs Action | Requires installation, configuration, or enabling |
| Failed | Registration error |

To update an integration:
## Listing installed integrations

### Using the CLI
View integrations currently installed in your project:

```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
```
adk upgrade <integration-name>

## Updating integrations

### Update a specific integration

```bash
adk upgrade linear
Comment thread
jacksonyzj marked this conversation as resolved.
```

### Manually
### Update all integrations interactively

You can also update the version it manually:
```bash
adk upgrade
```

1. Update the version in `agent.config.ts`:
```typescript
dependencies: {
integrations: {
webchat: {
version: "webchat@0.3.0",
enabled: true,
},
},
}
```
This shows available updates and lets you choose which to upgrade:

2. Run `adk dev` or `adk build` to regenerate types
```txt
✓ Upgraded:
• linear (2.0.0 → 2.1.2)

3. Test your agent to ensure compatibility
Run adk dev to install the updated integrations
```

## Removing integrations

### Using the CLI

Remove an integration using the `adk remove` command:
Remove an integration from your project:

```bash
adk remove <integration-name>
adk remove linear
```

```txt
✓ Removed linear from agent.config.ts dependencies
Run adk dev to update your project
```

### Manually
You can also run `adk remove` without a name to choose interactively.

You can also remove an integration by deleting it from `agent.config.ts`:
## Using integrations in code

Once an integration is installed and enabled, its actions become available in your agent:

```typescript
dependencies: {
integrations: {
webchat: {
version: "webchat@latest",
enabled: true,
},
// Removed slack integration
},
}
import { actions } from "@botpress/runtime";

// Call an integration action
await actions.linear.createIssue({
title: "Bug report from user",
teamId: "TEAM-123",
});
```

Run `adk dev` or `adk build` to update generated types.
Integration events can be subscribed to in [Triggers](/adk/concepts/triggers) and [Conversations](/adk/concepts/conversations) (via the `events` prop).
Comment thread
jacksonyzj marked this conversation as resolved.
Outdated

<Tip>
Always test your agent after adding, updating, or removing integrations to ensure everything works correctly.
Run `adk info <integration>` to see all available actions and events for an integration.
</Tip>

Loading