Manage connections

Connections make external models and data available inside your workspace. Use Connections to manage the LLM providers and databases available to your workspace.


Prerequisites and permissions

You need:

  • A Klu account and membership in the workspace.
  • Credentials for the service you want to connect.
  • Network access from Klu to a database endpoint when you add a database.

Connection changes affect the whole workspace. Coordinate credential rotation and deletion with anyone who uses the related Actions, Context, Skills, or Workflows.


Connect an LLM provider

Open LLM Providers in the workspace navigation. The page header is Connections, and the selected tab is LLM Providers.

  1. Select Add LLM.
  2. In Add LLM Provider, choose a Provider.
  3. Enter Your API Key when the provider requires one.
  4. Complete any provider-specific fields:
    • URL for Azure OpenAI, GCP Vertex, Azure AI Endpoint, and API Endpoint.
    • Model name (or version) for Replicate, Hugging Face Hub, Google PaLM, Azure AI Endpoint, and API Endpoint.
    • AWS credentials and region for Amazon Bedrock.
    • Account ID for Cloudflare AI.
    • Credentials JSON for GCP Vertex.
  5. Expand Additional settings and enter Name (Optional) when you need to distinguish multiple accounts or endpoints for the same provider.
  6. Select Validate. Klu saves the connection after successful validation. The Klu provider shows Save directly; Amazon Bedrock and API Endpoint allow validation without a value in Your API Key.

The providers available to you depend on your workspace configuration. Use the provider list shown in Add LLM Provider.

After Klu saves the connection, it appears in the LLM Providers table.

Choose defaults and update credentials

  • Use Default LLM Provider to choose the workspace default.
  • Use the model selector in the Default Model column to set a default model for an individual provider.
  • Select a non-Klu provider name to open its details.
  • Select Add Key when a Klu-provided provider entry needs your own key.

Validation failures leave the connection unsaved and display the provider error. Check the key, endpoint URL, model name, and provider-specific metadata before trying again. A saved connection can still fail later if its credential is revoked, its endpoint becomes unreachable, or the selected model is unavailable.


Connect a database

In Connections, select the Databases tab. You can also open Database Connections from the command menu.

  1. Select Add Database Connection.
  2. Choose a Database Type.
  3. Enter a recognizable Name, such as Production analytics.
  4. Enter every connection field shown for that database.
  5. Select Save.

The visible form supports these connection types:

Database typeRequired connection fields
PostgreSQLConnection URL
MySQLConnection URL
RedisURI
MongoDBConnection string
SnowflakeUsername, password, account, and key
ElasticEndpoint, index, and field
PineconeAPI key, environment, and index name

The saved connection appears under Database Connections and becomes selectable by features such as database-backed Context and the SQL Query Skill.

Saving a database connection stores its configuration; the create form does not run a visible connection test. Use a supported database type for the feature you plan to use, and test the first dependent Context or Skill after saving the connection.

Database query limits

SQL Query Skills accept read-only queries, time out after 10 seconds, and return at most 100 rows. Other database sources may apply their own result limits.

Use a database credential that already has the least privileges needed for the intended reads. The runtime checks add another boundary, while database-side permissions remain authoritative.


Use connections from code

Create workspace API keys under SettingsAPI Keys before using an SDK. See API and SDK basics for installation and authentication.

The Python SDK can list and manage LLM provider records:

List LLM providers

import asyncio

from klu import Klu


async def main() -> None:
    klu = Klu("YOUR_API_KEY")
    providers = await klu.models.get_providers()
    for provider in providers:
        print(provider)


asyncio.run(main())

Database and third-party connections are managed in the Klu app. See the API and SDK documentation for the clients currently supported by Klu.