Skip to content
Covo Developers

Reference

Change configuration

Applies a change set to the live configuration.

RESTPATCH /api/v1/agents/{agent_id}/configuration
MCP toolupdate_agent_configuration
ClassificationSensitive write
Scopeagents:write
Minimum role on the agenteditor
ConfirmationRequired: confirm: true, after the person agrees
Retry safetySend an Idempotency-Key header (REST) or idempotency_key argument (MCP) to retry safely
Success status200

What it does

Applies a change set to the live configuration. Send expected_revision from your last read to avoid overwriting someone else (version_conflict otherwise). An automatic version is saved first so the change can be rolled back with restore_version. Removing items needs the agents:delete scope and confirm: true. To stage changes for review instead, use create_draft.

Side effects

Saves an automatic version first, then changes the configuration. If the agent is published, visitors see the change at once. Removing items needs the agents:delete scope.

Inputs

NameTypeRequiredInDescription
agent_idstringyespathThe agent id (agt_...), from list_agents.
changesobjectyesbodyChanges by section. identity and personality take the fields to change. links, offers, knowledge and places take add (new items), update (items with id plus the fields to change) and remove (ids). Get ids and current values from get_agent_configuration; get the full schema from get_configuration_schema.
expected_revisionintegernobodyThe revision you read. Strongly recommended.
confirmtruenobodySet to true after reviewing the effect with the person you work for. Required for destructive operations.

Example

REST
curl -X PATCH "https://covo.lanaai.io/api/v1/agents/agt_4edc89bb2964/configuration" \
  -H "Authorization: Bearer $COVO_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"changes":{"personality":{"tone":"Warm, direct and practical."},"links":{"add":[{"title":"Book a discovery call","url":"https://cal.example/avery","category":"booking"}]}},"expected_revision":4,"confirm":true}'
MCP (POST /mcp)
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_agent_configuration",
    "arguments": {
      "agent_id": "agt_4edc89bb2964",
      "changes": {
        "personality": {
          "tone": "Warm, direct and practical."
        },
        "links": {
          "add": [
            {
              "title": "Book a discovery call",
              "url": "https://cal.example/avery",
              "category": "booking"
            }
          ]
        }
      },
      "expected_revision": 4,
      "confirm": true
    }
  }
}

Response

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

200 response
{
  "applied": true,
  "revision": 6,
  "previous_revision": 4,
  "changes": [
    {
      "path": "personality.tone",
      "operation": "replace",
      "before": "warm",
      "after": "Warm, direct and practical."
    },
    {
      "path": "links",
      "operation": "add",
      "value": {
        "title": "Book a discovery call",
        "url": "https://cal.example/avery",
        "description": "",
        "icon": "",
        "image_url": null,
        "category": "booking",
        "enabled": true,
        "priority": 0,
        "tags": [],
        "keywords": [],
        "visibility": "public",
        "expires_at": null
      }
    }
  ],
  "backup_version": 1,
  "validation": {
    "valid": true,
    "state": "ready",
    "errors": [],
    "warnings": [
      {
        "step": "knowledge",
        "field": null,
        "severity": "recommended",
        "message": "Add a few common questions. Short, specific answers work best."
      },
      {
        "step": "publish",
        "field": null,
        "severity": "recommended",
        "message": "Ask the preview a question before you publish."
      }
    ]
  }
}

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:write.
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.
409version_conflictThe agent changed since you read it. Read again and redo the change.
409, 422idempotency_in_progress, idempotency_key_reusedSee Idempotency on the REST page.
429rate_limitedWait Retry-After seconds.