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:

npm i @sublayr/sdk
npm i @sublayr/sdk
npm i @sublayr/sdk

Verify the install:

sublayr --version
sublayr --version
sublayr --version


Authenticate

Log in with your API key:

sublayr auth login
sublayr auth login
sublayr auth login

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:

sublayr models connect anthropic
sublayr models connect anthropic
sublayr models connect anthropic

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:

name: support-agent
model: anthropic/claude
fallback: openai/gpt-4o
tools:
  - postgres
  - slack
budget: 200/mo
name: support-agent
model: anthropic/claude
fallback: openai/gpt-4o
tools:
  - postgres
  - slack
budget: 200/mo
name: support-agent
model: anthropic/claude
fallback: openai/gpt-4o
tools:
  - postgres
  - slack
budget: 200/mo

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 deploy --config agent.yaml
sublayr deploy --config agent.yaml
sublayr deploy --config agent.yaml

Sublayr validates the config, provisions the runtime, and returns an agent ID and live endpoint.


Verify it's running

sublayr agents status agt_4b81
sublayr agents status agt_4b81
sublayr agents status agt_4b81

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

Teal gradient background

TRUSTED BY 200+ AI TEAMS

Ship your agents to production.

Book a 30-minute demo, or start in the docs. No infrastructure required.

Teal gradient background

TRUSTED BY 200+ AI TEAMS

Ship your agents to production.

Book a 30-minute demo, or start in the docs. No infrastructure required.

Teal gradient background

TRUSTED BY 200+ AI TEAMS

Ship your agents to production.

Book a 30-minute demo, or start in the docs. No infrastructure required.

Create a free website with Framer, the website builder loved by startups, designers and agencies.