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.

Seeing what changed

Under Versions, each version names what changed since the one before it, such as its instructions, model or MCP servers. A version saved from Adjust also shows the description it was drafted from. See changes opens the details: changed settings, and a line-by-line diff of the instructions and each skill. Other files in the agent's folder are listed as new, changed or removed. Secret values are never shown; an MCP server's headers and environment are shown by name only.

From the API, GET /v1/agents/:id/versions/:version/changes returns the skills and files that differ from the version before it, or from ?from=<version>.

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.