Skip to main content

AI Controller

The AI Controller provides comprehensive artificial intelligence capabilities including conversation processing, prompt template management, AI agent configuration, and intelligent automation for the VChata platform.

Base Path

Overview

This controller enables sophisticated AI-powered automation:
  • 🤖 AI Agents - Configure and manage intelligent response agents
  • 📝 Prompt Templates - Create and manage AI prompt templates
  • 🧠 Conversation Processing - Advanced conversation flow management
  • 🎯 Interactive Templates - Dynamic template management with variables
  • 🔄 Debug Tools - Conversation debugging and testing utilities
  • 📊 AI Analytics - Performance tracking and optimization insights

Authentication & Authorization

  • 🔐 All endpoints require valid JWT authentication token
  • 🏢 All operations are scoped to the user’s current organization
  • 👥 Organization membership required for all operations

AI Agents

Create AI Agent

Description: Creates a new AI agent for automated conversation handling.
object

Get AI Agents

Description: Retrieves AI agents with optional filtering.

Update AI Agent

Description: Updates an existing AI agent configuration.

Delete AI Agent

Description: Permanently deletes an AI agent.

Prompt Templates

Create Prompt Template

Description: Creates a new AI prompt template with variables and business context.
object

Get Prompt Templates

Description: Retrieves prompt templates with optional filtering and pagination.

Test Prompt Template

Description: Tests a prompt template with sample input and variables.

Interactive Templates

Create Interactive Template

Description: Creates an interactive prompt template with A/B testing support.

Get Interactive Templates

Description: Retrieves interactive templates with performance metrics.

Debug and Testing

Debug Conversation

Description: Debug a conversation to understand AI processing steps and performance.

AI Status Values

  • ACTIVE - AI agent is active and responding
  • PAUSED - AI agent is temporarily paused
  • INACTIVE - AI agent is inactive
  • TESTING - AI agent is in testing mode

Channel Types

  • DIRECT_MESSAGE - Private messages/DMs
  • COMMENT - Public comments on posts
  • POST - Direct posts (for posting content)

Error Responses

Common Errors

Advanced Features

Multi-Channel Support

AI agents can respond across multiple channels simultaneously:
  • Unified Responses - Consistent responses across all channels
  • Channel-Specific Logic - Different behavior per channel type
  • Cross-Platform Integration - Seamless integration with social media platforms

A/B Testing

Interactive templates support A/B testing:
  • Variant Management - Multiple template variants
  • Performance Tracking - Compare variant performance
  • Automatic Optimization - AI-powered variant selection

Business Hours Management

  • Timezone Support - Global timezone handling
  • Custom Hours - Flexible business hour configuration
  • Holiday Support - Holiday and exception handling
  • Graceful Degradation - Fallback responses outside business hours

Performance Optimization

  • Response Caching - Intelligent response caching
  • Batch Processing - Efficient batch operations
  • Rate Limiting - Respect API rate limits
  • Error Recovery - Automatic retry mechanisms