Skip to main content
A route’s profile: field names an isolated tenant scope so one gateway can safely serve many tenants without leaking memory or secrets between them.

Quick Start

1

Bind two tenants to the same agent

Give each route a different profile: value. The same support agent serves both tenants, but each route names its own isolation scope.
2

Read the resolved profile in code

resolve_route() copies the winning binding’s profile onto the RouteMatch, so the wrapper knows which tenant scope to enter for the turn.
3

Leave a route unscoped

Omit profile: (or leave it blank) and the route stays unscoped — match.profile is None.

How It Works

resolve_route() picks the most-specific matching binding and copies its profile onto the returned RouteMatch. An unmatched route yields RouteMatch(profile=None).

Fail-Closed Contract

Tenant isolation is fail-closed by design — a misconfigured route can never silently share another tenant’s memory or secrets.
  • Blank or whitespace-only profile normalises to None (unscoped) — never an empty-named scope.
  • An unmatched route yields RouteMatch(profile=None) and never inherits another tenant’s profile, even when the fallback agent is the same.
  • Treat profile is None as “no tenant scope” and fail closed rather than entering an anonymous namespace.
This page documents the routing-protocol contract only: RouteBinding.profile and RouteMatch.profile are defined on the gateway protocol. The wrapper wiring that actually enters a profile’s memory namespace / secret scope is a follow-up — describe the contract to integrators, but don’t rely on the wrapper isolation subsystem until it ships.

Configuration Options


Best Practices

Use one stable, tenant-specific value per route (acme, globex). Never reuse a profile name across tenants — that would merge their memory and secret scopes.
When match.profile is None, do not fall back to a “default tenant” that another route also uses. Unscoped means isolated, not shared.
Route tenant profiles on channel_id or account — stable platform ids — rather than display names, which change.
Profile names come from your config, not from message content. Never derive a profile from a field a user can set.

Route Bindings

The full routing surface — match by peer, role, channel, account, and priority.

Scoped Approvals

Durable, agent-scoped approval grants that don’t leak across agents.