Skip to main content
POST
/
v2
/
agents
/
version
/
update
Update Agent Version (Behavioral)
curl --request POST \
  --url https://api.velt.dev/v2/agents/version/update \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '
{
  "data": {
    "agentId": "<string>",
    "rawInstructions": "<string>",
    "instructions": "<string>",
    "phaseTimeoutMs": 123,
    "contextGathering": {},
    "execution": {},
    "response": {},
    "postProcess": {},
    "input": {},
    "scope": {},
    "setup": {}
  }
}
'
{
  "result": {
    "status": "success",
    "message": "Agent version created successfully",
    "data": {
      "version": 4
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://velt-raghul-agent-docs.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Use this API to update behavioral/version fields on a custom agent. Creates a new version N+1 in the versions subcollection, updates the version pointer on the root document, and bumps updatedAt. In-flight executions stay pinned to whatever version they started on — the update only affects future executions. The schema uses .passthrough() so additional behavioral fields are forwarded. Deep validation happens in the service layer via updateCustomAgentConfigSchema. Custom agents only. Use Update Agent for identity edits on built-in agents.

Endpoint

POST https://api.velt.dev/v2/agents/version/update

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

Example Requests

1. Update instructions and post-processing

{
  "data": {
    "agentId": "abc123def456",
    "instructions": "Check headings use 'Inter' font. Verify #1A73E8 on all CTAs and links.",
    "postProcess": {
      "guardrails": { "enabled": true },
      "matchAndMerge": { "enabled": true }
    }
  }
}

2. Update context gathering strategies

{
  "data": {
    "agentId": "abc123def456",
    "contextGathering": {
      "strategies": ["web-page-text", "web-page-html", "web-page-screenshot"]
    }
  }
}

3. Enable cross-page execution

{
  "data": {
    "agentId": "abc123def456",
    "scope": {
      "crossPage": {
        "enabled": true,
        "targetProperty": "brandConsistency",
        "pageDiscovery": "manual",
        "pages": ["https://example.com", "https://example.com/about"]
      }
    }
  }
}

Response

Success Response

{
  "result": {
    "status": "success",
    "message": "Agent version created successfully",
    "data": {
      "version": 4
    }
  }
}
FieldTypeDescription
data.versionnumberNew version number after the update

Failure Response

{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
Errors: NOT_FOUND (agent does not exist) / INVALID_ARGUMENT (validation failure or attempting to update a built-in agent’s behavior).
{
  "result": {
    "status": "success",
    "message": "Agent version created successfully",
    "data": {
      "version": 4
    }
  }
}