Deploy a production agent from any model with a single command. This guide covers the full config schema, the deploy step itself, staging vs. production environments, and how to verify your agent is live and behaving correctly.
Prerequisites
A Sublayr API key
The CLI or SDK installed
At least one connected tool (optional, but typical for most agents)
The full config schema
An agent config is a YAML file describing everything about how the agent should run:
Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A unique, human-readable identifier for the agent |
model | string | Yes | The primary model to deploy on |
fallback | string | No | Model to reroute to if the primary degrades or times out |
tools | array | No | Connected tools this agent is allowed to call |
approvals | array | No | Conditions that trigger a human approval step before an action executes |
budget | string | No | Monthly spend cap, e.g. |
environment | string | No |
|
Example: a full config
Deploying to staging first
We strongly recommend deploying to staging before production. Staging uses the same runtime and observability as production, but is isolated from real customer data and doesn't count against your production run quota.
Test the agent thoroughly in staging — trigger its typical actions, confirm approvals route correctly, and check traces for anything unexpected.
Promoting to production
Once you're confident, promote the exact same config to production:
This does not require rewriting anything — the same build that ran in staging is promoted as-is, so there's no risk of environment drift between what you tested and what goes live.
Verifying deployment
Check the agent's status:
This returns current status (deploying, live, paused, or failed), uptime, the model and fallback in use, and a summary of the last 10 runs.
Common deployment errors
Error | Cause | Fix |
|---|---|---|
| Malformed YAML or missing required field | Validate with |
| Missing or invalid API key | Confirm |
| Too many deploys in a short window | Wait and retry, or contact support to raise your limit |
Next steps
Once your agent is live, set up traces and alerts under Observability, and configure a rollback plan under Versioning.
