Working with Integrations

Integrations are crucial to the Kosmoy platform, as they connect Kosmoy Studio to external providers, enabling you to leverage their services within your applications. Specifically, integrations allow you to register models from third-party providers (such as OpenAI, Google, or AWS), register communication channels (such as WhatsApp via Twilio), configure access to object storage services (Such as Amazon S3, Azure Blob Storage or Google Cloud Storage), and more. This section guides you through creating, updating, and removing integrations, with a focus on the different types of providers and their specific handling.

Provider Types: Single-Service vs. Multi-Service

It’s important to understand that providers can be categorized as either single-service or multi-service:

  • Single-Service Providers: These providers offer a single core service. Examples include OpenAI, Anthropic, and Twilio. When you create an integration with a single-service provider, the integration is directly tied to that specific service.
  • Multi-Service Providers: These providers offer multiple distinct services. Examples include AWS, Azure, and Google. When you create an integration with a multi-service provider, you can selectively enable or disable individual services within that integration.

This distinction is crucial for understanding the editing and deletion rules for integrations.

Creating an Integration

  1. Navigate to Integrations: From the Kosmoy Studio home page, click on the “Integrations” menu in the left-hand navigation bar.

  2. Add a New Integration: Click the ”+ ADD” button located in the upper right corner of the Integrations section.

  3. Select a Provider: In the “Add Integration” workflow, choose a provider from the dropdown menu. Supported providers include:

    • OpenAI
    • Google
    • Azure
    • Twilio
    • Anthropic
    • AWS
    • OpenRouter
  4. Provide Credentials: Enter the required credentials for the selected provider. This typically includes API keys, but some providers may require additional parameters.

    • Note: For multi-service providers like AWS, Azure, and Google, you will also need to select the specific services you want to enable access to (e.g., S3 and Amazon Bedrock for AWS). Each service will have a dedicated panel with a toggle to turn it on or off, as well as fields for service-specific parameters.
  5. Click “Next”: Proceed to the next step.

  6. Name and Describe the Integration: Give your integration a unique name and an optional description.

  7. Click “Review”: Review the integration details.

  8. Click “Create”: Create the integration.

Integration Cards

The Integrations section displays each created integration as a card. Each card shows:

  • Provider Logo: The logo of the integrated provider is displayed in the upper left-hand corner.
  • Integration Name: The name you assigned to the integration.
  • Description: The description you provided for the integration.
  • Edit Icon (Pencil): Click this icon to update the integration.
  • Delete Icon (Trash Bin): Click this icon to remove the integration.

Editing an Integration

The editing rules for an integration depend on whether it’s associated with a single-service or multi-service provider:

Single-Service Providers

You cannot edit an integration with a single-service provider if it is currently referenced by any other entity within Kosmoy Studio (e.g., Models, Communication Channels, Data Sources). You will be prevented from making changes, and a warning banner will be displayed at the top of the screen if you attempt to edit an in-use integration.

Multi-Service Providers

For multi-service providers, you can edit parameters or enable/disable services that are not currently in use.

  • Editing Parameters: You can freely modify the parameters of any service that is not currently in use.
  • Enabling/Disabling Services: You can enable new services or disable services that are not currently in use.
  • In-Use Services: You cannot edit parameters or disable services that are currently referenced by other entities. A warning banner will be displayed at the top of the panel for each in-use service, indicating that it cannot be modified.

To edit an integration:

  1. Navigate to Integrations: From the Kosmoy Studio home page, click on the “Integrations” icon in the left-hand navigation bar.
  2. Locate the Integration Card: Find the card for the integration you want to update.
  3. Click the Edit (Pencil) Icon: This will open the update dialog.
  4. Modify Parameters (if allowed):
    • For single-service providers, you can only modify the name and description if the integration is not in use.
    • For multi-service providers, you can modify parameters or enable/disable services that are not in use.
  5. Click “Save”: Save the changes.

Note: If you need to update service-specific parameters of services that are currently in use, you must first ensure that no model or other component is referencing that service.

Removing an Integration

The deletion rules for an integration also depend on whether it’s associated with a single-service or multi-service provider:

Single-Service Providers

You cannot delete an integration with a single-service provider if it is currently referenced by any other entity within Kosmoy Studio. A modal will appear, preventing the deletion and explaining that the integration is in use if you attempt to delete an in-use integration.

Multi-Service Providers

You can only delete a multi-service provider integration if none of its services are in use. If any service is currently in use, you cannot delete the integration. A modal will appear, preventing the deletion and explaining that the integration is in use if you attempt to delete an in-use integration.

To remove an integration:

  1. Navigate to Integrations: From the Kosmoy Studio home page, click on the “Integrations” icon in the left-hand navigation bar.
  2. Locate the Integration Card: Find the card for the integration you want to remove.
  3. Click the Delete (Trash Bin) Icon: This will trigger a confirmation prompt.
  4. Confirm Deletion: Confirm that you want to delete the integration.

Warning: Deleting an integration is a permanent action and cannot be undone. Ensure that the integration is not in use (or, for multi-service providers, that none of its services are in use) before proceeding.