The AI platform that builds, deploys, and evolves intelligent brand personas across channels
PersonaOS is an AI-powered Brand Intelligence Platform that creates, deploys, and continuously evolves intelligent brand personas. It transforms fragmented marketing tools into a unified, self-learning system that speaks with your brand's voice, engages authentically, and optimizes based on real-world performance.
- Features
- Architecture
- Getting Started
- Prerequisites
- Installation
- Configuration
- Usage
- API Documentation
- Tech Stack
- Project Structure
- Development
- Deployment
- Contributing
- License
-
π§ AI Persona Creation
- Upload brand documents (PDF, DOCX, TXT) to train your AI
- 5-dimensional tone configuration (formality, humor, technical depth, empathy, energy)
- Custom guardrails and brand value enforcement
- Dynamic system prompt generation
-
π¬ Intelligent Conversations (RAG)
- Retrieval-Augmented Generation for accurate, context-aware responses
- Vector database integration with Qdrant
- Conversation history management with Redis caching
- Multi-turn dialogue support
-
π‘ Multi-Channel Deployment (Coming Soon)
- Web chat widget
- Telegram bot
- WhatsApp integration
- Discord bot
- Instagram DMs
- Email automation
-
π Analytics & Learning
- Real-time event tracking
- Conversation analytics
- Time-series data visualization
- Performance metrics per channel
-
π Authentication & Security
- JWT-based authentication
- Role-based access control
- Secure password hashing with bcrypt
- API key management
PersonaOS follows a modular, microservices-inspired architecture:
βββββββββββββββββββββββββββββββββββββββββββ
β Frontend (Next.js) β
β Dashboard, Persona Builder, Analytics β
βββββββββββββββββββ¬ββββββββββββββββββββββββ
β REST API
βββββββββββββββββββ΄ββββββββββββββββββββββββ
β Backend (NestJS) β
β ββββββββββββββββββββββββββββββββββββ β
β β AI Core β β
β β β’ LLM Integration (OpenAI, etc.)β β
β β β’ Embedding Generation β β
β β β’ Document Processing β β
β ββββββββββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββββββββββ β
β β Persona Engine β β
β β β’ Context Management β β
β β β’ Tone Control β β
β β β’ Memory Management β β
β ββββββββββββββββββββββββββββββββββββ β
β ββββββββββββββββββββββββββββββββββββ β
β β Chat & RAG β β
β β β’ Conversation Management β β
β β β’ Vector Search β β
β β β’ Response Generation β β
β ββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββ¬ββββββββββββββββββββββββ
β
βββββββββββββββΌββββββββββββββ
β β β
βββββΌββββ βββββΌβββββ βββββΌβββββ
βPostgresβ β Redis β β Qdrant β
β (DB) β β(Cache) β β(Vector)β
ββββββββββ ββββββββββ ββββββββββ
Before you begin, ensure you have the following installed:
- Node.js (v18.0.0 or higher)
- npm (v9.0.0 or higher)
- Docker & Docker Compose (for local development)
- Git
- Clone the repository
git clone https://github.com/yourusername/personaos.git
cd personaos- Install dependencies
npm install- Start infrastructure services (PostgreSQL, Redis, Qdrant)
npm run docker:upThis will start:
- PostgreSQL on
localhost:5432 - Redis on
localhost:6379 - Qdrant on
localhost:6333
- Set up environment variables
cd apps/backend
cp .env.example .envEdit .env and add your API keys:
# Required: OpenAI API Key
OPENAI_API_KEY=sk-your-openai-key-here
# Optional: Anthropic API Key (for Claude models)
ANTHROPIC_API_KEY=sk-ant-your-anthropic-key-here
# JWT Secret (change in production!)
JWT_SECRET=your-secret-key-here- Run database migrations
npm run db:migrate- Start the development server
npm run devThis will start:
- Backend API:
http://localhost:3001 - API Documentation:
http://localhost:3001/api/docs
| Variable | Description | Default | Required |
|---|---|---|---|
DATABASE_URL |
PostgreSQL connection string | postgresql://personaos:... |
Yes |
REDIS_HOST |
Redis host | localhost |
Yes |
REDIS_PORT |
Redis port | 6379 |
Yes |
QDRANT_URL |
Qdrant API URL | http://localhost:6333 |
Yes |
OPENAI_API_KEY |
OpenAI API key | - | Yes |
ANTHROPIC_API_KEY |
Anthropic API key | - | No |
JWT_SECRET |
Secret for JWT signing | - | Yes |
JWT_EXPIRES_IN |
JWT expiration time | 7d |
No |
PORT |
API server port | 3001 |
No |
curl -X POST http://localhost:3001/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{
"email": "user@example.com",
"password": "securepassword123",
"name": "John Doe"
}'Response:
{
"user": {
"id": "uuid",
"email": "user@example.com",
"name": "John Doe",
"plan": "FREE"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}curl -X POST http://localhost:3001/api/v1/personas \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"name": "TechBrand AI",
"description": "AI assistant for TechBrand company",
"toneConfig": {
"formality": 7,
"humor": 5,
"technical": 8,
"empathy": 6,
"energy": 7
},
"guardrails": {
"topicsToAvoid": ["politics", "religion"],
"brandValues": ["innovation", "customer-first", "transparency"]
}
}'curl -X POST http://localhost:3001/api/v1/personas/{personaId}/documents/upload \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-F "file=@/path/to/document.pdf"curl -X POST http://localhost:3001/api/v1/chat \
-H "Content-Type: application/json" \
-d '{
"personaId": "your-persona-id",
"message": "What are your company values?"
}'Response:
{
"conversationId": "conversation-uuid",
"messageId": "message-uuid",
"response": "Our company is built on three core values...",
"metadata": {
"model": "gpt-4-turbo-preview",
"tokensUsed": 245,
"contextChunks": 3,
"processingTime": 1234
}
}Once the server is running, visit the interactive API documentation:
Swagger UI: http://localhost:3001/api/docs
POST /api/v1/auth/register- Register new userPOST /api/v1/auth/login- LoginGET /api/v1/auth/me- Get current user
POST /api/v1/personas- Create personaGET /api/v1/personas- List all personasGET /api/v1/personas/:id- Get persona detailsPATCH /api/v1/personas/:id- Update personaDELETE /api/v1/personas/:id- Delete personaGET /api/v1/personas/:id/stats- Get persona statistics
POST /api/v1/personas/:id/documents/upload- Upload filePOST /api/v1/personas/:id/documents/text- Upload textGET /api/v1/personas/:id/documents- List documentsDELETE /api/v1/personas/:id/documents/:documentId- Delete document
POST /api/v1/chat- Send message and get responseGET /api/v1/chat/conversations/:personaId- List conversationsGET /api/v1/chat/conversation/:id- Get conversation historyPOST /api/v1/chat/conversation/:id/end- End conversationPOST /api/v1/chat/message/:id/feedback- Provide feedback
POST /api/v1/analytics/track- Track custom eventGET /api/v1/analytics/persona/:id- Get analytics summaryGET /api/v1/analytics/persona/:id/timeseries- Get time-series data
- Framework: NestJS (Node.js + TypeScript)
- Database: PostgreSQL with Prisma ORM
- Cache: Redis with ioredis
- Vector DB: Qdrant
- AI/ML:
- OpenAI API (GPT-4, GPT-3.5-Turbo, text-embedding-3-small)
- Anthropic API (Claude)
- LangChain (orchestration)
- Authentication: JWT with Passport
- Documentation: Swagger/OpenAPI
- Framework: Next.js 14 (React, TypeScript)
- Styling: Tailwind CSS + shadcn/ui
- State: React Query + Zustand
- Charts: Recharts
- Containerization: Docker
- Orchestration: Docker Compose
- CI/CD: GitHub Actions
personaos/
βββ apps/
β βββ backend/ # NestJS API server
β β βββ src/
β β β βββ modules/
β β β β βββ ai/ # LLM integration
β β β β βββ auth/ # Authentication
β β β β βββ persona/ # Persona management
β β β β βββ chat/ # Conversation & RAG
β β β β βββ deployment/ # Channel deployment
β β β β βββ analytics/ # Analytics tracking
β β β β βββ database/ # Prisma service
β β β β βββ cache/ # Redis service
β β β β βββ vector/ # Qdrant service
β β β βββ app.module.ts
β β β βββ index.ts
β β βββ prisma/
β β β βββ schema.prisma # Database schema
β β βββ package.json
β βββ frontend/ # Next.js app (coming soon)
βββ packages/
β βββ shared/ # Shared types/utils
β βββ ui/ # Shared UI components
βββ docker-compose.yml # Local dev infrastructure
βββ turbo.json # Turborepo config
βββ package.json # Root package.json
βββ PRODUCT_BLUEPRINT_ENHANCED.md # Detailed product spec
βββ README.md # This file
npm run testnpm run lint# Generate Prisma client
npm run db:generate
# Create a new migration
npm run db:migrate
# Open Prisma Studio (database GUI)
npm run db:studio
# Seed database
npm run db:seednpm run docker:downnpm run clean
npm run buildEnsure you set these in production:
NODE_ENV=production
DATABASE_URL=your-production-db-url
REDIS_HOST=your-production-redis-host
QDRANT_URL=your-production-qdrant-url
JWT_SECRET=strong-random-secret
OPENAI_API_KEY=your-openai-keynpm run db:migrate:prodnpm run buildnpm start- Persona creation and management
- Document upload and processing
- RAG-based conversations
- Basic analytics
- Authentication system
- Multi-channel deployment (Telegram, WhatsApp, Discord)
- Web chat widget
- Advanced analytics dashboard
- A/B testing for responses
- Team collaboration features
- Persona marketplace
- Voice cloning integration
- Multi-agent orchestration
- API SDK for developers
- White-label options
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Documentation: Full Product Blueprint
- Issues: GitHub Issues
- Email: support@personaos.com
- Discord: Join our community
- OpenAI for GPT models
- Anthropic for Claude
- Qdrant team for the vector database
- NestJS and Next.js communities
Built with β€οΈ by the PersonaOS Team
Turning brands into intelligent, conversational AI