diff --git a/README.md b/README.md index ed600e8..0f1af9e 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Conductor provides the patterns that work: evaluator-optimizer loops for iterati - **Conditional routing** - Route between agents based on output conditions - **Human-in-the-loop** - Pause for human decisions with Rich terminal UI - **Safety limits** - Max iterations and timeout enforcement -- **Web dashboard** - Real-time DAG visualization with agent detail streaming +- **[Web dashboard](#web-dashboard)** - Real-time workflow visualization with interactive DAG graph, live streaming, and in-browser human gates - **Validation** - Validate workflows before execution ## Installation @@ -104,6 +104,33 @@ conductor run my-workflow.yaml --input question="What is Python?" } ``` +## Web Dashboard + +Conductor includes a built-in real-time web dashboard that lets you visualize and interact with your workflows as they run. Launch it with `--web`: + +```bash +conductor run workflow.yaml --web --input question="What is Python?" +``` + +![Web Dashboard](docs/img/web-dashboard.png) + +**Key features:** + +- **Interactive DAG graph** — Zoomable, draggable workflow graph with animated edges showing execution flow and conditional routing +- **Live agent streaming** — Watch agent reasoning, tool calls, and outputs stream in real-time as each step executes +- **Three-pane layout** — Resizable panels for the graph, agent detail, and a tabbed output pane (Log, Activity, Output) +- **In-browser human gates** — Respond to human-in-the-loop decision points directly in the dashboard, no terminal needed +- **Per-node detail** — Click any node to see its prompt, metadata (model, tokens, cost), activity stream, and output +- **Background mode** — Run with `--web-bg` to start the dashboard in the background, print the URL, and exit. Use `conductor stop` to shut it down later. + +```bash +# Run in background — prints dashboard URL and exits +conductor run workflow.yaml --web-bg --input topic="AI in healthcare" + +# Stop a background workflow +conductor stop +``` + ## Providers Conductor supports multiple AI providers. Choose based on your needs: diff --git a/docs/img/web-dashboard.png b/docs/img/web-dashboard.png new file mode 100644 index 0000000..95dfe0b Binary files /dev/null and b/docs/img/web-dashboard.png differ diff --git a/examples/parallel-research.yaml b/examples/parallel-research.yaml index cc20bf8..8c749c3 100644 --- a/examples/parallel-research.yaml +++ b/examples/parallel-research.yaml @@ -82,16 +82,15 @@ agents: Be specific and actionable. output: - plan: - type: object - description: Structured research plan - properties: - questions: - type: array - areas: - type: array - sources: - type: array + questions: + type: array + description: 3-5 key research questions to answer + areas: + type: array + description: 3-4 areas to investigate + sources: + type: array + description: Types of sources to consult summary: type: string description: One-sentence plan summary @@ -111,14 +110,11 @@ agents: Topic: {{ workflow.input.topic }} - Research Plan: - {{ planner.output.plan | json }} - - Focus on: - - Academic papers and research studies - - University publications - - Scientific journals - - Research institutions + Research Questions: + {{ planner.output.questions | json }} + + Research Areas: + {{ planner.output.areas | json }} Provide credible, well-sourced findings based on your knowledge. output: @@ -145,14 +141,11 @@ agents: Topic: {{ workflow.input.topic }} - Research Plan: - {{ planner.output.plan | json }} - - Focus on: - - Recent news articles - - Industry blogs and publications - - Case studies and real-world examples - - Expert opinions and commentary + Research Questions: + {{ planner.output.questions | json }} + + Research Areas: + {{ planner.output.areas | json }} Provide findings based on your knowledge of recent and authoritative sources. output: @@ -179,14 +172,11 @@ agents: Topic: {{ workflow.input.topic }} - Research Plan: - {{ planner.output.plan | json }} - - Focus on: - - Technical documentation - - API references and specifications - - Implementation guides - - Standards and best practices + Research Questions: + {{ planner.output.questions | json }} + + Research Areas: + {{ planner.output.areas | json }} Provide findings based on your technical knowledge. output: @@ -290,7 +280,7 @@ agents: Topic: {{ workflow.input.topic }} Original Research Questions: - {{ planner.output.plan.questions | json }} + {{ planner.output.questions | json }} Executive Summary: {{ synthesizer.output.executive_summary }} @@ -331,7 +321,7 @@ agents: - to: $end when: "{{ output.quality_score >= 7 }}" - to: planner - when: "context.iteration < 3" + when: "{{ context.iteration < 3 }}" output: feedback: "{{ quality_checker.output.gaps | json }}" - to: $end diff --git a/examples/research-assistant.yaml b/examples/research-assistant.yaml index 9b68b9c..10c9fb9 100644 --- a/examples/research-assistant.yaml +++ b/examples/research-assistant.yaml @@ -126,7 +126,7 @@ agents: - to: synthesizer when: "coverage >= 70" - to: researcher - when: "context.iteration < 3" + when: "{{ context.iteration < 3 }}" - to: synthesizer - name: synthesizer @@ -218,7 +218,7 @@ agents: - to: $end when: "{{ output.passed }}" - to: synthesizer - when: "context.iteration < 5" + when: "{{ context.iteration < 5 }}" - to: $end output: diff --git a/tests/test_integration/test_examples.py b/tests/test_integration/test_examples.py index 854b36f..e675fbf 100644 --- a/tests/test_integration/test_examples.py +++ b/tests/test_integration/test_examples.py @@ -80,11 +80,9 @@ def mock_handler(agent, prompt, context): """Mock handler for testing parallel research workflow.""" agent_outputs = { "planner": { - "plan": { - "questions": ["Q1", "Q2", "Q3"], - "areas": ["A1", "A2"], - "sources": ["academic", "web", "technical"], - }, + "questions": ["Q1", "Q2", "Q3"], + "areas": ["A1", "A2"], + "sources": ["academic", "web", "technical"], "summary": "Research AI in healthcare", }, "academic_researcher": {