Skip to content

Connections (BYOK)

A connection is one bring-your-own-key (BYOK) binding: a credential, a model allow-list, and a policy. Connections are the single credential vault the whole platform uses — for LLM inference and for integrations.

What a connection holds

  • Provider — for inference: openai, anthropic, openrouter, bedrock, google, xai. For non-LLM integration surfaces the provider list widens to mail, http, postgres, mcp, websearch, smartfetch.
  • Credential — encrypted at rest with AES-256-GCM. The API only ever returns the last four characters and a status; the plaintext is never exposed after you save it.
  • Model allow-list + policy — which models this connection may use.
  • Category — an LLM connection is category='llm'; non-LLM ones carry a category like mail, database, or mcp_server. The inference path resolves only llm connections, so a non-LLM credential can never be selected for a model call.

Precedence

When something needs a credential, connections resolve by precedence:

user → workspace → system default

A user's own connection wins over the workspace's, which wins over the system default. This is how you let power users bring their own keys while everyone else falls back to a shared one.

Managing connections

From the console you can create, rotate, edit, and delete connections, and grant them to groups. Rotating a credential swaps the secret without changing anything that depends on the connection.

📸 Screenshot: the Connections list with masked last4 hints and rotate controls.

Environment tags

A connection carries an environment tag — dev, test, or prod. This lets the platform treat non-production connections differently from production ones, and admin surfaces show an environment badge so you can tell at a glance which is which.

Delivery policy — partially shipped

The environment tag and its badges are shipped. The enforcement layer that uses it — for example redirecting all email sent under a dev/test connection to a safe address, and failing closed when none is configured — is being rolled out. Treat non-production delivery policy as not fully enforced yet; confirm behaviour before pointing a test environment at anything real.

Default inference

The default inference connection — which credential agents use when nothing more specific applies — is a SuperAdmin platform setting, not an environment variable. See Default inference.

LEMA Chat — sovereign, open-source multi-agent chat.