v0.12.0 — Conversational AI Services¶
This release adds comprehensive Conversational AI support with six new services for building and managing AI voice agents, including agent management, conversation history, knowledge base (RAG), batch calling, analytics, and testing.
Highlights¶
- Agents Service: Full CRUD operations, branch management, deployment with traffic splitting
- Conversations Service: Access history, transcripts, audio recordings, search, and analytics
- Knowledge Base Service: RAG document management (files, text, URLs) for agent context
- Batch Calling Service: Schedule and manage bulk outbound calls
- Analytics Service: Real-time conversation metrics and live call counts
- Agent Testing Service: Organize test folders and manage response tests
New Services¶
Agents Service¶
Manage conversational AI agents with full CRUD, branching, and deployment:
// Create an agent
agent, err := client.Agents().Create(ctx, &elevenlabs.CreateAgentRequest{
Name: "Support Agent",
Tags: []string{"support"},
ConversationConfig: map[string]any{
"agent": map[string]any{
"prompt": map[string]any{
"prompt": "You are a helpful support agent.",
},
"first_message": "Hello! How can I help?",
},
},
})
// List agents with pagination and search
resp, err := client.Agents().List(ctx, &elevenlabs.ListAgentsOptions{
PageSize: 10,
Search: "support",
})
// Branch management for version control
branches, err := client.Agents().ListBranches(ctx, agentID)
newBranch, err := client.Agents().CreateBranch(ctx, agentID, &elevenlabs.CreateBranchRequest{
Name: "experiment-v2",
FromBranchID: mainBranchID,
})
// Deploy with traffic splitting (A/B testing)
err = client.Agents().Deploy(ctx, agentID, []elevenlabs.DeploymentRequest{
{BranchID: mainBranchID, Percentage: 80.0},
{BranchID: testBranchID, Percentage: 20.0},
})
// Simulate conversations for testing
result, err := client.Agents().SimulateConversation(ctx, agentID, &elevenlabs.SimulateConversationRequest{
SimulationSpec: elevenlabs.SimulationSpec{
Persona: "Frustrated customer asking about refund policy",
},
})
Conversations Service¶
Access conversation history, transcripts, and analytics:
// List conversations with filters
resp, err := client.Conversations().List(ctx, &elevenlabs.ListConversationsOptions{
AgentID: agentID,
CallSuccessful: "success",
PageSize: 10,
})
// Get conversation with full transcript
conv, err := client.Conversations().Get(ctx, conversationID)
for _, msg := range conv.Transcript {
fmt.Printf("[%s] %s\n", msg.Role, msg.Message)
}
// Get audio recording
audio, err := client.Conversations().GetAudio(ctx, conversationID)
// Search transcripts
results, err := client.Conversations().Search(ctx, "refund policy", nil)
// Submit feedback and run analysis
err = client.Conversations().SubmitFeedback(ctx, conversationID, &elevenlabs.ConversationFeedback{
Rating: 5,
Feedback: "Excellent support interaction",
})
analysis, err := client.Conversations().RunAnalysis(ctx, conversationID)
Knowledge Base Service¶
Manage RAG documents for agent context:
// Upload a file document
f, _ := os.Open("product-manual.pdf")
doc, err := client.KnowledgeBase().CreateFileDocument(ctx, &elevenlabs.CreateFileDocumentRequest{
File: f,
FileName: "product-manual.pdf",
Name: "Product Manual",
})
// Create a text document
doc, err := client.KnowledgeBase().CreateTextDocument(ctx, &elevenlabs.CreateTextDocumentRequest{
Content: "Your company FAQ content here...",
Name: "Company FAQ",
})
// Index a URL
doc, err := client.KnowledgeBase().CreateURLDocument(ctx, &elevenlabs.CreateURLDocumentRequest{
URL: "https://docs.example.com/api",
Name: "API Documentation",
})
// List and retrieve documents
resp, err := client.KnowledgeBase().List(ctx, &elevenlabs.ListDocumentsOptions{PageSize: 20})
chunks, err := client.KnowledgeBase().GetChunks(ctx, documentID)
Batch Calling Service¶
Schedule and manage bulk outbound calls:
// Create a batch call job
batch, err := client.BatchCalling().Create(ctx, &elevenlabs.CreateBatchCallRequest{
Name: "Customer Outreach Campaign",
AgentID: agentID,
PhoneNumberID: phoneNumberID,
Recipients: []elevenlabs.BatchCallRecipient{
{PhoneNumber: "+14155551234"},
{PhoneNumber: "+14155555678"},
},
Timezone: "America/New_York",
})
// List and manage batch calls
batches, err := client.BatchCalling().List(ctx, nil)
err = client.BatchCalling().Cancel(ctx, batchID)
err = client.BatchCalling().Retry(ctx, batchID)
Analytics Service¶
Real-time conversation metrics:
// Get number of active conversations
count, err := client.Analytics().GetLiveCount(ctx)
fmt.Printf("Active conversations: %d\n", count)
Agent Testing Service¶
Organize and manage agent tests:
// Create a test folder
folder, err := client.AgentTesting().CreateFolder(ctx, &elevenlabs.CreateTestFolderRequest{
Name: "Regression Tests",
})
// List tests and manage folders
tests, err := client.AgentTesting().ListTests(ctx, &elevenlabs.ListTestsOptions{PageSize: 20})
err = client.AgentTesting().BulkMoveTests(ctx, &elevenlabs.BulkMoveTestsRequest{
TestIDs: []string{"test1", "test2"},
TargetFolderID: folderID,
})
Dependencies¶
- Bump
github.com/ogen-go/ogenfrom 1.20.3 to 1.22.0 - Bump
github.com/plexusone/ogen-toolsfrom 0.2.1 to 0.3.0 - Bump
github.com/plexusone/omnivoice-corefrom 0.13.0 to 0.14.0 - Bump
actions/checkoutfrom 6 to 7 (CI)