Universal Bot - Enterprise AI Automation Framework
Enterprise-grade AI automation framework integrating AWS Bedrock, PDMT templating, and AssetGen content generation into a unified, production-ready platform.
๐ Overview
Universal Bot is a comprehensive AI-powered automation framework that combines cutting-edge technologies from production systems:
- AWS Bedrock Integration: Enterprise-grade AI model orchestration with Claude Opus 4.1, Sonnet 4, and more
- PDMT Templating: Deterministic, reproducible content generation with quality gates
- AssetGen Engine: Automated educational and marketing content creation
- MCP Protocol: Native Model Context Protocol support for AI assistants
- Production-Ready: 85%+ test coverage, property testing, and comprehensive validation
๐๏ธ Core Technologies
AWS Bedrock Runtime
- Connection Pooling: Enterprise-grade connection management with retry logic
- Model Orchestra: Claude Opus 4.1, Sonnet 4, Llama, Titan multi-model support
- Token Management: Automatic usage tracking and cost optimization
- Streaming: Real-time response streaming for interactive applications
- Metrics: Comprehensive observability with latency and success tracking
PDMT (Pragmatic Deterministic MCP Templating)
- Zero-Temperature Generation: Reproducible outputs with deterministic templates
- Quality Gates: PMAT enforcement with coverage, complexity, and SATD detection
- Todo Validation: Actionability scoring and dependency analysis
- MCP Native: Full Model Context Protocol support via PMCP SDK
AssetGen Content Engine
- Multi-Format Generation: Quizzes, labs, blog posts, marketing content
- Platform-Specific: MailChimp, LinkedIn, Discord, Bluesky optimized content
- Meta-Aware Validation: Automatic detection and removal of transcript artifacts
- GitHub Integration: Automated publishing pipeline with issue tracking
๐ฆ Key Features
AI Model Integration
- โ AWS Bedrock Runtime: Production-ready with retry logic and pooling
- โ Multi-Model Support: Claude, Llama, Titan, Jurassic orchestration
- โ Token Optimization: Automatic counting and cost tracking
- โ Streaming Responses: Real-time token generation
Content Generation
- โ Educational Materials: Automated quiz, lab, and reflection creation
- โ Marketing Content: Platform-specific for MailChimp, LinkedIn, Discord
- โ Blog Generation: Technical blogs with Zola/Hugo support
- โ Transcription Processing: Whisper.cpp integration
Quality Assurance
- โ Property Testing: 100+ property tests ensuring robustness
- โ Coverage Tracking: 85%+ test coverage with reporting
- โ Validation Pipeline: Multi-stage validation with quality gates
- โ CI/CD Integration: GitHub Actions and self-hosted runners
๐๏ธ Architecture
universal-bot/
โโโ core/ # Core Rust components
โ โโโ bedrock/ # AWS Bedrock client implementation
โ โ โโโ client.rs # Connection pooling & retry logic
โ โ โโโ models.rs # Model configuration & selection
โ โ โโโ metrics.rs # Token usage & cost tracking
โ โโโ pdmt/ # Template engine
โ โ โโโ engine.rs # Handlebars-based generation
โ โ โโโ validators.rs # Todo validation & scoring
โ โ โโโ quality.rs # Quality gate enforcement
โ โโโ providers/ # AI provider abstractions
โ โโโ bedrock.rs # AWS Bedrock provider
โ โโโ mcp.rs # MCP protocol provider
โโโ generators/ # Content generation modules
โ โโโ quiz/ # Quiz generation with validation
โ โโโ blog/ # Blog post generation
โ โโโ marketing/ # Multi-platform marketing
โ โโโ educational/ # Labs, reflections, key terms
โโโ validators/ # Validation components
โ โโโ content.rs # Meta-aware content validation
โ โโโ quality.rs # Quality gate checks
โ โโโ structure.rs # Course structure validation
โโโ integrations/ # External integrations
โโโ github/ # GitHub API & Actions
โโโ aws/ # S3, Bedrock services
โโโ mcp/ # Model Context Protocol
๐ ๏ธ Prerequisites
Required
- Rust 1.75+ (latest stable)
- AWS Account with Bedrock access
- 8GB RAM minimum
- 2GB disk space
Optional
- Node.js 18+ (for TypeScript integrations)
- Docker (for containerized deployment)
- GitHub account (for CI/CD)
๐ฆ Installation
From crates.io
[]
= "1.0"
From source
# Clone the repository
# Install dependencies
# Configure AWS credentials
# Run tests to verify setup
# Start the bot
๐ Repository Structure
universal-bot-rust/
โ
โโโ ๐ฆ core/ # The 80% - Universal AI Brain
โ โโโ src/
โ โ โโโ bedrock/ # AWS Bedrock client & models
โ โ โ โโโ client.rs # Connection management
โ โ โ โโโ models.rs # Model orchestration
โ โ โ โโโ streaming.rs # Real-time responses
โ โ โ
โ โ โโโ conversation/ # Conversation engine
โ โ โ โโโ pipeline.rs # Message processing
โ โ โ โโโ state.rs # State machines
โ โ โ โโโ context.rs # Memory management
โ โ โ
โ โ โโโ plugins/ # Extension system
โ โ โ โโโ traits.rs # Plugin interfaces
โ โ โ โโโ registry.rs # Plugin management
โ โ โ โโโ builtin/ # Core plugins
โ โ โ
โ โ โโโ lib.rs # Public API
โ โ
โ โโโ examples/ # Runnable demonstrations
โ โ โโโ basic_conversation.rs
โ โ โโโ multi_model_chat.rs
โ โ โโโ stream_conversation.rs
โ โ โโโ plugin_demo.rs
โ โ
โ โโโ Cargo.toml # Dependencies
โ
โโโ ๐ adapters/ # The 20% - Platform Theory
โ โโโ discord_theory.md # Discord architecture (no code)
โ โโโ slack_theory.md # Slack patterns (conceptual)
โ โโโ web_api_theory.md # REST endpoints (theory)
โ โโโ integration_patterns.md # General adapter design
โ
โโโ ๐ course/ # Video course materials
โ โโโ module_1/ # Foundation videos
โ โโโ module_2/ # Core engine videos
โ โโโ module_3/ # Advanced patterns
โ โโโ module_4/ # Plugin architecture
โ โโโ module_5/ # Platform theory
โ
โโโ ๐ docs/ # Documentation
โ โโโ architecture.md # System design
โ โโโ bedrock_setup.md # AWS configuration
โ โโโ rust_patterns.md # Rust best practices
โ โโโ deployment.md # Production guide
โ
โโโ ๐งช tests/ # Test suite
โ โโโ integration/ # End-to-end tests
โ โโโ unit/ # Component tests
โ
โโโ ๐ง scripts/ # Utility scripts
โโโ setup.sh # Environment setup
โโโ test.sh # Run all tests
โโโ deploy.sh # Deployment helper
๐ก Key Concepts Visualized
The Message Pipeline
Think of messages flowing through a factory assembly line:
Raw Input Enriched Routed
โ โ โ
โผ โผ โผ
โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ
โ Sanitizeโ โโโโโโโโโโโบ โ Context โ โโโโโโโโโโโโบ โ Model โ
โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ
โ Display โ โโโโโโโโโโโ โ Format โ โโโโโโโโโโโ โ AI โ
โโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโ
Final Output Structured Response
The Plugin System
Like LEGO blocks with standardized connectors:
// Any plugin can connect if it fits the trait
๐งช Testing
# Run all tests
# Run specific test suite
# Run property tests
# Run integration tests
# Generate coverage report
# Run linting and formatting
๐ Example: Your First Universal Bot
use ;
async
๐ Course Philosophy
Why 80/20?
- 80% Universal: The AI logic, conversation management, and business logic remain constant
- 20% Specific: Only the platform connection changes
Why Rust?
- Memory Safety: No null pointer exceptions in production
- Performance: Near C++ speed with high-level abstractions
- Concurrency: True parallel processing with Tokio
- Type Safety: Catch errors at compile time, not runtime
Why AWS Bedrock?
- Multi-Model: Access to Claude, Llama, and more
- Enterprise Ready: Built for production scale
- Streaming: Real-time token generation
- Managed: No model hosting headaches
๐ค Community & Support
Get Help
- ๐ฌ Discord Server: Join our community
- ๐ Issues: Report bugs
- ๐ก Discussions: Share ideas
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Office Hours
- Tuesdays: 2 PM EST - Rust basics
- Thursdays: 3 PM EST - AWS Bedrock deep dive
- Fridays: 1 PM EST - Architecture review
๐ Progress Tracking
Track your learning journey:
- -----
๐ Certification Path
Complete all modules and build a custom bot brain to earn:
- Certificate of Completion
- Portfolio Project for GitHub
- LinkedIn Badge for your profile
- Community Recognition as a Universal Bot Architect
๐ Success Metrics
What Success Looks Like
Week 1: "I can connect to AWS Bedrock from Rust"
Week 2: "I built a conversation engine"
Week 3: "My bot uses multiple AI models"
Week 4: "I created custom plugins"
Week 5: "I understand how to adapt this anywhere"
Final: "I have a production-ready AI brain"
๐ฎ Beyond the Course
Where This Leads
- Senior Positions: Architect-level thinking
- Startup Ready: Build AI products quickly
- Open Source: Contribute to major projects
- Consulting: Help others modernize their bots
Next Steps After Completion
- Build a production bot for a real use case
- Create your own platform adapter
- Contribute plugins to the community
- Teach others the 80/20 approach
๐ License
This project is licensed under the MIT License - see LICENSE file for details.
๐ Acknowledgments
- AWS Bedrock Team for the powerful AI platform
- Rust Community for the amazing ecosystem
- Tokio Project for async runtime excellence
- You for choosing to think differently about bots
๐ง Stop Building Bots. Start Building Brains. ๐ง
The future isn't platform-specific. It's universally intelligent.
Start Course โข Watch Videos โข Join Community