Skip to content
QwryAI
Documentation
Pages

Commands

CLI Agents

List your QwryAI agents, read their settings, and change their instructions, model, chat interface and styles from the terminal

Use the agent tools to inspect and configure the agents in your workspace. Every command here is a tools:call; see CLI API for how calls and reviews work. Sign in first; see CLI Auth.

List and inspect

List every agent in the workspace, twenty per page:

Bash
qwryai-cli tools:call list_agents
JSON
{
  "success": true,
  "data": {
    "agents": [
      {
        "id": "<agentId>",
        "name": "QwryAI",
        "status": "active",
        "isDefault": true,
        "language": "en",
        "training": { "status": "pending", "percent": 75 }
      }
    ],
    "page": 1,
    "total": 1,
    "hasMore": false
  }
}

Pass {"page":2} in --args when hasMore is true. Keep the agent's id in a variable, since every agent tool takes it as chatbotId:

Bash
AGENT=$(qwryai-cli tools:call list_agents | jq -r '.data.agents[] | select(.name=="QwryAI") | .id')

Show one agent's stored model, citations, language, status and routing:

Bash
qwryai-cli tools:call agent_configuration --args "{\"chatbotId\":\"$AGENT\"}"
JSON
{
  "success": true,
  "data": {
    "chatbotId": "<agentId>",
    "updatedAt": "2026-12-01T13:50:39.104Z",
    "name": "QwryAI",
    "status": "active",
    "language": "en",
    "interpretation": "stored_configuration",
    "model": { "responseModel": "anthropic/claude-haiku-5.5", "temperature": 0.7, "maxTokens": null },
    "citationsEnabled": false,
    "escalationThreshold": 0.6,
    "routing": { "escalationEnabled": true, "strategy": "round_robin", "defaultPriority": "medium" }
  }
}

null means the setting was never set, not that a default applies. Read the instructions with agent_instructions, which returns them in 4,000-character pages:

Bash
qwryai-cli tools:call agent_instructions --args "{\"chatbotId\":\"$AGENT\",\"field\":\"systemPrompt\",\"offset\":0}"

Read the chat widget, Center Stage and channel settings, each under its own key such as ui.displayName or ui.primaryColor, with get_chat_interface.

Create and configure

Every change below is reviewed: the tool returns the before and after and a reviewId, and nothing changes until you run qwryai-cli apply <reviewId>. Each one also asks for expectedUpdatedAt, the updatedAt you just read, so you can't overwrite someone else's edit.

Change the instructions:

Bash
qwryai-cli tools:call update_instructions --args "{\"chatbotId\":\"$AGENT\",\"expectedUpdatedAt\":\"2026-12-01T13:50:39.104Z\",\"changes\":[{\"field\":\"guardrails\",\"value\":[\"Never promise a refund before the order is checked.\"]}]}"

changes can set systemPrompt, behaviorSystemPrompt, guardrails and requiredDisclaimers. Give one channel its own instructions with channel_specific_instructions, for example [{"channel":"whatsapp","instructions":"Keep replies under three sentences."}].

Change the model, temperature or citations:

Bash
qwryai-cli tools:call update_model --args "{\"chatbotId\":\"$AGENT\",\"expectedUpdatedAt\":\"2026-12-01T13:50:39.104Z\",\"changes\":[{\"field\":\"temperature\",\"value\":0.3}]}"

Copy a model name exactly from list_available_models before you set responseModel.

Update the chat widget's text and behaviour, such as its name, placeholder and welcome messages:

Bash
qwryai-cli tools:call update_chat_interface --args "{\"chatbotId\":\"$AGENT\",\"expectedUpdatedAt\":\"2026-12-01T13:50:39.104Z\",\"changes\":[{\"field\":\"welcomeMessages\",\"value\":[\"Hi! Ask me about orders, returns or sizing.\"]}]}"

Update its look, such as the theme, colors, position, radius and font:

Bash
qwryai-cli tools:call update_styles --args "{\"chatbotId\":\"$AGENT\",\"expectedUpdatedAt\":\"2026-12-01T13:50:39.104Z\",\"changes\":[{\"field\":\"theme\",\"value\":\"dark\"},{\"field\":\"primaryColor\",\"value\":\"#0f766e\"}]}"

For long inputs, keep the JSON in a file and pass it with --args "$(cat styles.json)".

Retrain and auto-retrain

Sources you add or edit stay New or Changed until you train them. Train every pending source, as Retrain agent does on the Data sources page:

Bash
qwryai-cli tools:call train_pending_sources --args "{\"chatbotId\":\"$AGENT\"}"

Apply the review to queue the training. See CLI Sources to train one source or follow progress.

Turn on weekly automatic retraining for a website source:

Bash
qwryai-cli tools:call toggle_auto_retrain --args "{\"chatbotId\":\"$AGENT\",\"sourceId\":\"<sourceId>\",\"expectedVersion\":3,\"enabled\":true}"

Auto-retrain is set per website source and needs a plan that includes it. Copy sourceId and expectedVersion from list_sources.

Commands

ToolPurpose
list_agentsList every agent in the workspace
agent_configurationShow one agent's model, citations, language, status and routing
agent_instructionsRead one instruction field in pages
get_chat_interfaceRead the chat widget, Center Stage and channel settings
list_available_modelsList the models you can choose, with their credit cost
update_instructionsChange instructions, guardrails, disclaimers or one channel's instructions (reviewed)
update_modelChange the model, temperature, max tokens or citations (reviewed)
update_chat_interfaceChange the widget's text and behaviour (reviewed)
update_stylesChange the widget's look (reviewed)
train_pending_sourcesTrain every new or changed source (reviewed)
toggle_auto_retrainTurn weekly retraining on or off for a website source (reviewed)

Explore the documentation