PRD 01: Core Orchestration Engine

1. Overview

Purpose

The Core Orchestration Engine is the brain of Automatos AI, responsible for task decomposition, agent assignment, and workflow coordination using Context Engineering principles.

Vision Alignment

Following the Context Engineering paradigm:

  • Receives complex tasks (organisms)

  • Breaks them into subtasks (organs)

  • Assigns to specialized agents (cells)

  • Manages context flow (molecules)

  • Generates optimized prompts (atoms)

2. Problem Statement

Currently, the orchestrator returns mock data and doesn't actually:

  • Break down tasks intelligently

  • Assign agents based on capabilities

  • Generate context-aware prompts

  • Coordinate multi-agent workflows

  • Learn from execution results

3. Success Criteria

4. Functional Requirements

4.1 Task Analysis & Decomposition

4.2 Agent Selection & Assignment

4.3 Prompt Engineering & Context Management

4.4 Execution Coordination

5. Technical Architecture

5.1 Core Components

5.2 Integration Points

  • LLM Provider Service: For task analysis and decomposition

  • Agent Registry: For capability matching

  • Context Engineering: For prompt optimization

  • Memory Service: For historical context

  • Field Theory: For context propagation

6. Implementation Details

6.1 Task Decomposition Algorithm

  1. Analyze task intent using LLM

  2. Identify key operations (CRUD, analysis, generation, etc.)

  3. Determine dependencies between operations

  4. Create execution graph with parallel/sequential paths

  5. Assign complexity scores to each subtask

6.2 Agent Matching Algorithm

  1. Extract required skills from subtask

  2. Query agent capabilities from database

  3. Calculate skill match scores

  4. Consider agent availability and current load

  5. Optimize assignment for overall efficiency

6.3 Context Engineering Integration

7. Database Schema Updates

8. API Endpoints

9. Files to Modify

  1. Create new file: orchestrator/core/task_decomposer.py

  2. Create new file: orchestrator/core/agent_selector.py

  3. Create new file: orchestrator/core/prompt_orchestrator.py

  4. Update: orchestrator/services/orchestrator_service.py (replace mock)

  5. Update: orchestrator/api/orchestrator.py (add real endpoints)

  6. Create migration: alembic/versions/xxx_add_orchestration_tables.py

10. Testing Strategy

Unit Tests

  • Task decomposition accuracy

  • Agent matching logic

  • Prompt generation quality

  • Context optimization

Integration Tests

  • End-to-end workflow execution

  • Multi-agent coordination

  • Memory integration

  • Performance benchmarks

User Acceptance Criteria

  • Complex task successfully decomposed

  • Agents assigned based on real capabilities

  • Prompts include relevant context

  • Execution completes with real results

  • Performance improves over time

11. Dependencies

  • PRD 02: Agent Factory (for agent creation)

  • PRD 03: Context Engineering (for prompt optimization)

  • PRD 05: Memory Systems (for historical context)

12. Timeline

  • Week 1: Core decomposition logic

  • Week 2: Agent selection algorithm

  • Week 3: Context integration

  • Week 4: Testing and optimization

13. Success Metrics

  • Task decomposition accuracy > 85%

  • Agent assignment optimization > 90%

  • Prompt quality score > 8/10

  • Execution success rate > 95%

  • Average task completion time < baseline - 30%

Last updated