UNPKG

convoaibuilder

Version:

AI-powered ConvoAI project builder with multi-persona assistance and Claude Code integration

360 lines (251 loc) • 8.25 kB
# ConvoAI Builder > AI-powered ConvoAI project builder with multi-persona assistance ConvoAI Builder is an intelligent CLI tool that helps you build, configure, and deploy ConvoAI projects through natural conversation with specialized AI personas. ## Features šŸ¤– **Multi-Persona AI System** - Get expert help from 5 specialized AI personas: - šŸ—ļø **Architect** - System design & architecture decisions - šŸ’» **Developer** - Code implementation & debugging - āš™ļø **Configurator** - Setup & configuration - šŸš€ **Deployer** - Deployment & DevOps - šŸŽ“ **Advisor** - Best practices & guidance ✨ **Interactive Project Setup** - Initialize projects with guided setup šŸŽÆ **Context-Aware Assistance** - Maintains project state across conversations šŸ“¦ **Template System** - Pre-built agent templates for common use cases šŸš€ **Multi-Platform Deployment** - Deploy to Vercel, AWS, GCP, Docker, or self-hosted ## Installation ```bash npm install -g convoaibuilder ``` ## Quick Start ### 1. Initialize a New Project ```bash convoaibuilder init my-convoai-app cd my-convoai-app ``` ### 2. Configure Your Project ```bash # Copy environment template cp .env.example .env # Edit .env and add your API keys # - OPENAI_API_KEY # - ELEVENLABS_API_KEY # - AGORA_APP_ID # - AGORA_APP_CERT ``` ### 3. Chat with the Builder Agent ```bash convoaibuilder chat ``` Example conversation: ``` You: I want to create a customer support agent šŸ’» developer: I'll help you create a customer support agent. Let me generate the code... [Generates agent code with configuration] āœ“ Agent created: backend/src/agents/customer-support.ts āœ“ Updated: convoai.config.yaml ``` ### 4. Add More Agents ```bash convoaibuilder add-agent ``` ### 5. Deploy Your Project ```bash convoaibuilder deploy ``` ## Commands ### `convoaibuilder init [project-name]` Initialize a new ConvoAI project with interactive setup. **Options:** - `-t, --template <type>` - Project template (express, nextjs, fullstack) - `-y, --yes` - Skip prompts and use defaults **Example:** ```bash convoaibuilder init my-app --template fullstack ``` ### `convoaibuilder chat` Start interactive chat with ConvoAI Builder Agent. **Options:** - `-p, --persona <name>` - Start with specific persona - `-w, --workflow <name>` - Load specific workflow **Example:** ```bash convoaibuilder chat --persona architect ``` **Special Commands in Chat:** - `/help` - Show available commands - `/personas` - List available personas - `/workflows` - List available workflows - `/context` - Show current context - `/reset` - Reset conversation context - `exit` - Exit chat mode ### `convoaibuilder add-agent` Add a new conversational agent to your project. **Options:** - `-n, --name <name>` - Agent name - `-t, --template <type>` - Agent template **Example:** ```bash convoaibuilder add-agent --name "Sales Assistant" --template sales ``` ### `convoaibuilder deploy` Deploy your ConvoAI project. **Options:** - `-p, --platform <name>` - Deployment platform **Supported Platforms:** - `docker` - Local Docker containers - `vercel` - Vercel (recommended for quick start) - `aws` - Amazon Web Services - `gcp` - Google Cloud Platform - `self-hosted` - Generate deployment files **Example:** ```bash convoaibuilder deploy --platform vercel ``` ### `convoaibuilder info` Show ConvoAI Builder Agent information and available personas. ## AI Personas ConvoAI Builder uses specialized AI personas that adapt to your needs: ### šŸ—ļø Architect Expert in system design and architecture decisions. Asks clarifying questions about your requirements and recommends optimal technology stacks and provider configurations. **Use for:** Architecture decisions, scalability planning, provider selection ### šŸ’» Developer Full-stack developer specialized in ConvoAI implementations. Generates clean, type-safe code following best practices. **Use for:** Code implementation, debugging, custom features ### āš™ļø Configurator Configuration expert for ConvoAI systems. Helps set up environment variables, agent configurations, and provider settings. **Use for:** Setup, configuration, environment management ### šŸš€ Deployer DevOps expert for deploying ConvoAI projects. Guides you through deployment to various platforms with best practices. **Use for:** Deployment, CI/CD, infrastructure setup ### šŸŽ“ Advisor Mentor and guide for ConvoAI developers. Teaches concepts, best practices, and helps with learning. **Use for:** Learning, best practices, troubleshooting, guidance ## Agent Templates ConvoAI Builder includes pre-built templates for common use cases: - **customer-service** - Customer support and service agents - **sales** - Sales and product assistance agents - **education** - Educational tutoring agents - **healthcare** - Healthcare assistance (HIPAA considerations) - **hr-support** - HR and employee support agents - **interview-practice** - Interview simulation and practice - **custom** - Start from scratch ## Project Structure After initialization, your project will have this structure: ``` my-convoai-app/ ā”œā”€ā”€ backend/ │ ā”œā”€ā”€ src/ │ │ └── agents/ │ └── tests/ ā”œā”€ā”€ frontend/ │ └── src/ ā”œā”€ā”€ convoai.config.yaml ā”œā”€ā”€ .env.example ā”œā”€ā”€ CONVOAI_LIBRARY_CONTEXT.md ā”œā”€ā”€ package.json └── README.md ``` ## Configuration ### convoai.config.yaml Main configuration file for your ConvoAI project: ```yaml version: 1.0 providers: openai: apiKey: ${OPENAI_API_KEY} model: gpt-4-turbo elevenlabs: apiKey: ${ELEVENLABS_API_KEY} agora: appId: ${AGORA_APP_ID} appCertificate: ${AGORA_APP_CERT} agents: customer-support: name: Customer Support Bot template: customer-service language: en-US voice: female-warm features: transcription: true feedback: true analytics: true ``` ### Environment Variables Required environment variables (`.env`): ```bash # OpenAI API Key OPENAI_API_KEY=sk-... # ElevenLabs API Key ELEVENLABS_API_KEY=... # Agora Credentials AGORA_APP_ID=... AGORA_APP_CERT=... # JWT Secret JWT_SECRET=... # Database (optional, auto-uses SQLite) DB_HOST=localhost DB_PORT=5432 DB_NAME=convoai DB_USER=postgres DB_PASSWORD=... ``` ## Requirements - Node.js >= 18.0.0 - npm or yarn - API keys for: - OpenAI (for LLM) - ElevenLabs or Azure (for TTS) - Agora (for RTC) ## Examples ### Create a Healthcare Voice Agent ```bash convoaibuilder init healthcare-assistant cd healthcare-assistant convoaibuilder chat You: I need a HIPAA-compliant patient intake agent šŸ—ļø architect: For HIPAA compliance, I recommend: - Azure TTS (HIPAA compliant) - OpenAI Business/Enterprise - PostgreSQL with encryption - Self-hosted deployment šŸŽ“ advisor: Let me help you understand HIPAA requirements... ``` ### Add Multiple Agents ```bash convoaibuilder add-agent --name "Support Bot" --template customer-service convoaibuilder add-agent --name "Sales Bot" --template sales convoaibuilder add-agent --name "Tutor Bot" --template education ``` ### Deploy to Production ```bash convoaibuilder deploy --platform vercel āœ“ Backend deployed: https://api-abc123.vercel.app āœ“ Frontend deployed: https://app-abc123.vercel.app ``` ## Programmatic API You can also use ConvoAI Builder programmatically: ```javascript const { ConvoAIBuilderAgent } = require('convoaibuilder'); const agent = new ConvoAIBuilderAgent({ contextFile: './CONVOAI_LIBRARY_CONTEXT.md', workspaceRoot: process.cwd(), defaultPersona: 'advisor' }); // Chat with the agent const response = await agent.chat('How do I create a new agent?'); console.log(response.persona); // 'developer' console.log(response.prompt); // Full prompt with context ``` ## License UNLICENSED - Proprietary software. All rights reserved. Copyright (c) 2025 Sarthak Batra ## Support For issues, questions, or feature requests, please contact the maintainer. ## Links - [ConvoAI Library Documentation](https://github.com/yourusername/convoai) - [Agora Documentation](https://docs.agora.io/) - [OpenAI API](https://platform.openai.com/docs/) - [ElevenLabs API](https://elevenlabs.io/docs/) --- Built with ā¤ļø by Sarthak Batra