Skip to main content
PATCH
/
api
/
agent
/
{agent_id}
/
persona
curl -X PATCH https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/persona \
  -H "X-API-Key: vaani_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "identity": {
      "system_prompt": "You are a helpful customer service agent.",
      "greeting_message": {
        "agent_message": "Hi! How can I help you today?",
        "agent_speech_delay": 1,
        "interruptible": true
      }
    },
    "senses_capabilities": {
      "language": "en",
      "brain": {
        "llm": {
          "primary": {
            "provider": "openai",
            "model": "gpt-4o",
            "parameters": { "temperature": 0.7 }
          }
        }
      }
    }
  }'
{
  "success": true,
  "message": "Persona section updated successfully"
}

Update Agent Persona

Partially update the persona section of an agent. Only the fields you include are deep-merged into the existing configuration; omitted fields are left unchanged. The persona section controls the agent’s identity (system prompt, greeting), AI providers (STT / LLM / TTS), actions, memories, and metadata.

Path Parameters

agent_id
string
required
UUID of the agent to update.

Body Parameters

identity
object
Core identity settings.
senses_capabilities
object
AI provider configuration for speech-to-text, LLM, and text-to-speech.
actions
object
Custom actions the agent can take during a call (provider-specific shape).
memories
object
Memory configuration for the agent (provider-specific shape).
metadata
object
Arbitrary metadata key-value pairs attached to the persona.

Request Example

curl -X PATCH https://api.vaanivoice.ai/api/agent/7ec4155e-0e62-440a-b983-5974f7697854/persona \
  -H "X-API-Key: vaani_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{
    "identity": {
      "system_prompt": "You are a helpful customer service agent.",
      "greeting_message": {
        "agent_message": "Hi! How can I help you today?",
        "agent_speech_delay": 1,
        "interruptible": true
      }
    },
    "senses_capabilities": {
      "language": "en",
      "brain": {
        "llm": {
          "primary": {
            "provider": "openai",
            "model": "gpt-4o",
            "parameters": { "temperature": 0.7 }
          }
        }
      }
    }
  }'

Response

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