bluefly / ai_agentic_workflows
Advanced agentic AI workflows with ECA integration and multi-agent orchestration
0.1.0
2025-09-03 16:28 UTC
Requires
- php: >=8.1
- drupal/core: ^10 || ^11
- drupal/eca: ^2.0
- monolog/monolog: ^3.0
- symfony/workflow: ^6.0
Requires (Dev)
- drupal/core-dev: ^10 || ^11
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2025-09-26 18:12:06 UTC
README
Overview
Orchestrates multi-agent AI workflows using Drupal as the coordination platform. Integrates with CrewAI, HuggingFace agents, and vector databases for intelligent task automation.
🚀 Features
- Multi-Agent Orchestration: Coordinate multiple AI agents in collaborative workflows
- N8N Integration: Custom N8N nodes for workflow automation (Phase 2 Complete ✅)
- CrewAI Support: Collaborative agent frameworks with role-based coordination
- Vector Operations: Semantic search and RAG (Retrieval-Augmented Generation)
- Workflow Chaining: Sequential and hierarchical agent execution
- Real-time Monitoring: Track agent performance and workflow progress
📦 N8N Custom Nodes (New in Phase 2)
The module now includes a complete N8N integration package:
Available Nodes
- Drupal Agent Invoke: Execute Drupal AI agents from N8N workflows
- CrewAI Orchestrator: Multi-agent collaborative task execution
- Vector Hub Query: Semantic search and RAG operations
Installation
# Install N8N nodes package
npm install @bluefly/n8n-nodes-drupal-agents
# Or install via N8N Community Marketplace
# Go to Settings → Community Nodes → Install
# Enter: @bluefly/n8n-nodes-drupal-agents
Configuration
- Add "Drupal Agents API" credentials in N8N
- Configure Base URL and API token
- Set environment (production/development/local)
See /n8n-nodes/README.md
for complete documentation.
Requirements
- LLM core module
- ai_agent_crewai module
- API Normalizer module
- Vector Hub service (optional, for RAG operations)
Installation
# Install with dependencies
ddev drush en ai_agentic_workflows
# Configure workflow settings
ddev drush config:set ai_agentic_workflows.settings max_agents_per_workflow 10
Configuration
Navigate to /admin/config/ai/workflows
to configure:
- Agent orchestration settings
- N8N API endpoints
- Vector database connections
- Collaboration parameters
Usage Examples
Create Agent Workflow
$workflow_manager = \Drupal::service('ai_agentic_workflows.workflow_manager');
$workflow = $workflow_manager->createWorkflow([
'agents' => [
['type' => 'crewai', 'role' => 'researcher'],
['type' => 'vector', 'collection' => 'knowledge_base'],
['type' => 'content', 'operation' => 'create']
],
'process_type' => 'sequential'
]);
Execute Multi-Agent Task
$result = $workflow_manager->executeWorkflow($workflow_id, [
'task' => 'Research and create content about AI trends',
'context' => ['domain' => 'technology'],
'quality_threshold' => 0.8
]);
Monitor Workflow Execution
$status = $workflow_manager->getWorkflowStatus($workflow_id);
if ($status['completed']) {
$output = $status['result'];
$agent_logs = $status['agent_execution_logs'];
}
API Endpoints (N8N Integration)
Agent Operations
POST /api/v1/workflows/n8n/agents/invoke
- Execute single agentPOST /api/v1/workflows/n8n/chains/execute
- Execute agent chainGET /api/v1/workflows/n8n/executions/{id}/status
- Get execution status
CrewAI Operations
POST /api/v1/workflows/n8n/crewai/create
- Create agent crewPOST /api/v1/workflows/n8n/crewai/execute
- Execute crew taskPOST /api/v1/workflows/n8n/crewai/collaborative
- Collaborative execution
Vector Operations
POST /api/v1/workflows/n8n/vector/search
- Semantic searchPOST /api/v1/workflows/n8n/vector/rag
- RAG queryPOST /api/v1/workflows/n8n/vector/store
- Store documents
Entity Types
- Workflow: Defines multi-agent task sequences
- Execution: Tracks individual workflow runs
- Agent Log: Detailed agent execution records
Integration Points
- CrewAI: Multi-agent collaboration framework
- Vector Hub: Semantic search and embeddings
- N8N: Workflow automation platform
- HuggingFace: Model execution and inference
- OpenAI/Anthropic: LLM providers via gateway
Security Features
- Token-based API authentication
- Request validation and sanitization
- Audit logging for all executions
- Environment isolation
- Rate limiting protection
Performance Monitoring
All workflows provide detailed execution metadata including:
- Agent performance metrics
- Resource utilization
- Execution timelines
- Quality scores
- Error tracking
Development
Building N8N Nodes
cd n8n-nodes
npm install
npm run build
npm test
Testing
# Unit tests
npm test
# Integration tests (requires Drupal instance)
DRUPAL_BASE_URL=https://your-test-site.com npm run test:integration
Backwards Compatibility
All existing workflow functionality continues to work. N8N integration is additive.