Ship an agent from draft to production

Create an agent, publish a version, try it in dev, and promote it to production, with the robotelos command line.

This guide takes one agent from idea to production. The ideas behind each step are in Agents, versions and environments. For one scenario with real output, including a rejection and an update, see the worked example.

Before you start

  • You have the robotelos command (see Command-line tools).
  • You are signed in: robotelos login, then robotelos whoami shows who you are and your active account.
  • Someone has set up a fleet for each environment you will use. If not, see Operate fleets.

Every command accepts -o json for scripts. Add --account ID to work in an account other than your active one.

The words, and the buttons

You sayIn RobotelosThe command
“Create the agent”, “edit it”the agent and its draftrobotelos apply -f agent.yaml
“Publish”, “release version 1” (the Publish button in the console)a numbered, frozen versionrobotelos apply -f an AgentVersion file
“Deploy to dev”, “roll out”an AgentRollout says which version an environment runsrobotelos apply -f an AgentRollout file
“Request production”, “promote”the same rollout for prod, which waits as a promotionrobotelos apply -f the production rollout, then approve or reject

“Deployment” is the everyday word for what the console and this guide call a rollout: what an environment runs.

How it works: files, not commands

Everything you want Robotelos to do is written in a small file and applied with one command:

robotelos apply -f FILE        # create or update what the file describes
robotelos get KIND [NAME]      # read it back, with its status

A file can hold several resources, separated by ---. Applying the same file twice changes nothing, so you can keep these files in Git and apply them from CI.

1. Describe the agent

Write the agent in a file, for example support.yaml:

apiVersion: robotelos.io/v1
kind: Agent
metadata:
  name: support
spec:
  model: <model version id>
  prompt: <prompt version id>
  maxSteps: 20

The model, prompt, tools and skills are referred to by their own version ids, so an agent always points at exact, unchanging parts.

robotelos apply -f support.yaml
robotelos get agents
robotelos get draft support

apply creates the agent the first time and updates its draft after that. It never publishes a version by itself.

2. Publish a version

Freezing the draft is also a resource:

apiVersion: robotelos.io/v1
kind: AgentRelease
metadata:
  agent: support
robotelos apply -f version.yaml
robotelos get releases support

This freezes the draft as the next version. Applying it again while the draft is unchanged returns the same version.

To read one version, with the exact content that will run:

robotelos get release support/1

It prints the version’s status and digest, followed by the compiled release. The digest is what fleets verify, so it is the proof that production runs what you tested.

Test a draft before you publish it

You do not have to publish to try something. A preview is a test build of your draft: a numbered, frozen version that runs in dev and nowhere else.

apiVersion: robotelos.io/v1
kind: AgentRelease
metadata:
  agent: support
spec:
  preview: true
robotelos apply -f preview.yaml            # agentrelease/support version 1 (preview) created: sha256:...
robotelos apply -f rollout-dev.yaml        # a rollout of that version to dev; talk to it there
  • A preview never becomes the agent’s current version, and staging, production and promotions refuse it with a message that says it is a preview.
  • Asking for a preview of a draft that has not changed returns the same one; if the draft equals a published version, that version is returned, because it can be tested already.
  • When you are happy, publish the same draft as above. If you did not change it, the published version is byte for byte the release you tested (the same digest). It still has to run in dev and be evaluated itself before production accepts it.

3. Try it in dev

An AgentRollout says which version an environment should run:

apiVersion: robotelos.io/v1
kind: AgentRollout
metadata:
  agent: support
  environment: dev
spec:
  version: 1
robotelos apply -f rollout-dev.yaml
robotelos get rollout support/dev

The status shows where the rollout is: accepted, in progress, delivered to the fleet, applied, and finally Ready. If it stays at delivered, the fleet has not applied it yet; see When something is stuck.

To protect against two people editing at once, add the generation you based the change on under metadata:

metadata:
  agent: support
  environment: dev
  generation: 3      # refused if the rollout has moved on since you read it

4. Record what you checked

After you have tested version 1 in dev, record the result so that promotion can rely on it:

apiVersion: robotelos.io/v1
kind: Evaluation
spec:
  agent: support
  version: 1
  environment: dev
  name: regression
  passed: true

5. Put it into production

Production is changed the same way as dev: you apply an AgentRollout. The difference is that production is gated. The apply does not change anything yet; it asks for approval.

How a change reaches production A developer requests production, a passing evaluation from the previous environment is required, a person other than the requester approves, and only then does production change. 1You requesta rollout for prodwaits as a promotion 2Evidencea passing evaluationin the previousenvironment 3Approvalowner or maintainernever the requester1 to 5 approvals 4Production changesonly through anapproved promotion One rejection ends a waiting promotion. Every decision is in the audit trail. Staging and the number of approvals are set per environment.
Production changes only after evidence and an approval from someone other than the requester.
apiVersion: robotelos.io/v1
kind: AgentRollout
metadata:
  agent: support
  environment: prod
spec:
  version: 1
robotelos apply -f rollout-prod.yaml
# agentrollout/support/prod generation 0 unchanged; promotion/3f2a... awaiting_approval (robotelos approve promotion 3f2a...)

Robotelos checks that version 1 is what the previous environment serves (stg if it is on, otherwise dev) and that it has a passing evaluation there. If so, it records a promotion and waits. If not, the apply is refused and says what is missing.

A reviewer decides:

robotelos get promotion <promotion-id>
robotelos approve promotion <promotion-id> --comment "checked the dev results"
robotelos reject  promotion <promotion-id> --comment "needs the escalation case"

Deciding is a command, not a file, because it is somebody else’s decision. When production reports the version ready, robotelos get rollout support/prod shows the new generation and the promotion shows succeeded.

  • Applying the same file again returns the same waiting promotion.
  • Applying another version replaces the waiting one, which is cancelled as superseded: the latest intent wins.
  • Withdrawing your own request: robotelos cancel promotion <promotion-id>.
  • Without a gate (an account that has none configured for production), the apply takes effect at once, like dev.

To rehearse first, turn staging on with an Environment resource (metadata.name: stg, spec.enabled: true). Once it is on, production’s evidence has to come from stg.

6. Roll back, or stop serving

Both are edits of the same rollout file:

spec:
  version: 1      # back to an earlier version: a new generation, with the old release
spec: {}          # no version: the environment stops serving the agent (needs a maintainer)
robotelos get revisions support/prod     # every generation, newest first
robotelos get rollouts support           # the agent in every environment

When something is stuck

You seeIt meansWhat to do
Rollout stays ProgressingThe control plane has accepted it; the fleet has not picked it upAsk a platform administrator to check the fleet (robotelos fleet list shows whether it is in sync)
DegradedThe fleet applied it but its pools are not healthyCheck the deployment status for the pool; roll back if users are affected
“Aborted” on applySomeone changed that rollout while you were workingrobotelos get rollout support/dev, then apply again with the new generation
Draft save refusedSomeone edited the draft since you read itShow the draft again, reapply your change

Next steps