Skip to content
Covo Developers

Reference

Roll back to a version

Brings the configuration back to a saved version (the current state is saved as a version first).

RESTPOST /api/v1/agents/{agent_id}/versions/{version}/restore
MCP toolrestore_version
ClassificationSensitive write
Scopeagents:publish
Minimum role on the agentadmin
ConfirmationRequired: confirm: true, after the person agrees
Retry safetySafe to retry with the same input
Success status200

What it does

Brings the configuration back to a saved version (the current state is saved as a version first). Changes what live visitors see, so it needs the agents:publish scope and confirm: true. Check diff_versions first.

Side effects

Saves the current state as a version, then brings back the chosen one. Visitors of a published agent see it at once.

Inputs

NameTypeRequiredInDescription
agent_idstringyespathThe agent id (agt_...), from list_agents.
versionintegeryespath
confirmtruenobodySet to true after reviewing the effect with the person you work for. Required for destructive operations.

Example

REST
curl -X POST "https://covo.lanaai.io/api/v1/agents/agt_4edc89bb2964/versions/3/restore" \
  -H "Authorization: Bearer $COVO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm":true}'
MCP (POST /mcp)
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "restore_version",
    "arguments": {
      "agent_id": "agt_4edc89bb2964",
      "version": 3,
      "confirm": true
    }
  }
}

Response

Returns an object with restored, version, revision, changes and backup_version. This is a real response, shortened to two items per list.

200 response
{
  "restored": false,
  "version": 3,
  "revision": 7,
  "changes": [],
  "backup_version": null
}

Over MCP the same object comes back as the tool result, in structuredContent and as JSON text.

Errors

StatusCodeMeaning
401unauthorizedNo token, or it is unknown, revoked or expired. OAuth apps refresh or reconnect.
403account_suspendedThe account that owns the token is paused.
403insufficient_scopeThe token lacks agents:publish.
403role_insufficientThe person is not an admin or owner of this agent.
404agent_not_foundUnknown agent, or not reachable with this token.
400bad_requestAn input is invalid; field names it.
409confirmation_requiredReview the effect with the person you work for, then send confirm: true.
429rate_limitedWait Retry-After seconds.