Skip to main content
Trinity
Guides/Subscription Credentials

Subscription Credentials

Share Claude Max/Pro subscription tokens across multiple agents, with automatic assignment, health monitoring, and auto-switch on rate limits.

Concepts

Subscription — A Claude Max or Pro subscription token registered with Trinity. Stored encrypted (AES-256-GCM). Injected as an environment variable to assigned agents.
Round-Robin Assignment — New agents automatically get a subscription assigned. The subscription with the fewest agents is selected first, with alphabetical tie-break.
Auto-Switch — When an agent hits repeated rate-limit (429) errors, Trinity automatically switches it to a different subscription.

How It Works

1

Go to the Settings page.

2

In the Subscriptions section, click Register Subscription.

3

Enter a subscription name and token.

4

The subscription is encrypted and stored.

5

Expand a subscription row to see assigned agents with assign/unassign controls.

6

New agents auto-assign via round-robin.

Encryption Requirement

CREDENTIAL_ENCRYPTION_KEY must be set in .env. This is auto-generated by start.sh on fresh deployments.
If missing: a warning banner appears on the Settings page, the Register button is disabled, and the API returns 503.
Check status: GET /api/subscriptions/encryption-status

Health Monitoring

Subscription credential health is monitored continuously.
Auto-remediation triggers on failures.
Alerts fire on degraded subscriptions.

API Endpoints

EndpointMethodDescription
/api/subscriptionsGETList all subscriptions
/api/subscriptionsPOSTRegister a subscription
/api/subscriptions/{id}DELETEDelete a subscription
/api/subscriptions/{id}/assignPOSTAssign to an agent
/api/subscriptions/{id}/unassignPOSTUnassign from an agent
/api/subscriptions/encryption-statusGETCheck encryption key status

MCP Tools

register_subscription(name, token) — Register a new subscription.
list_subscriptions() — List all subscriptions and their assigned agents.
assign_subscription(subscription_id, agent_name) — Assign a subscription to an agent.
clear_agent_subscription(agent_name) — Remove subscription assignment from an agent.
get_agent_auth(agent_name) — Get the auth configuration for an agent.
delete_subscription(subscription_id) — Delete a subscription.

Limitations

Requires CREDENTIAL_ENCRYPTION_KEY in .env. Without it, subscription features are unavailable.
Auto-switch depends on rate-limit detection. If an agent does not surface 429 errors through standard logging, auto-switch will not trigger.
Round-robin assignment considers only agent count, not agent activity or usage volume.