bluefly / llm_platform
Enterprise AI coordination platform with comprehensive AI provider support, vector databases, and intelligent workflows built on Drupal 11 standards.
Requires
- php: >=8.1
- bluefly/ai_agent_crewai: ^0.1
- bluefly/ai_agent_huggingface: ^0.1
- bluefly/ai_agent_orchestra: ^0.1
- bluefly/ai_provider_apple: ^0.1
- bluefly/ai_provider_langchain: ^0.1
- bluefly/alternative_services: ^0.1
- bluefly/api_normalizer: ^0.1
- bluefly/gov_compliance: ^0.1
- bluefly/llm: ^0.1
- bluefly/llm_platform_manager: ^0.1
- bluefly/mcp_registry: ^0.1
- bluefly/recipe_onboarding: ^0.1
- bluefly/secure_drupal: ^0.1
- drupal/admin_toolbar: ^3.6
- drupal/advancedqueue: ^1.0
- drupal/ai: ^1.0
- drupal/ai_api_explorer: ^1.0
- drupal/ai_automators: ^1.0
- drupal/ai_content: ^1.0
- drupal/ai_provider_anthropic: ^1.0
- drupal/ai_provider_litellm: ^1.1@beta
- drupal/ai_provider_ollama: ^1.0@dev
- drupal/ai_provider_openai: ^1.0
- drupal/ai_translate: ^1.0
- drupal/ai_vdb_provider_milvus: ^1.0@dev
- drupal/core: ^10.3 || ^11.0
- drupal/ctools: ^4.1
- drupal/devel: ^5.0
- drupal/devel_generate: ^5.0
- drupal/eca: ^2.1
- drupal/eca_access: ^2.1
- drupal/eca_base: ^2.1
- drupal/eca_config: ^2.1
- drupal/eca_content: ^2.1
- drupal/eca_endpoint: ^2.1
- drupal/eca_ui: ^2.1
- drupal/eca_workflow: ^2.1
- drupal/encrypt: ^3.0
- drupal/entity: ^1.6
- drupal/entity_browser: ^2.0
- drupal/entity_reference_revisions: ^1.10
- drupal/entity_usage: ^2.0
- drupal/external_entities: ^3.0
- drupal/facets: ^3.0
- drupal/facets_summary: ^2.0
- drupal/field_encrypt: ^3.2.1 || ^4.0.0-alpha2
- drupal/field_group: ^3.4
- drupal/field_permissions: ^1.0
- drupal/field_validation: ^3.0
- drupal/gin: ^4.1
- drupal/health_check: ^3.0
- drupal/http_client_manager: ^3.0
- drupal/jsonapi_extras: ^3.0
- drupal/key: ^1.0
- drupal/memcache: ^2.7
- drupal/metatag: ^1.28
- drupal/monitoring: ^1.0
- drupal/openapi: ^2.3
- drupal/openapi_jsonapi: ^3.0
- drupal/openapi_ui: ^1.0@rc
- drupal/paragraphs: ^1.17
- drupal/pathauto: ^1.12
- drupal/project_browser: ^1.0
- drupal/queue_ui: ^3.0
- drupal/redirect: ^1.9
- drupal/redis: ^1.9
- drupal/restui: ^1.0
- drupal/search_api: ^1.38
- drupal/search_api_db: ^1.38
- drupal/search_api_solr: ^4.3
- drupal/search_api_solr_dense_vector: ^1.0@dev
- drupal/security_review: ^3.1
- drupal/stage_file_proxy: ^3.1
- drupal/token: ^1.15
- drupal/tour: ^1.0@dev
- drupal/typed_data: ^1.0
- drupal/workbench_access: ^2.0
- drush/drush: ^12.4.3 || ^13.0
Suggests
- bluefly/ai_agent_crewai: CrewAI provider integration
- bluefly/ai_agent_huggingface: HuggingFace AI agent
- bluefly/ai_agent_orchestra: AI agent orchestration and management
- bluefly/ai_provider_apple: Apple Foundation Models provider integration
- bluefly/ai_provider_langchain: LangChain provider integration
- bluefly/alternative_services: Alternative service providers support
- bluefly/api_normalizer: API standardization across providers
- bluefly/gov_compliance: Government compliance features
- bluefly/llm: Core LLM integration module
- bluefly/llm_platform_manager: Theme engine for platform management
- bluefly/mcp_registry: MCP server registry browser
- bluefly/recipe_onboarding: Recipe system onboarding tools
- drupal/admin_toolbar: Enhanced admin toolbar
- drupal/advagg: CSS/JS aggregation
- drupal/advancedqueue: Advanced queue management
- drupal/ai: AI integration framework
- drupal/ai_api_explorer: For API exploration and testing
- drupal/ai_automator: For automated field value generation
- drupal/ai_automators: AI automation tools
- drupal/ai_content: AI content generation
- drupal/ai_logging: AI operation logging
- drupal/ai_provider_amazeeio: For Amazee.io AI integration
- drupal/ai_provider_anthropic: Anthropic AI provider
- drupal/ai_provider_deepseek: For DeepSeek AI integration
- drupal/ai_provider_litellm: For LiteLLM integration
- drupal/ai_provider_lmstudio: For LM Studio integration
- drupal/ai_provider_ollama: Ollama AI provider
- drupal/ai_provider_openai: OpenAI provider
- drupal/ai_translate: AI-powered translation
- drupal/ai_vdb_provider_milvus: For Milvus vector database
- drupal/ai_vdb_provider_pinecone: For Pinecone vector database
- drupal/ai_vdb_provider_postgres: For PostgreSQL vector database
- drupal/ai_vdb_provider_qdrant: For Qdrant vector database (cloud-native)
- drupal/audit_export: For audit exports
- drupal/ctools: Chaos tool suite
- drupal/devel: Developer tools
- drupal/devel_generate: Content generation for testing
- drupal/eca: Event-condition-action framework
- drupal/eca_queue: For ECA queue processing
- drupal/encrypt: Data encryption
- drupal/entity: Entity API enhancements
- drupal/entity_browser: Entity browser interface
- drupal/entity_reference_revisions: Entity reference revisions
- drupal/entity_usage: Entity usage tracking
- drupal/external_entities: External entity integration
- drupal/facets: Search facets
- drupal/facets_summary: Facets summary
- drupal/feeds_tamper: For data transformation
- drupal/field_encrypt: Field-level encryption
- drupal/field_group: Field grouping
- drupal/field_permissions: Field permissions
- drupal/field_validation: Field validation
- drupal/gin: Modern admin theme
- drupal/health_check: System health monitoring
- drupal/http_client_manager: HTTP client management
- drupal/imageapi_optimize: Image optimization
- drupal/jsonapi_extras: JSON:API enhancements
- drupal/key: Key management system
- drupal/key_auth: Key-based authentication
- drupal/layout_options: For layout configuration
- drupal/lazy: Lazy loading
- drupal/mcp: Model Control Protocol
- drupal/memcache: Memcache integration
- drupal/metatag: Meta tag management
- drupal/monitoring: System monitoring
- drupal/openapi: OpenAPI documentation
- drupal/openapi_jsonapi: OpenAPI JSON:API integration
- drupal/openapi_ui: OpenAPI user interface
- drupal/paragraphs: Paragraphs field type
- drupal/pathauto: Automatic URL aliasing
- drupal/project_browser: Project browsing interface
- drupal/queue_order: Queue ordering
- drupal/queue_ui: Queue management UI
- drupal/redirect: URL redirection
- drupal/restui: REST UI management
- drupal/search_api: Search API framework
- drupal/search_api_db: Database search backend
- drupal/security_review: Security review
- drupal/tamper: For data tampering
- drupal/token: Token replacement
- drupal/tracer: For request tracing
- drupal/typed_data: For typed data handling
- drupal/ui_examples: For UI examples
- drupal/ui_icons: For icon management
- drupal/ui_icons_backport: For icon backporting
- drupal/ui_skins: For UI theming
- drupal/ui_suite: For UI suite components
- drupal/ui_suite_bootstrap: For Bootstrap UI components
- drupal/workbench_access: Workbench access control
- drupal/xray_audit: For advanced auditing
This package is auto-updated.
Last update: 2025-07-21 11:33:34 UTC
README
A comprehensive Drupal 10 recipe that creates an enterprise-grade AI coordination platform with multi-provider support, vector databases, intelligent workflows, and enterprise security.
Features
🤖 Multi-Provider AI Integration
- LiteLLM (unified provider interface) - DEFAULT
- Ollama (local, privacy-first)
- OpenAI (GPT-4, GPT-3.5)
- Anthropic (Claude 3)
- LangChain (orchestration)
- CrewAI (multi-agent systems)
- HuggingFace (model hub)
LiteLLM Integration
The recipe now uses LiteLLM as the default AI provider, offering unified access to multiple AI services:
# Default configuration
default_provider: 'litellm'
base_url: 'http://localhost:4000'
default_model: 'ollama/llama3.2'
Benefits:
- Single interface for all AI providers
- Automatic failover between providers
- Unified authentication and error handling
- Reduced custom code maintenance
🔐 Enterprise Security
- Built on secure_drupal foundation
- FedRAMP, HIPAA, PCI DSS, SOC2 compliance ready
- Advanced encryption and key management
- Comprehensive audit logging
🔍 Intelligent Search
- Vector embeddings with semantic search
- Multiple vector database support
- Search API integration
- Faceted search capabilities
🤝 AI Agents & Automation
- Multi-agent orchestration with CrewAI
- Workflow automation with ECA
- Content generation and moderation
- Research and analysis agents
🔗 Model Context Protocol (MCP)
- WebSocket, HTTP, and stdio transports
- Community registry browser integration
- Tool integration for enhanced capabilities
- LangChain tools compatibility
Requirements
- Drupal: 10.3+ or 11.0+
- PHP: 8.1+
- Node.js: 20.0.0+ (for npm packages)
- Composer: 2.0+
Optional Requirements
- Ollama: For local AI execution (recommended)
- Redis: For enhanced caching and performance
- Solr: For advanced search capabilities
Installation
Method 1: Using the Recipe (Recommended)
# Install the recipe and its dependencies
composer require bluefly/llm-platform-enterprise
# Apply the recipe to your Drupal site
php core/scripts/drupal recipe path/to/llm_platform
Method 2: With Input Variables
# Install with custom configuration
php core/scripts/drupal recipe path/to/llm_platform \
--site_name="My AI Platform" \
--admin_email="admin@mycompany.com" \
--default_provider="ollama"
Method 3: Development Installation
# Clone the repository
git clone https://github.com/bluefly/llm-platform-recipe.git
# Install dependencies
cd llm-platform-recipe
composer install
# Apply the recipe
php core/scripts/drupal recipe . --site_name="Dev Platform"
Post-Installation Setup
1. Configure AI Providers
Ollama (Recommended for privacy)
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
# Pull recommended models
ollama pull llama3.2:7b
ollama pull nomic-embed-text
# Verify in Drupal
Visit: /admin/config/ai/providers/test
Cloud Providers
- Get API keys from providers (OpenAI, Anthropic, etc.)
- Navigate to
/admin/config/system/keys
- Add your API keys securely
- Configure providers at
/admin/config/ai/providers
2. Complete Onboarding
Visit /admin/config/system/recipe-onboarding
to:
- Configure AI providers
- Set up vector databases
- Enable desired features
- Test integrations
3. Security Configuration
- Review Security Settings:
/admin/config/security
- Configure Encryption:
/admin/config/system/encrypt
- Set Up Key Management:
/admin/config/system/keys
- Run Security Review:
/admin/reports/security-review
Configuration
Input Variables
The recipe accepts these input variables:
Variable | Type | Default | Description |
---|---|---|---|
site_name | string | "LLM Platform" | Name of the AI platform site |
admin_email | system.site.mail | Administrator email address | |
default_provider | string | "ollama" | Default AI provider (ollama, openai, anthropic, langchain) |
Module Configuration
Core AI Modules:
ai
: Core AI frameworkai_logging
: Request/response loggingllm
: LLM Platform core functionality
Provider Modules:
ai_provider_ollama
: Local Ollama integrationai_provider_openai
: OpenAI GPT modelsai_provider_anthropic
: Anthropic Claude modelsai_provider_langchain
: Multi-provider orchestrationai_agent_crewai
: Multi-agent systemsai_agent_huggingface
: HuggingFace model hub
Platform Modules:
mcp_registry
: MCP server registry browseralternative_services
: Service discovery and failoverrecipe_onboarding
: Guided setup wizard
Usage Examples
Basic AI Chat
$ai_service = \Drupal::service('llm.chat');
$response = $ai_service->chat('Explain quantum computing', [
'provider' => 'ollama',
'model' => 'llama3.2:7b'
]);
Multi-Agent Workflow
$crew_service = \Drupal::service('ai_agent_crewai.manager');
$result = $crew_service->executeCrewWorkflow([
'task' => 'research_and_write_article',
'topic' => 'AI in Healthcare',
'agents' => ['researcher', 'writer', 'editor']
]);
Vector Search
$search_service = \Drupal::service('llm.vector_search');
$results = $search_service->semanticSearch('machine learning algorithms', [
'provider' => 'ollama',
'model' => 'nomic-embed-text',
'similarity_threshold' => 0.8
]);
Architecture
Provider Hierarchy
- Ollama (Primary) - Local execution, privacy-first
- OpenAI (Secondary) - Cloud fallback for advanced features
- Anthropic (Tertiary) - Specialized tasks requiring Claude models
- LangChain - Multi-provider orchestration layer
Security Foundation
Built on the secure_drupal
recipe providing:
- AES-256-GCM encryption
- Multi-factor authentication
- Comprehensive audit logging
- Compliance frameworks (FedRAMP, HIPAA, PCI DSS, SOC2)
Performance Optimization
- Redis caching for AI responses
- Connection pooling for providers
- Request batching and streaming
- Tiered cache strategy
Variants
The recipe includes three variants for different use cases:
Minimal (variants/minimal/
)
- ~34 modules
- Essential AI features only
- Single provider (Ollama)
- Basic security
Standard (variants/standard/
)
- ~76 modules
- Full-featured AI platform
- Multi-provider support
- Enhanced security
Enterprise (variants/enterprise/
)
- ~119 modules
- Enterprise-grade with compliance
- All providers and features
- Maximum security
API Documentation
The platform provides comprehensive APIs:
- REST API:
/api/ai/*
endpoints - GraphQL:
/graphql
with AI schema - OpenAPI:
/admin/config/services/openapi
- MCP Protocol: WebSocket on
:3001/mcp
Monitoring & Health
Health Dashboard
Visit /service-health
for real-time monitoring:
- Provider availability
- Response latency
- Error rates
- Token usage
- Cost tracking
Logs & Debugging
- AI Logs:
/admin/reports/ai-logging
- System Status:
/admin/reports/status
- Security Review:
/admin/reports/security-review
Troubleshooting
Common Issues
Ollama Connection Failed
# Check Ollama is running
curl http://localhost:11434/api/version
# Restart Ollama service
ollama serve
Module Dependencies Missing
# Update Composer dependencies
composer update
# Clear Drupal cache
drush cr
Permission Denied
- Ensure user has 'administer ai configuration' permission
- Check security module restrictions
- Verify API key access
Performance Issues
- Enable Redis caching
- Configure connection pooling
- Adjust rate limiting settings
- Monitor token usage
Contributing
- Fork the repository
- Create a feature branch:
git checkout -b feature/new-feature
- Follow Drupal coding standards
- Add tests for new functionality
- Submit a pull request
Development Setup
# Install development dependencies
composer install --dev
# Run tests
vendor/bin/phpunit
# Code quality checks
vendor/bin/phpcs
vendor/bin/phpstan
License
GPL-2.0-or-later - see LICENSE file.
Support
- Issues: GitHub Issues
- Documentation: Platform Docs
- Community: Drupal.org Project
Changelog
Version 1.0.0 (2025-01-09)
- Initial release with Drupal 11 support
- Multi-provider AI integration
- Enterprise security foundation
- MCP protocol support
- Vector search capabilities
- Multi-agent orchestration
Built with ❤️ for the Drupal AI community