ZenRube is a sophisticated modular cognitive platform that provides expert AI orchestration and self-publishing capabilities to Rube.app. Built with a consensus-based architecture, it features specialized expert modules for intelligent data processing, routing, content generation, and automated publishing workflows.
- 🧠 Expert System Architecture: 11+ specialized expert modules for different tasks
- 🤝 Consensus-Based AI Orchestration: Multi-expert consensus system with configurable synthesis styles
- 🔀 Intelligent Routing: Advanced semantic analysis and intent detection
- 🧹 Data Processing: Automated data cleaning and preprocessing capabilities
- 📝 Content Generation: AI-powered summarization and content creation
- 📤 Publishing Pipeline: Structured content publishing and distribution
- 🚀 Auto-Publishing: Automated expert version detection and marketplace publishing
- 👥 Team Council: Multi-brain orchestration with Dynamic Personality System
- �️ YAML Configuration: Flexible configuration management (
.zenrube.yml) - 💾 Caching System: TTL-aware caching with multiple backend support
- 🔌 Extensible Design: Plugin-based architecture for custom experts
- 🧪 Comprehensive Testing: Full test suite with extensive coverage
- 🎭 Dynamic Profiles: Configurable expert personalities and behavior patterns
pip install zenrubeor for local development:
git clone https://github.com/vmanoilov/zenrube.git
cd zenrube
pip install -e .[dev]from zenrube import zen_consensus
# Run a consensus across all experts
result = zen_consensus(
"What are the key considerations for deploying a machine learning model to production?"
)
print(result["consensus"])The system includes 11 specialized experts:
- Semantic Router: Analyzes input text to infer intent and route data
- Data Cleaner: Processes and cleans data for consistent formatting
- Summarizer: Generates concise summaries using AI
- Publisher: Handles content formatting and publishing workflows
- Rube Adapter: Integrates with Rube.app platform
- LLM Connector: Provides LLM provider abstraction layer
- Version Manager: Manages expert versions and updates
- Auto Publisher: Automates expert publishing to marketplace
- Team Council: Multi-brain orchestration with Dynamic Personality System
- Expert Registry: Manages and discovers available experts
- Pragmatic Engineer: Practical engineering insights
- Systems Architect: High-level system architecture guidance
- Security Analyst: Security considerations and analysis
from zenrube.experts import SemanticRouterExpert
router = SemanticRouterExpert()
result = router.run("Error: Database connection failed")
# Returns: {"input": "...", "intent": "error", "route": "debug_expert"}from zenrube.experts import DataCleanerExpert
cleaner = DataCleanerExpert()
result = cleaner.run(raw_data)
# Returns cleaned and structured datafrom zenrube.experts_module import list_experts, get_expert
# List all available experts
experts = list_experts()
print(experts) # Returns list of all expert slugs
# Get specific expert
expert = get_expert('semantic_router')ZenRube loads configuration from .zenrube.yml in the project root and the user's home directory:
experts:
- pragmatic_engineer
- systems_architect
- security_analyst
synthesis_style: balanced
parallel_execution: true
provider: rube
max_workers: 4
cache_ttl_seconds: 120
logging:
level: INFO
debug: false
cache:
backend: memory
ttl: 120from zenrube import zen_consensus, SYNTHESIS_STYLES
# Custom consensus with specific experts and style
result = zen_consensus(
"How should we approach microservices architecture?",
experts=["systems_architect", "pragmatic_engineer", "security_analyst"],
synthesis_style="collaborative",
parallel=True
)Supported synthesis styles:
balanced: Balanced synthesis highlighting agreements and practical stepscritical: Critical synthesis emphasizing risks and mitigationscollaborative: Collaborative synthesis identifying synergies
All experts are managed through the ExpertRegistry:
from zenrube.experts_module import ExpertRegistry, ExpertDefinition
# Register a custom expert
custom_expert = ExpertDefinition(
slug="custom_processor",
name="Custom Processor",
description="Processes custom data types",
handler=custom_handler_function
)
ExpertRegistry.register(custom_expert)The provider architecture supports multiple LLM backends:
from zenrube.providers import ProviderRegistry
# Configure Rube provider
from zenrube import configure_rube_client
from rube import invoke_llm as rube_invoke
configure_rube_client(rube_invoke)The Team Council expert provides multi-brain orchestration:
from zenrube.experts import TeamCouncil
council = TeamCouncil()
result = council.coordinate_experts(
question="Comprehensive analysis of cloud migration strategy",
expert_profiles=["pragmatic_engineer", "systems_architect", "security_analyst"]
)Built-in caching system supports multiple backends:
cache:
backend: memory # or 'file', 'redis'
directory: .zenrube-cache
ttl: 120- memory: In-memory caching (default)
- file: File-system based caching
- redis: Redis-based distributed caching
Run the comprehensive test suite:
pip install -e .[dev]
pytest --cov=zenrubeTest coverage includes:
- Expert functionality and edge cases
- Configuration loading and validation
- Consensus orchestration
- Caching mechanisms
- Provider integration
- Error handling and degraded states
- Team Council functionality
- Dynamic personality system
Continuous integration runs formatting (black), linting (flake8), typing (mypy), and coverage on Python 3.9–3.12.
zenrube/
├── zenrube/ # Core package
│ ├── experts/ # Expert implementations
│ │ ├── semantic_router.py
│ │ ├── data_cleaner.py
│ │ ├── summarizer.py
│ │ ├── publisher.py
│ │ ├── autopublisher.py
│ │ ├── team_council.py
│ │ ├── version_manager.py
│ │ ├── rube_adapter.py
│ │ ├── llm_connector.py
│ │ └── expert_registry.py
│ ├── profiles/ # Dynamic personality system
│ │ ├── personality_engine.py
│ │ ├── dynamic_profile_engine.py
│ │ └── profile_controller.py
│ ├── orchestration/ # Consensus orchestration
│ └── config/ # Configuration management
├── tests/ # Comprehensive test suite
├── examples/ # Usage examples and demos
├── .zenrube.yml # Default configuration
└── pyproject.toml # Project metadata and dependencies
ZenRube provides a CLI interface for consensus operations:
# Basic consensus query
zenrube "What are the security implications of containerization?"
# Custom style and experts
zenrube "How to scale microservices?" --style collaborative --experts systems_architect pragmatic_engineer
# Sequential execution
zenrube "Database migration strategy" --sequential
# Debug mode
zenrube "Performance optimization" --debugThe Auto Publisher expert automatically detects version updates and publishes to Rube.app:
from zenrube.experts import AutoPublisherExpert
publisher = AutoPublisherExpert()
result = publisher.auto_publish_experts()
# Detects changes, regenerates manifests, and publishes automaticallyZenRube includes a Dynamic Personality System for configuring expert behavior:
from zenrube.profiles import DynamicProfileEngine
engine = DynamicProfileEngine()
profile = engine.create_profile(
name="cautious_analyst",
personality_traits=["risk_aware", "detail_oriented", "methodical"]
)See CONTRIBUTING.md for development guidelines and contribution workflows.
- Create expert class inheriting from base interface
- Add metadata and configuration
- Register in expert module
- Add comprehensive tests
- Update documentation
# Clone repository
git clone https://github.com/vmanoilov/zenrube.git
cd zenrube
# Install in development mode
pip install -e .[dev]
# Run tests
pytest
# Format code
black zenrube tests
flake8 zenrube tests
mypy zenrubeMIT License - see LICENSE file for details.
- Concept by @vmanoilov
- Built for the Rube.app automation platform
- Inspired by modular AI architectures and consensus-based systems
- Features Dynamic Personality System integration
ZenRube - Where AI experts collaborate to provide comprehensive solutions.