convoaibuilder
Version:
AI-powered ConvoAI project builder with multi-persona assistance and Claude Code integration
360 lines (251 loc) ⢠8.25 kB
Markdown
# 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