Get your first agent live on Sublayr in under ten minutes. This guide walks through installing the SDK, connecting a model, configuring a minimal agent, and deploying it to production — with nothing extra to set up first.
Before you start
You'll need a Sublayr account and an API key from your dashboard under Settings > API Keys. You'll also need at least one model provider key (OpenAI, Anthropic, Mistral, or your own endpoint) to connect during setup.
Install the SDK
Install the CLI and SDK via npm:
Verify the install:
Authenticate
Log in with your API key:
This stores your credentials locally so subsequent commands don't require re-authentication.
Connect a model
Connect the model provider you want your agent to run on:
You can connect multiple providers and choose one per agent, or set a fallback model for automatic rerouting if your primary provider degrades.
Write a minimal config
Create an agent.yaml file:
This defines an agent named support-agent, running on Claude with GPT-4o as a fallback, connected to Postgres and Slack, capped at $200/month.
Deploy
Push it live:
Sublayr validates the config, provisions the runtime, and returns an agent ID and live endpoint.
Verify it's running
This returns the agent's current status, uptime, and the last few runs. From here, every run is automatically traced — head to Observability in your dashboard to watch it work in real time.
Next steps
Set up approval rules for high-stakes actions
Configure budgets and spend alerts
Explore the full API reference for programmatic control
