Skip to content

About

Dirigent AI is meta-agent for Crew AI agent orchestrations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Dirigent AI - Meta-Orchestration System

A sophisticated meta-orchestration system that enables users to create complex AI workflows through natural language descriptions called "vibes". The system uses a Kiro-based "Dirigent" agent to analyze user goals and dynamically generate YAML configurations for specialized CrewAI agent teams.

πŸš€ Quick Start

Prerequisites

  • Python 3.11 or higher
  • OpenAI API key
  • Serper API key (optional, for web search functionality)

Installation

  1. Clone and setup the project:
git clone <repository-url>
cd dirigent-ai
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
pip install -r requirements.txt
  1. Configure environment variables:
cp .env.template .env
# Edit .env file with your API keys:
# OPENAI_API_KEY=your_openai_api_key_here
# SERPER_API_KEY=your_serper_api_key_here (optional)
  1. Run system diagnostics:
python -m dirigent_ai.main --diagnostics

Basic Usage

Run with a vibe file:

python -m dirigent_ai.main --vibe-file vibes/gamebook_creation.txt --execute

Run with direct text input:

python -m dirigent_ai.main --vibe-text "Create a comprehensive market research report on electric vehicles" --execute

Validation mode (no crew execution):

python -m dirigent_ai.main --vibe-file vibes/real_estate_search.txt

πŸ—οΈ System Architecture

Dirigent AI implements a meta-orchestration pattern with two main components:

1. Dirigent Agent (Kiro-based)

  • Purpose: Intelligent configuration generator
  • Input: Natural language "vibes" (user goals)
  • Output: Valid YAML configurations for CrewAI teams
  • Location: Kiro steering document (.kiro/steering/dirigent-agent.md)

2. Skeleton Runner (Python)

  • Purpose: Universal execution engine
  • Input: YAML configurations from Dirigent Agent
  • Output: Executed AI workflows and results
  • Location: dirigent_ai/skeleton_runner.py

Workflow Pipeline

User Vibe β†’ Skeleton Runner β†’ Dirigent Agent β†’ YAML Config β†’ CrewAI Execution β†’ Results

πŸ“ Project Structure

dirigent-ai/
β”œβ”€β”€ dirigent_ai/                    # Main package
β”‚   β”œβ”€β”€ __init__.py
β”‚   β”œβ”€β”€ main.py                     # Entry point
β”‚   β”œβ”€β”€ config.py                   # Configuration management
β”‚   β”œβ”€β”€ skeleton_runner.py          # Core orchestration logic
β”‚   β”œβ”€β”€ kiro_interface.py          # Kiro agent communication
β”‚   β”œβ”€β”€ crew_manager.py            # CrewAI management
β”‚   β”œβ”€β”€ tool_registry.py           # Available tools registry
β”‚   β”œβ”€β”€ vibe_loader.py             # Input handling
β”‚   β”œβ”€β”€ yaml_config.py             # YAML processing
β”‚   β”œβ”€β”€ setup.py                   # Installation script
β”‚   β”œβ”€β”€ requirements.txt           # Dependencies
β”‚   └── README.md                  # Package documentation
β”œβ”€β”€ vibes/                         # Example vibe files
β”‚   β”œβ”€β”€ gamebook_creation.txt
β”‚   β”œβ”€β”€ real_estate_search.txt
β”‚   └── test_simple.txt
β”œβ”€β”€ output/                        # Generated results
β”œβ”€β”€ logs/                          # Application logs
β”œβ”€β”€ .kiro/                         # Kiro configuration
β”‚   β”œβ”€β”€ specs/dirigent-ai/         # Project specifications
β”‚   └── steering/dirigent-agent.md # Dirigent agent configuration
β”œβ”€β”€ .env.template                  # Environment template
β”œβ”€β”€ requirements.txt               # Project dependencies
└── README.md                      # This file

πŸ› οΈ Available Tools

The system includes the following CrewAI tools that can be assigned to agents:

Tool Name Purpose Use Cases
web_search SerperDevTool for web searching Market research, fact-checking, current events
website_scraper WebsiteSearchTool for content extraction Specific site analysis, data collection
file_reader FileReadTool for reading files Document analysis, data processing
doc_writer FileWriteTool for writing documents Report generation, content creation

πŸ“‹ Command Line Options

python -m dirigent_ai.main [OPTIONS]

Options:
  --vibe-file, -f PATH     Path to text file containing vibe description
  --vibe-text, -t TEXT     Vibe description as direct text argument
  --output, -o PATH        Output file path for results (optional)
  --execute               Execute the generated crew (default: validation only)
  --verbose, -v           Enable verbose logging and save YAML config
  --diagnostics           Display comprehensive system diagnostics
  --help, -h              Show help message

🎯 Example Vibes

Gamebook Creation

Create an interactive fantasy gamebook with multiple storylines, character development, and meaningful choices that affect the narrative outcome. Include at least 3 different character classes and branching paths based on player decisions.

Market Research

Conduct comprehensive market research on the electric vehicle industry, including current market leaders, emerging technologies, consumer trends, and future projections for the next 5 years.

Real Estate Analysis

Find and analyze the top 10 residential properties in Austin, Texas under $500,000, including neighborhood analysis, price trends, and investment potential.

πŸ”§ Configuration

Environment Variables

Required:

  • OPENAI_API_KEY: Your OpenAI API key for LLM functionality

Optional:

  • SERPER_API_KEY: Your Serper API key for web search capabilities
  • DIRIGENT_LOG_LEVEL: Logging level (DEBUG, INFO, WARNING, ERROR)
  • DIRIGENT_TIMEOUT: Timeout for Kiro agent calls (default: 300 seconds)
  • DIRIGENT_MAX_RETRIES: Maximum retry attempts (default: 3)

Configuration Files

  • .env: Environment variables (create from .env.template)
  • dirigent_ai/config.py: System configuration and defaults
  • .kiro/steering/dirigent-agent.md: Dirigent agent behavior configuration

πŸ§ͺ Testing and Validation

System Health Check

python -m dirigent_ai.main --diagnostics

Validation Mode

Run without --execute flag to validate YAML generation without crew execution:

python -m dirigent_ai.main --vibe-file vibes/test_simple.txt --verbose

Integration Tests

python test_dirigent_ai_integration.py
python test_integration_workflows.py

πŸ› Troubleshooting

Common Issues

1. "Kiro agent communication error"

  • Verify Kiro agent is accessible and running
  • Check network connectivity
  • Review .kiro/steering/dirigent-agent.md configuration

2. "Invalid YAML configuration"

  • Check Dirigent agent output format
  • Verify tool names match registry
  • Ensure agent names are properly referenced in tasks

3. "Missing API keys"

  • Verify .env file exists and contains required keys
  • Check environment variable names match exactly
  • Ensure API keys are valid and have sufficient credits

4. "Tool not found in registry"

  • Check available tools with --diagnostics flag
  • Verify tool names in YAML match registry exactly
  • Review dirigent_ai/tool_registry.py for available tools

Debug Mode

Enable verbose logging for detailed troubleshooting:

python -m dirigent_ai.main --vibe-file your_vibe.txt --verbose --diagnostics

Log Files

  • Application logs: logs/dirigent.log
  • System logs: docs-meta/system.log
  • Error logs: docs-meta/error_log.txt

πŸ“š Documentation

Technical Documentation

  • Requirements: .kiro/specs/dirigent-ai/requirements.md
  • Design: .kiro/specs/dirigent-ai/design.md
  • Implementation Tasks: .kiro/specs/dirigent-ai/tasks.md
  • System Architecture: docs-meta/05_system_description.md

Development Documentation

  • Current Status: docs-meta/02_functional_components.md
  • Known Issues: docs-meta/01_current_problems.md
  • Setup Guide: docs-meta/03_run_manual.md
  • Code Overview: docs-meta/04_code_orientation.md

🀝 Contributing

This project follows the Dirigent AI specification. See the design and requirements documents in .kiro/specs/dirigent-ai/ for detailed implementation guidelines.

Development Status

  • βœ… Core infrastructure and tool registry
  • βœ… Vibe input loading and CLI interface
  • βœ… Kiro Dirigent Agent integration
  • βœ… YAML configuration generation and validation
  • βœ… Dynamic CrewAI object creation
  • βœ… Complete workflow orchestration
  • βœ… Demonstration scenarios (gamebook, real estate)
  • πŸ”„ Integration testing and validation
  • πŸ”„ Comprehensive documentation

πŸ“„ License

[Add your license information here]

πŸ†˜ Support

For issues and questions:

  1. Check the troubleshooting section above
  2. Review the documentation in docs-meta/
  3. Check existing issues in the project repository
  4. Create a new issue with detailed error information and logs

About

Dirigent AI is meta-agent for Crew AI agent orchestrations

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages