๐ Dual-Mode AI Developer Success Engineer for Inngest
Complete RAG system with web interface and external integration capabilities. Provides expert-level Inngest guidance through both direct chat and Redis-based worker for Discord bots, Slack apps, and other external platforms.
This system provides two powerful ways to access expert Inngest knowledge:
- Direct Access: Beautiful web UI for interactive Inngest guidance
- Real-time Streaming: Live GPT-4 responses with academic citations
- Document Upload: Add custom knowledge bases via web interface
- Perfect for: Direct development, documentation, team training
- Redis-Based: Message queue worker for external platform integration
- Discord Ready: Powers Discord bots with same expert knowledge
- API-First: JSON event-driven architecture for any platform
- Perfect for: Discord bots, Slack apps, CLI tools, external systems
- RAG Architecture: Retrieval-Augmented Generation with Pinecone vector database
- Inngest Knowledge: Trained on official Inngest documentation (1M+ characters, 1,444+ chunks)
- Expert-Level Responses: Production-ready guidance with concrete configurations
- Academic Citations: Clean numbered citations with clickable references
- Streaming Responses: Real-time GPT-4 responses with live typing
- Modern UI: Shadcn/UI components with professional styling
- Syntax Highlighting: Code blocks with copy functionality
- Mobile Responsive: Works perfectly on all devices
- Example Questions: Quick-start prompts for common scenarios
- Redis Integration: Pub/Sub message queue for external systems
- Event-Driven: JSON-based query/response architecture
- Error Handling: Comprehensive error responses with fallbacks
- Multi-Domain: Support for different knowledge domains
- Production Ready: Graceful shutdown, logging, monitoring
๐ Web Interface (Mode 1) ๐ค External Integrations (Mode 2)
โโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโ
โ Next.js Web App โ โ Discord Bot โ
โ โโโ Chat UI โ โ โโโ Discord API โ
โ โโโ Upload UI โ โ โโโ Redis Client โ
โ โโโ API Routes โ โโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โผ โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Core RAG Engine โ
โ โโโ src/lib/ai.ts # Shared RAG pipeline โ
โ โโโ src/lib/ragWorker.ts # Redis worker โ
โ โโโ Pinecone Vector DB # Knowledge storage โ
โ โโโ OpenAI GPT-4 # Response generation โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Mode 1: Direct Web Access
User โ Web UI โ API Route โ RAG Engine โ Streaming Response
Mode 2: External Integration
Discord User โ Discord Bot โ Redis โ RAG Worker โ Redis โ Discord Bot
src/
โโโ lib/
โ โโโ ai.ts # Core RAG pipeline (shared)
โ โโโ ragWorker.ts # Redis worker for external integrations
โ โโโ docs.ts # Document ingestion and chunking
โ โโโ config.ts # Domain configurations
โ โโโ utils.ts # Utility functions
โโโ app/api/
โ โโโ chat/route.ts # Web interface streaming API
โ โโโ ingest/route.ts # Document upload API
โโโ components/
โ โโโ chat-interface.tsx # Web chat UI (includes upload functionality)
โ โโโ message-bubble.tsx # Message display component
โ โโโ markdown-renderer.tsx # Markdown rendering with syntax highlighting
โ โโโ ui/ # Shadcn UI components
โโโ scripts/
โโโ rag-worker.ts # RAG worker startup script
โโโ ingest-docs.ts # Bulk documentation ingestion
โโโ check-docs-freshness.ts # Documentation monitoring
โโโ test-common-responses.ts # Response quality testing
โโโ git-workflow.sh # GitFlow workflow helper
- Node.js 18+
- OpenAI API account
- Pinecone account
- Redis server (for RAG worker mode)
git clone <your-repo-url>
cd inngest-document-app
npm installCreate .env file:
# Core RAG Configuration
OPENAI_API_KEY=sk-... # OpenAI API key
PINECONE_API_KEY=... # Pinecone API key
PINECONE_INDEX_NAME=tech-docs # Pinecone index name
# RAG Worker Configuration (optional)
REDIS_URL=redis://localhost:6379 # Redis server for worker mode# Start web interface and upload docs
npm run dev
# Visit http://localhost:3000 โ Upload tab โ Ingest documentationnpm run dev
# Visit http://localhost:3000- Real-time Chat: Ask Inngest questions with streaming responses
- Document Upload: Add custom knowledge via integrated web UI
- Academic Citations: Numbered references with clickable links
- Code Highlighting: Professional syntax highlighting with copy buttons
๐ง "My Inngest function isn't triggering. How do I debug this?"
โก "How do I implement error handling and retries in Inngest?"
๐ "How do I break my function into steps to avoid timeouts?"
๐ "What's the best way to rate limit my Inngest functions?"
# Option 1: Docker (Recommended)
docker run -d --name inngest-redis -p 6379:6379 redis:7-alpine
# Option 2: Local installation
brew install redis
redis-servernpm run rag-workerExpected output:
โ
All environment variables loaded
โ
Redis connected
๐ค RAG worker started, listening for queries...
interface RAGQueryEvent {
id: string; // UUID for tracking
userId: string; // User identifier (Discord ID, etc.)
channelId: string; // Channel identifier
message: string; // User question
domain: string; // Knowledge domain (default: 'inngest')
timestamp: number; // Unix timestamp
}interface RAGResponseEvent {
id: string; // Same as query ID
userId: string; // Same as query
channelId: string; // Same as query
response: string; // AI response text
sources: string[]; // Source URLs/references
success: boolean; // Process success flag
timestamp: number; // Response timestamp
}# Send test query
docker exec inngest-redis redis-cli PUBLISH rag:query '{"id":"test-123","userId":"test-user","channelId":"test-channel","message":"How does Inngest work?","domain":"inngest","timestamp":1234567890}'
# Listen for response
docker exec inngest-redis redis-cli SUBSCRIBE rag:responseThe RAG worker is designed to work with Discord bots built in separate repositories:
# In your Discord bot repository
npm install ioredis discord.js
# Connect to same Redis instance
# Send queries to rag:query channel
# Listen for responses on rag:response channelSee the Discord Bot Integration Guide for complete setup instructions.
npm run dev # Start web interface (Mode 1)
npm run rag-worker # Start RAG worker (Mode 2)
npm run build # Production build
npm run lint # ESLint checking
npm run ingest # Bulk documentation ingestion
npm run check-docs # Check documentation freshness
npm run test-responses # Test response quality
npm run workflow # GitFlow workflow helpernpm run dev
# Develop web UI, test chat functionality# Terminal 1: Start Redis
docker start inngest-redis
# Terminal 2: Start RAG Worker
npm run rag-worker
# Terminal 3: Develop external integration
# (Discord bot, CLI tool, etc.)# Required for both modes
OPENAI_API_KEY=sk-... # OpenAI API key
PINECONE_API_KEY=... # Pinecone API key
PINECONE_INDEX_NAME=tech-docs # Pinecone index name
# Required for RAG Worker mode only
REDIS_URL=redis://localhost:6379 # Redis connection string
# Optional
NEXT_PUBLIC_APP_URL=http://localhost:3000 # Web interface URL# Deploy to Vercel (recommended for web interface)
npx vercel --prod
# Set environment variables in Vercel dashboard:
# - OPENAI_API_KEY
# - PINECONE_API_KEY
# - PINECONE_INDEX_NAME# Deploy worker as separate service (Docker recommended)
docker build -t inngest-rag-worker .
docker run -d -e OPENAI_API_KEY=... -e PINECONE_API_KEY=... -e REDIS_URL=... inngest-rag-worker
# Or use cloud platforms:
# - Railway: Deploy worker as separate service
# - Render: Background worker deployment
# - DigitalOcean: Container deployment- Development: Docker container (
redis:7-alpine) - Production: Redis Cloud, AWS ElastiCache, or DigitalOcean Redis
- Architecture Overview - Deep dive into dual-mode system design
- Discord Integration Guide - Complete Discord bot implementation
- API Reference - Event schemas and interfaces
- RAG Pipeline - How AI processing works
- Scaling Guide - Production scaling patterns
- Security Guide - Security best practices
- Web Interface Setup - Get web UI running
- RAG Worker Setup - External integration setup
- Redis Setup - Infrastructure configuration
- Coverage: 95% of major Inngest documentation sections
- Chunks: 1,444 knowledge chunks
- Response Time: <2 seconds for complex queries
- Relevance: 0.4 threshold for optimal accuracy
- Initial Setup: ~$2-5 for documentation ingestion (one-time)
- Web Interface: ~$0.10-0.50/day for typical development use
- RAG Worker: ~$0.01-0.03 per external query
- Redis: Free tier sufficient for development, ~$15-50/month production
- โ Developer Documentation: Interactive Inngest guidance
- โ Team Training: Onboarding new developers
- โ Custom Knowledge: Upload team-specific documentation
- โ Research & Learning: Academic-style citations and references
- โ Discord Bots: Community support automation
- โ Slack Apps: Internal team knowledge sharing
- โ CLI Tools: Command-line Inngest assistance
- โ API Integrations: Embed in existing developer tools
- โ Documentation Sites: Real-time help widgets
- โ VS Code Extensions: IDE-integrated assistance
- Core RAG infrastructure with Pinecone
- Web interface with streaming chat
- Document upload and multi-domain support
- Redis-based RAG worker for external integrations
- Production-ready error handling and monitoring
- Discord bot reference implementation
- Enhanced Redis worker monitoring
- Worker auto-scaling documentation
- Multi-language SDK examples
- Conversation history persistence
- Advanced analytics dashboard
- Team collaboration features
- Plugin system for custom integrations
- Check your API key is correct and has credits
- Verify billing is set up in OpenAI dashboard
- Ensure you have access to GPT-4 (may require usage history)
- Verify your Pinecone API key and index name
- Check index dimensions are set to 1536
- Ensure index uses cosine metric
- Run the ingestion process via the upload interface
- Check that documents were successfully stored in Pinecone
- Verify namespace
inngest-docsexists in your index
- Clear Next.js cache:
rm -rf .next - Reinstall dependencies:
rm -rf node_modules && npm install - Check Node.js version (requires 18+)
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inngest Team for comprehensive documentation and LLM-optimized content
- Pinecone for powerful vector database infrastructure
- OpenAI for GPT-4 and embedding models
- Vercel for Next.js framework and deployment platform
Built with โค๏ธ for the Inngest Developer Community