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
}
}
}'
const response = await fetch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/training",
{
method: "PATCH",
headers: {
"X-API-Key": "vaani_<your_key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
know_how: {
faq: {
"What are your hours?": "We are open 9 AM to 5 PM, Monday to Friday.",
},
guardrails: { level: "medium" },
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
requests.patch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/training",
headers={"X-API-Key": "vaani_<your_key>", "Content-Type": "application/json"},
json={
"know_how": {
"faq": {"What are your hours?": "We are open 9 AM to 5 PM."},
"guardrails": {"level": "medium"},
}
},
)
{
"success": true,
"message": "Training section updated successfully"
}
Agents
Update Training
Partially update the training section of an agent
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
}
}
}'
const response = await fetch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/training",
{
method: "PATCH",
headers: {
"X-API-Key": "vaani_<your_key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
know_how: {
faq: {
"What are your hours?": "We are open 9 AM to 5 PM, Monday to Friday.",
},
guardrails: { level: "medium" },
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
requests.patch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/training",
headers={"X-API-Key": "vaani_<your_key>", "Content-Type": "application/json"},
json={
"know_how": {
"faq": {"What are your hours?": "We are open 9 AM to 5 PM."},
"guardrails": {"level": "medium"},
}
},
)
{
"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
string
required
UUID of the agent to update.
Body Parameters
object
object
Curated agent knowledge and safety rules.
Show know_how fields
Show know_how fields
object
Map of question → answer pairs the agent should know verbatim (e.g.
{"What are your hours?": "9 AM – 5 PM"}).object
Map of common customer pain-point labels to resolution guidance.
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
}
}
}'
const response = await fetch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/training",
{
method: "PATCH",
headers: {
"X-API-Key": "vaani_<your_key>",
"Content-Type": "application/json",
},
body: JSON.stringify({
know_how: {
faq: {
"What are your hours?": "We are open 9 AM to 5 PM, Monday to Friday.",
},
guardrails: { level: "medium" },
},
}),
}
);
const data = await response.json();
console.log(data);
import requests
requests.patch(
"https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/training",
headers={"X-API-Key": "vaani_<your_key>", "Content-Type": "application/json"},
json={
"know_how": {
"faq": {"What are your hours?": "We are open 9 AM to 5 PM."},
"guardrails": {"level": "medium"},
}
},
)
Response
{
"success": true,
"message": "Training section updated successfully"
}
⌘I

