lua push uploads a version and changes nothing for end users; lua version create snapshots the agent; lua version promote <n> makes that snapshot live and is also the rollback path. For one primitive on its own, use the lua deploy shortcut under Options you may need.
Verified against lua-cli 3.33.0.
Before you begin
- A compiled project:
lua compile --ciexits 0. Tests pass per Test an agent before you release. - No server drift:
lua status --json --cishows everyprimitives[].diffs[].statusassynced,ahead, ornot deployed, and noorphans[]entry withcritical: true. For abehindentry, see If it isn’t working.lua sync --checkreports the same drift and exits 1. - A
modelon yourLuaAgentif the server has one:lua push allandlua push agentpush the agent configuration, and aLuaAgentwith neithermodelnor a model resolver clears the server’s model.lua sync --checkprintsModel drift detectedwhen they differ (About models). - Workflows pushed separately, since
lua push allskips them: runlua push workflow --ci --force --name <workflow-name>first (Workflows).
1
Push every primitive
lua push all compiles, bumps the patch version of every versioned primitive (skills, webhooks, triggers, jobs, preprocessors, postprocessors, devices, device triggers, voices), upserts MCP servers, pushes the agent configuration (a new persona version, model, model settings), and uploads a source backup. Nothing goes live except the agent configuration: a pushed persona and model are served from the agent’s next message.--force is required for all, and --auto-deploy is a no-op on push all. A failed primitive does not change the exit code: the command exits 0 and lists it on stderr under ⚠️ <n> component(s) failed to push:. In a script, fail on that line.version in lua.skill.yaml from the server’s active version, so a hand edit does not survive; to pick a number, push that primitive alone with lua push <type> --ci --force --name <name> --set-version 1.2.0 (lua push reference).2
Create an agent version
An agent version records every primitive’s pushed version plus the persona and model; it starts as The command prints
staged.✓ Created v<n> (staged). Run `lua version promote v<n>` to deploy. and, with nothing new since the last version, No changes since the latest version, so there is nothing to snapshot. --auto-push pushes first; --commit-hash <sha> records the commit.3
Review what will change
Compare the staged version with the active one.
Output
lua version show <n> prints one version in full; --json gives machine-readable output (lua version reference).4
Promote the version
Promotion swaps the live version atomically, without a confirmation prompt, and prints
✓ Promoted v<n>. Previous active: v<m>.5
Verify
Confirm the active marker moved, note the time, send one production message on a fresh thread, and check that nothing was logged since under The
agent_error or as an error under skill, where a throwing tool lands. lua logs has no time or environment filter, so the check bounds both types by timestamp.Output
* marks the active version; both jq -e lines exit 0 when nothing was logged after $since (Read logs and debug an agent).Options you may need
Roll back to the previous version
Promote the version that was active before;lua version list shows it as superseded. A promote restores every code primitive version and the model, and touches nothing else: not the persona, environment variables, knowledge, features, channels, MCP activation, governance and model settings, devices, data the bad version wrote, or runs in flight (what an agent version snapshots).
lua workflows deploy <workflow-name> -v <previous-version>, and the persona with lua deploy persona --set-version <n> --force.
Ship one webhook, job, processor, or trigger
lua deploy <type> with webhook, job, preprocessor, postprocessor, or trigger makes one pushed version live at once: on an agent under versioning it creates and promotes a new agent version that differs from the active one only in that primitive, prints its number, and writes the deployed version into lua.skill.yaml.
--set-version takes a semver or latest. lua workflows deploy <workflow-name> -v latest does the same for a workflow. MCP servers have no versions; activate or deactivate one with lua mcp activate <server-name> and lua mcp deactivate <server-name> (lua mcp reference).
Deploy a skill or the persona
lua deploy skill --name <skill> --set-version <v> serves that version from the agent’s next turn, on any agent, but the next lua version promote resets every skill to the version pinned in the promoted agent version. For a durable change, push, lua version create, lua version promote; for an immediate rollback of one skill, lua deploy skill --set-version <old>. A pushed persona is already live; lua deploy persona --set-version <n> --force switches the served persona to an earlier version at once, versioned agent or not, and a promote does not change it. An agent with no agent version yet is not under versioning, so every lua deploy <type> goes live at once, as lua version status says. lua deploy all --force (newest version of everything; --name and --set-version ignored) behaves the same per type and exits 0 even when it lists ⚠️ <n> deployments failed: (lua deploy reference).
If it isn’t working
A primitive shows status "behind" in lua status --json
A primitive shows status "behind" in lua status --json
The server’s active version is newer than the version in
lua.skill.yaml, after a release from another machine or the admin dashboard. Run lua sync --pull to update local files from the server’s source backup (it refuses if you changed files since your last backup; --force overwrites them), then start again. lua version status prints the same warning with the affected rows.orphans[] lists a primitive with critical: true
orphans[] lists a primitive with critical: true
The server has an active preprocessor or postprocessor that no longer exists in your code, and it keeps running on every message. Run the
cleanupCommand from the same entry, for example lua preprocessors delete --preprocessor-name "<name>", then push again.lua deploy skill succeeded but production still answers with the old skill
lua deploy skill succeeded but production still answers with the old skill
Either a later
lua version promote reset the skill to the version pinned in that agent version, or --set-version latest picked the most recently created version rather than the one you meant; lua version status shows the active version per skill. Push, lua version create, and lua version promote <n> make the change durable. Exit codes 9, 10, and 11 on any release command are credential and network problems, listed on Errors and exit codes.Next steps
Go-live checklist
What to check before you promote.
About releases and versions
Primitive versions, agent versions, statuses, and where
lua deploy fits.Automate releases in CI
The same commands in GitHub Actions with an approval gate.
Back up and restore agent source
What a push backs up and how to restore.
lua version reference
create, list, show, diff, promote, status, delete.

