Operate
Deploy an agent to test or prod, roll back to a previous version, point a custom domain at it, embed it in a webpage, and route model calls through your own cloud account. All via the SDK.
Deploy to test and to prod
Configure creates an agent version (a snapshot). Deploying that version runs it on the backend. You pick the destination:
// the configure call returned:
// const v = { agentId: 'agt_2b8e', versionId: 'ver_3c5f' }
// dev-only URL — no end-user traffic, ephemeral
const test = await an.agents.deployToTest(v.versionId);
// → { url: 'https://<temp>.test.agents.agentnava.com', expiresAt: '…' }
// production URL — end users hit this
const prod = await an.agents.deployToProd(v.versionId);
// → { url: 'https://<agent-name>.agents.agentnava.com', versionNumber: 4 }
Both calls are idempotent on the version ID. deployToProd promotes the version atomically and keeps the previous one warm until the new one passes a health check. Skip deployToTest if you don't need a dev-only environment.
Versions & rollback
// list every version of this agent (newest first)
const versions = await an.agents.versions('agt_2b8e');
// → [{ id: 'ver_3c5f', number: 4, deployedAt: '…', isProd: true }, …]
// instant rollback to a previous version
await an.agents.rollback('agt_2b8e', 'ver_9a1b');
Rollback is instant — every version's spec content and configuration is preserved as long as the agent exists.
Custom domain
Map agent.yourdomain.com to the agent's public URL via CNAME, then attach it in code:
await an.domains.add({
domain: 'agent.yourdomain.com',
agentId: 'agt_2b8e',
});
The runtime provisions a managed TLS cert and serves the agent at that domain within a minute.
Embed snippet
<script
src="https://embed.agentnava.com/v1.js"
data-agent="<agentId>"
data-theme="auto"
defer
></script>
Drops into any HTML page. The widget creates a session automatically on first message and resumes it across reloads (session ID in localStorage). data-theme accepts light, dark, or auto. Add data-uploads="true" to enable end-user file attachments.
BYOK — bring your own keys
Route the workspace's model traffic through your own provider account instead of AgentNava's. Useful once usage scales past the free tier, when you want one billing relationship across services, or when compliance requires inference in your own VPC/region.
Configuration is done from the console — not the SDK. Open console.agentnava.com → BYOK, pick a provider, paste credentials, mark as default. Agent code is unchanged.
Supported providers
What to paste:
- AWS Access Key ID (starts with
AKIAfor long-lived orASIAfor STS session) - AWS Secret Access Key
- Region — pick the one where your Bedrock models are enabled (e.g.
us-east-1,us-west-2,eu-west-3,ap-northeast-1)
IAM permissions required: bedrock:InvokeModelWithResponseStream and bedrock:ListFoundationModels (the latter is hit at Test connection time).
The console SigV4-signs a GET /foundation-models on save to verify the credentials work before activating the key.
sk-ant- key from console.anthropic.com.Paste an API key from console.anthropic.com → Settings → API keys. Validation hits /v1/models on save.
Paste an API key from platform.openai.com. Validation hits /v1/models.
Paste a Gemini API key from aistudio.google.com. The key is sent as a query parameter on each request.
Paste an OpenRouter key from openrouter.ai/keys. Validation hits the OpenRouter /v1/models endpoint.
Paste your bearer token plus the endpoint URL (e.g. https://proxy.example.com). The runtime will call {endpointUrl}/v1/chat/completions with OpenAI's request shape.
How it works
- Provider creds are encrypted at rest with AES-256-GCM in our database. We decrypt only at request time, inside the worker, and never log the plaintext.
- When you mark a provider as default, all subsequent chat sessions for that workspace route through it. There's no per-agent override yet (that's on the roadmap).
- Generic
modelClassvalues on agents (standard,premium,advanced) translate to provider-specific model IDs automatically — e.g.standardon Bedrock becomesanthropic.claude-3-haiku-20240307-v1:0, on OpenAI becomesgpt-4o-mini. - If the BYOK provider returns an error, the request fails — there's no silent fallback to platform pricing.
- Remove the default any time from the console; traffic instantly switches back to AgentNava's managed inference.
Test the connection
The Test connection button on each row makes one validation call (timeout 6s) and stores the result. Status pill on the table:
- Live — last test succeeded.
- Failing — last test failed. Hover for the upstream error.
- Untested — fresh row, never tested.
Test on save plus whenever you suspect the upstream account changed (rotated key, billing on hold, quota hit).
Regions
Agents deploy to the region closest to the workspace owner by default. Override on a per-agent basis via meta:
await an.agents.configure({
// ...
meta: { region: 'eu-west' },
});
Supported: us-west, us-east, eu-west, eu-central, ap-southeast.
Billing
The runtime is charged per workspace plan; model usage is metered separately. With provider: 'auto', model calls are billed by AgentNava. With BYOK, they're billed by your cloud provider. Plan details and pricing are on agentnava.com/pricing.