AI Agent Orchestra Module
Multi-agent AI orchestration with vector memory, cross-framework coordination, and multi-site management capabilities.
Overview
The AI Agent Orchestra module provides centralized orchestration for multiple AI agents, enabling complex multi-agent workflows, vector memory management, and cross-platform coordination.
Module Information
- Name: AI Agent Orchestra
- Machine Name:
ai_agents_orchestra - Package: AI & Machine Learning
- Version: 0.1.1
- Drupal Compatibility: ^10.2 || ^11
- OSSA Compliant: Yes
- Source:
/Users/flux423/Sites/LLM/all_drupal_custom/modules/ai_agents_orchestra/
Features
- Multi-Agent Orchestration: Coordinate multiple AI agents
- Vector Memory Management: Store and retrieve agent memories using embeddings
- Cross-Framework Coordination: Integrate with CrewAI, LangChain, HuggingFace
- Multi-Site Management: Deploy agents across multiple Drupal sites
- Task Distribution: Intelligent task routing based on agent capabilities
- Real-Time Monitoring: Monitor agent performance and health
- State Management: Track agent states using state_machine
- Queue Processing: Advanced queue management for agent tasks
Installation
composer require drupal/ai_agents_orchestra
drush en ai_agents_orchestra -y
drush cr
Dependencies
Required (Core Drupal Only)
- drupal:system (>=10.2)
- drupal:user
- drupal:node
- drupal:field
- drupal:text
- drupal:views
- drupal:datetime
- drupal:jsonapi
- drupal:serialization
- drupal:rest
Suggested
- ai:ai - AI framework integration
- ai_agents:ai_agents - AI Agents framework
- ai_automators:ai_automators - Automation chains
- eca:eca - Event-Condition-Action workflows
- eca:eca_base
- eca:eca_ui
- eca:eca_modeller_bpmn
- eca:eca_queue
- eck:eck - Entity Construction Kit
- state_machine:state_machine - State management
- advancedqueue:advancedqueue - Queue processing
- group:group - Multi-site grouping
- views_bulk_operations:views_bulk_operations
- rules:rules
- field_group:field_group
Configuration
Navigate to: /admin/config/ai/orchestra
# config/ai_agent_orchestra.settings.yml
orchestration:
max_concurrent_agents: 10
task_timeout: 300
enable_vector_memory: true
memory_dimensions: 768
coordination_strategy: 'intelligent'
Usage
Create Orchestra
<?php
use Drupal\ai_agents_orchestra\Entity\AgentOrchestra;
$orchestra = AgentOrchestra::create([
'label' => 'Content Processing Orchestra',
'description' => 'Orchestrates content analysis agents',
'agents' => [
'content_analyzer',
'sentiment_detector',
'quality_scorer',
],
'coordination_strategy' => 'sequential',
]);
$orchestra->save();
Execute Orchestra
<?php
// Load orchestra
$orchestra = \Drupal::entityTypeManager()
->getStorage('agent_orchestra')
->load('content_processing');
// Execute with context
$orchestrator = \Drupal::service('ai_agents_orchestra.orchestrator');
$result = $orchestrator->execute($orchestra, [
'content' => $content,
'requirements' => ['quality', 'sentiment'],
]);
Drush Commands
# List orchestras
drush orchestra:list
# Execute orchestra
drush orchestra:execute content_processing --context='{"content": "..."}'
# Monitor orchestras
drush orchestra:monitor
API Endpoints
REST API
# Execute orchestra
curl -X POST /api/v1/orchestra/execute \
-H "Content-Type: application/json" \
-d '{
"orchestra_id": "content_processing",
"context": {"content": "..."}
}'
GraphQL API
mutation {
executeOrchestra(
orchestraId: "content_processing"
context: {content: "..."}
) {
success
result
}
}
Vector Memory
<?php
// Store agent memory
$memory_service = \Drupal::service('ai_agents_orchestra.vector_memory');
$memory_service->store('agent_id', 'memory_content', [
'context' => 'conversation',
'timestamp' => time(),
]);
// Retrieve similar memories
$memories = $memory_service->search('agent_id', 'query', [
'limit' => 5,
'threshold' => 0.8,
]);
Resources
- Project: https://gitlab.bluefly.io/llm/drupal-modules/ai_agents_orchestra
- OSSA: https://gitlab.bluefly.io/llm/ossa