Skip to main content
PATCH
/
api
/
agent
/
{agent_id}
/
training
curl -X PATCH https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/training \
  -H "X-API-Key: vaani_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "knowledge": {
      "use_rag": true
    },
    "know_how": {
      "faq": {
        "What are your hours?": "We are open 9 AM to 5 PM, Monday to Friday.",
        "How do I reset my password?": "Visit the login page and click Forgot Password."
      },
      "guardrails": {
        "level": "medium",
        "violence": true
      }
    }
  }'
{
  "success": true,
  "message": "Training section updated successfully"
}

Update Agent Training

Partially update the training section of an agent. Only the fields you include are merged into the existing config; omitted fields remain unchanged. The training section controls the agent’s knowledge base (RAG) and know-how (FAQ, pain points, guardrails).

Path Parameters

agent_id
string
required
UUID of the agent to update.

Body Parameters

knowledge
object
Knowledge base settings.
know_how
object
Curated agent knowledge and safety rules.

Request Example

curl -X PATCH https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/training \
  -H "X-API-Key: vaani_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "knowledge": {
      "use_rag": true
    },
    "know_how": {
      "faq": {
        "What are your hours?": "We are open 9 AM to 5 PM, Monday to Friday.",
        "How do I reset my password?": "Visit the login page and click Forgot Password."
      },
      "guardrails": {
        "level": "medium",
        "violence": true
      }
    }
  }'

Response

{
  "success": true,
  "message": "Training section updated successfully"
}