"""
Coordinator workflow definition

NOTE: This is a demonstration file. The runtime (main.py) auto-detects if
a coordinator agent exists and routes requests through it for dynamic delegation.
You can use this workflow for explicit orchestration if needed.
"""
from __future__ import annotations

from evenage import Workflow
from agents.coordinator import coordinator
from agents.researcher import researcher

# Optional: import other worker agents
# from agents.analyst import analyst
# from agents.writer import writer

coordinator_workflow = Workflow(
    name="coordinated_research_pipeline",
    description="Coordinator-based workflow with dynamic task delegation",
    mode="coordinator"
)

coordinator_workflow.add_coordinator(coordinator)
coordinator_workflow.add_worker(researcher)
# coordinator_workflow.add_worker(analyst)
# coordinator_workflow.add_worker(writer)

coordinator_workflow.configure(
    trace_db="postgresql://evenage:evenage@postgres:5432/evenage",
    artifact_storage="minio://minioadmin:minioadmin123@minio:9000/artifacts",
    dashboard_port=5173,
)
