Versions and changes

Versions and changes

Every change to an agent saves a new, immutable version. The endpoint and caller keys stay the same, and callers get the live version on their next message. A session keeps its files across versions; if the new version runs on a different harness, its conversation starts over on that harness.

Ways to change an agent

  • Deploy again. Change the folder and ask the plugin to deploy, or run lgr deploy.
  • Adjust. On the agent's page, click Adjust and describe the change, such as "Reply in the customer's language" or "Also post a summary to Slack". A model edits the instructions, skills and secrets and shows the change file by file. Edit it, then save it as the next version. Workspace files, the harness, model and limits are kept as they were.
  • Settings. The agent's Settings change the harness, the model, and the time and cost limits per run.
  • MCP servers and secrets. Adding or removing a server under Setup saves a new version.
  • Improvements. A promoted improvement is a version too.

Previews

A preview is a version callers don't get yet. Use it to try a change first:

  • lgr deploy --preview
  • Deploy as a preview when deploying an upload or a drafted agent
  • Save as a preview in Adjust (on by default) and in Settings

Try a preview in the Playground (Preview next to it under Versions), or from a terminal with lgr chat support-bot@v3. A run can also name a version: lgr run --agent support-bot@v3 "...".

When it looks right, click Make live under Versions, or run:

lgr release support-bot@v3

A new agent's first version is always live.

Rolling back

Under Versions, Restore on an earlier version saves a copy of it as a new version and makes that live. From the API, PATCH /v1/agents/:id with {"current_version": 2} makes an existing version live again.

Pausing an agent's API

Pause API on the agent's API tab, or lgr pause support-bot, stops new sessions and messages through the endpoint. Callers can still read results and cancel runs they started. Runs from the console, CLI, schedules and instances are not affected. lgr resume or Resume API turns it back on.