← Documentation Home

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

Features

Installation

composer require drupal/ai_agents_orchestra
drush en ai_agents_orchestra -y
drush cr

Dependencies

Required (Core Drupal Only)

Suggested

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

See Also