# Platform Connections

Connect your AI agents to external platforms and services.

![Platform Connections](/files/U5oGwV5wqQGBaFp2FUO8)

## Overview

Platform Connections allow you to integrate your AI agents with external platforms and services such as Discord, Telegram, Slack, webhooks, and more. Manage connections, credentials, and configurations in one centralized location.

## Platform Connections Dashboard

The dashboard displays key metrics at a glance:

**Summary Cards**:

* **Total Connections**: Total number of platform connections configured
* **Connected**: Number of connections currently active and working
* **Error**: Number of connections experiencing errors

## Connection List View

The connections table shows all platform connections with the following information:

**Columns**:

* **Connection**: Connection name and description
* **Platform**: Platform type with icon (Webhook, Telegram, Teams, Discord, Slack)
* **Status**: Current status (Active, Connected, Disconnected, Error)
* **Agents**: Number of agents using this connection
* **Last Connected**: Last connection time
* **Enabled**: Enable/disable toggle
* **Actions**: Quick actions menu

**Filtering and Search**:

* Search by connection name
* Filter by Platform (Webhook, Telegram, Slack, Discord, Teams, etc.)
* Filter by Status (Active, Connected, Disconnected, Error)

## Creating a Platform Connection

Navigate to **Agent Configuration** → **Platform Connections** → Click **Create**

![Create Platform Connection](/files/BWZxdWesEFVUkkZA25XO)

### Basic Information

**Connection Name**\* (Required)

* A descriptive name for this connection
* Example: `Analytics Webhook`
* Helper text: "A descriptive name for this connection"

**Platform**\* (Required)

* Select platform from dropdown: Webhook, Discord, Telegram, Slack, Teams, etc.
* Helper text: "Platform to connect to"

**Description**

* Optional description
* Example: "Custom webhook for analytics and monitoring"
* Helper text: "Optional description"

**Enabled**

* Checkbox to enable/disable the connection
* Default: Unchecked

### Discord Configuration

Expandable section for Discord-specific settings.

**Bot Token**\* (Required)

* Discord bot token
* Helper text: "Discord bot token"

**Guild ID**

* Discord server (guild) ID
* Helper text: "Discord server (guild) ID"

**Client ID**

* Discord application client ID
* Helper text: "Discord application client ID"

### Telegram Configuration

Expandable section for Telegram-specific settings.

**Bot Token**\* (Required)

* Telegram bot token
* Helper text: "Telegram bot token"

**Chat ID**

* Telegram chat/channel ID
* Helper text: "Telegram chat/channel ID"

### Slack Configuration

Expandable section for Slack-specific settings.

**Bot Token**\* (Required)

* Slack bot token
* Helper text: "Slack bot token"

**App Token**

* Slack app-level token
* Helper text: "Slack app-level token"

**Signing Secret**

* Slack signing secret for request verification
* Helper text: "Slack signing secret for request verification"

**Channel ID**

* Slack channel ID
* Helper text: "Slack channel ID"

### Webhook Configuration

Expandable section for Webhook-specific settings.

**Webhook URL**\* (Required)

* Webhook endpoint URL
* Example: `https://analytics.company.com/webhook/dp`
* Helper text: "Webhook endpoint URL"

**Webhook Secret**

* Secret key for webhook authentication
* Example: `webhook_secret_key_encrypted`
* Helper text: "Secret key for webhook authentication"

### Advanced Settings

Expandable section for advanced configuration options.

### Rate Limits

Expandable section for rate limiting configuration.

### Actions

* **Cancel**: Discard and close
* **Create Platform Connection**: Save the connection

## Viewing Connection Details

To view detailed information about a connection:

1. Navigate to **Agent Configuration** → **Platform Connections**
2. Click on a connection from the list
3. View comprehensive details in the modal dialog

![View Platform Connection](/files/aC5I6kXRL7kh6qwV9xxY)

**Details Panel Sections**:

**Basic Information**:

* **Connection Name**: e.g., "Analytics Webhook"
* **Platform**: Webhook, Discord, Telegram, Slack, Teams, etc.
* **Description**: Full description
* **Enabled**: Checkbox status

**Platform-Specific Configuration** (Expandable): All configuration fields are displayed in read-only mode based on the selected platform:

* Discord: Bot Token, Guild ID, Client ID
* Telegram: Bot Token, Chat ID
* Slack: Bot Token, App Token, Signing Secret, Channel ID
* Webhook: Webhook URL, Webhook Secret

**Advanced Settings** (Expandable): Additional configuration options if set.

**Rate Limits** (Expandable): Rate limiting configuration if set.

## Editing a Connection

To update a connection:

1. Open connection details page
2. Click **Edit** button (or three-dot menu → Edit)
3. Modify editable fields in the Edit Platform Connection modal

![Edit Platform Connection](/files/ScUl2yQncWqWvwrSxnvW)

4. Click **Update Platform Connection** to save changes

> \[!NOTE] The Edit form is identical to the Create/View form, but with an "Update Platform Connection" button.

**Editable Fields**:

* ✅ Connection Name
* ✅ Description
* ✅ Enabled (checkbox)
* ✅ All platform-specific configuration fields
* ✅ Advanced Settings
* ✅ Rate Limits
* ❌ Platform (cannot edit after creation)

## Supported Platforms

**Communication Platforms**:

* **Discord**: Bot integration for Discord servers
* **Telegram**: Bot integration for Telegram chats
* **Slack**: Bot integration for Slack workspaces
* **Microsoft Teams**: Integration for Teams channels

**Webhooks**:

* **Custom Webhooks**: HTTP endpoints for custom integrations
* **Outgoing Webhooks**: Send data to external services
* **Incoming Webhooks**: Receive data from external services

**Other Platforms**:

* Additional platforms may be available based on your configuration

## Connection Status

**Active** (Orange):

* Connection is configured but not yet connected
* Waiting for first connection

**Connected** (Green):

* Connection is active and working
* Successfully communicating with platform

**Disconnected** (Gray):

* Connection was previously active but is now disconnected
* May need reconfiguration or credential refresh

**Error** (Red):

* Connection has errors
* Check credentials and configuration
* Review error logs

## Managing Connections

### Enabling/Disabling Connections

To change connection status:

1. Toggle the **Enabled** switch in the list view, OR
2. Edit the connection and check/uncheck the **Enabled** checkbox

**Enabled**: Connection is active and available for agents **Disabled**: Connection is not available for use

### Testing Connections

To test a connection:

1. Open connection details
2. Click **Test Connection** button (if available)
3. Verify connection status

### Rotating Credentials

To update credentials:

1. Edit the connection
2. Update bot tokens, secrets, or API keys
3. Save changes
4. Test the connection

### Deleting a Connection

To remove a connection:

1. Navigate to connection details or list
2. Click **Delete** button
3. Confirm deletion

> \[!WARNING] Deleting a connection will affect any agents using it. Make sure to update agent configurations before deleting.

## Security Best Practices

**Credential Management**:

* Store credentials securely
* Rotate tokens regularly
* Use environment-specific credentials
* Never share credentials

**Access Control**:

* Grant minimum required permissions
* Use service accounts where possible
* Monitor access logs
* Audit connection usage

**Network Security**:

* Use HTTPS for webhooks
* Validate webhook signatures
* Implement rate limiting
* Monitor for suspicious activity

## Platform-Specific Guides

### Discord Setup

1. Create a Discord application at [Discord Developer Portal](https://discord.com/developers/applications)
2. Create a bot and copy the bot token
3. Copy the application client ID
4. Copy the server (guild) ID
5. Invite the bot to your server
6. Configure the connection in Kaisar AI Ops

### Telegram Setup

1. Create a bot using [@BotFather](https://t.me/botfather)
2. Copy the bot token
3. Get the chat ID (use [@userinfobot](https://t.me/userinfobot))
4. Configure the connection in Kaisar AI Ops

### Slack Setup

1. Create a Slack app at [Slack API](https://api.slack.com/apps)
2. Enable Socket Mode and get app-level token
3. Add bot token scopes
4. Install app to workspace
5. Copy bot token, app token, and signing secret
6. Get channel ID
7. Configure the connection in Kaisar AI Ops

### Webhook Setup

1. Set up an HTTP endpoint to receive webhooks
2. Implement signature verification
3. Copy the webhook URL
4. Generate a secret key
5. Configure the connection in Kaisar AI Ops

## Troubleshooting

**Connection Errors**:

* Verify credentials are correct
* Check platform API status
* Review error logs
* Test connection manually

**Authentication Issues**:

* Rotate credentials
* Check token expiration
* Verify permissions
* Update scopes if needed

**Rate Limiting**:

* Configure rate limits
* Monitor usage
* Implement backoff strategies
* Contact platform support if needed

## Next Steps

* Configure [Instructions](/kaisar-network/kaisar-ai-ops/agent-configuration/instructions.md) for platform-specific behavior
* Enable [Tools](/kaisar-network/kaisar-ai-ops/agent-configuration/tools.md) for platform interactions
* Define [Routes](/kaisar-network/kaisar-ai-ops/agent-configuration/routes.md) that use these connections
* Assign connections to agents in [Organization → Agents](/kaisar-network/kaisar-ai-ops/organization/agents.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kaisar.io/kaisar-network/kaisar-ai-ops/agent-configuration/platform-connections.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
