Skip to main content
PATCH
/
api
/
v1
/
admin
/
agents
/
{agentId}
/
model
curl -X PATCH https://alfred.black/api/v1/admin/agents/vault-curator/model \
  -H "Authorization: Bearer alf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"model": "anthropic/claude-sonnet-4"}'
{
  "message": "Model for Curator updated to anthropic/claude-sonnet-4",
  "agent": {
    "id": "vault-curator",
    "label": "Curator",
    "description": "Processes inbox into structured vault records",
    "defaultModel": "anthropic/claude-sonnet-4",
    "resolvedDefault": "anthropic/claude-sonnet-4",
    "fallbacks": [],
    "providers": [
      { "provider": "openrouter", "status": "configured", "source": "env" }
    ],
    "missingProviders": []
  }
}
Updates the default model for a specific agent. For OpenClaw agents (main, vault-curator, vault-janitor, vault-distiller), this sets the model via the OpenClaw CLI. For the surveyor, this updates config.yaml directly.

Path Parameters

agentId
string
required
The agent to update. One of: main, vault-curator, vault-janitor, vault-distiller, surveyor.

Request Body

model
string
required
The model identifier to set (e.g., anthropic/claude-sonnet-4, openai/gpt-4o, x-ai/grok-4.1-fast).
field
string
Only used when agentId is surveyor. Specifies which surveyor model to update. Set to embedder_model to change the embedding model, or omit to change the labeler model.

Response

For OpenClaw agents

message
string
Confirmation message including the agent name and new model.
agent
object
The updated agent status object (same shape as in the List Agents response).

For Surveyor

message
string
Confirmation message indicating which surveyor model was updated.
surveyor
object
The updated surveyor configuration with labeler_model, embedder_model, and embedder_source.

Request Example

curl -X PATCH https://alfred.black/api/v1/admin/agents/vault-curator/model \
  -H "Authorization: Bearer alf_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"model": "anthropic/claude-sonnet-4"}'

Response Example

{
  "message": "Model for Curator updated to anthropic/claude-sonnet-4",
  "agent": {
    "id": "vault-curator",
    "label": "Curator",
    "description": "Processes inbox into structured vault records",
    "defaultModel": "anthropic/claude-sonnet-4",
    "resolvedDefault": "anthropic/claude-sonnet-4",
    "fallbacks": [],
    "providers": [
      { "provider": "openrouter", "status": "configured", "source": "env" }
    ],
    "missingProviders": []
  }
}