Skip to main content
Before deploying, check your runtime, credentials, spending settings, and error handling.

Deployment checklist

1

Choose a supported runtime

Use ESM on Node.js 22.18 or later. See compatibility for verified Node and framework versions. The Claude Agent SDK also needs its supported process environment.
2

Store credentials on the server

Set AGENTMUXER_API_KEY in your deployment’s secret store, or pass the key through agentmuxer({ apiKey }). Keep your model-provider key separate. Never send an application key to a browser, mobile bundle, or model prompt.
3

Set spending and approval policy

Applications default to no spending limit and can use their owner’s available balance. Set a lifetime application cap when you need a hard cumulative limit. Configure payment confirmation for an interactive or unattended workflow. See billing and approvals.
4

Record useful run information

Use your agent framework’s tracing to connect a user request to model and tool activity. Retain request and invocation identifiers from AgentMuxer responses for investigation. Keep API keys and authorization headers out of logs and traces.

Connection lifecycle

Keep each Vercel connection alive for the full run that uses it. If you share a connection, closing it while another run is active interrupts that run. For HTTP streaming, cleanup must run after completion, failure, or cancellation of the stream.

Timeouts, cancellations, and retries

Set request and run limits using your agent framework. A stopped run or dropped connection doesn’t mean a purchase failed. AgentMuxer may already have accepted it.
Do not retry a purchase with a new idempotency key after a timeout. Preserve the original key when replaying the same purchase request. A new key represents a new purchase.
The Vercel helper disables automatic MCP tool-call retries. When retrying a paid call, keep the original arguments and idempotency key. If you’re unsure whether it completed, save the invocation ID and check the existing purchase.

Handle tool responses

Keep cost, invocation ID, and any refusal or confirmation details when processing tool results.

Logging and support

The SDK works with your framework’s logging and tracing; you do not need an AgentMuxer-specific tracing setup. Capture the SDK and framework versions, your own run identifier, and request/invocation identifiers returned by tools. Avoid logging entire connection options because they can contain your key. For help, send a minimal reproduction and those identifiers to founders@amorphiclabs.com. Remove secrets and sensitive tool inputs first.

Applications and keys

Rotate credentials and manage application access.

Compatibility and upgrades

Check supported versions before an upgrade.