Create an AI agent for a sender. Each sender can have at most one agent.
curl --request POST \
--url https://api.zavu.dev/v1/senders/{senderId}/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Customer Support",
"provider": "openai",
"model": "gpt-4o-mini",
"systemPrompt": "You are a helpful customer support agent. Be friendly and concise.",
"apiKey": "sk-..."
}
'{
"agent": {
"id": "agent_abc123",
"senderId": "sender_12345",
"name": "Customer Support Agent",
"enabled": true,
"provider": "openai",
"model": "gpt-4o-mini",
"systemPrompt": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"contextWindowMessages": 10,
"includeContactMetadata": true,
"maxTokens": 123,
"temperature": 123,
"triggerOnChannels": [
"sms",
"whatsapp"
],
"triggerOnMessageTypes": [
"text"
],
"stats": {
"totalInvocations": 123,
"totalTokensUsed": 123,
"totalCost": 123
}
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
100LLM provider for the AI agent.
openai, anthropic, google, mistral, zavu 10000API key for the LLM provider. Required unless provider is 'zavu'.
1 <= x <= 501 <= x <= 40960 <= x <= 2Agent created.
AI Agent configuration for a sender.
Show child attributes
curl --request POST \
--url https://api.zavu.dev/v1/senders/{senderId}/agent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Customer Support",
"provider": "openai",
"model": "gpt-4o-mini",
"systemPrompt": "You are a helpful customer support agent. Be friendly and concise.",
"apiKey": "sk-..."
}
'{
"agent": {
"id": "agent_abc123",
"senderId": "sender_12345",
"name": "Customer Support Agent",
"enabled": true,
"provider": "openai",
"model": "gpt-4o-mini",
"systemPrompt": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"contextWindowMessages": 10,
"includeContactMetadata": true,
"maxTokens": 123,
"temperature": 123,
"triggerOnChannels": [
"sms",
"whatsapp"
],
"triggerOnMessageTypes": [
"text"
],
"stats": {
"totalInvocations": 123,
"totalTokensUsed": 123,
"totalCost": 123
}
}
}