1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//! Graph-based workflow engine (LangGraph-style state machines).
//!
//! Model agent execution as a **directed graph with shared state**.
//! Supports linear pipelines, conditional branches, loops, and parallel fan-out/fan-in.
//!
//! # Builders
//!
//! | Builder | Style | Best For |
//! |---------|-------|----------|
//! | [`GraphBuilder`] | Programmatic Rust API | Complex logic, type safety |
//! | [`WorkflowDefinition`] | YAML/JSON declaration | Simple pipelines, no-code config |
//!
//! # Quick Start (Programmatic)
//!
//! ```rust,no_run
//! use echo_agent::prelude::*;
//!
//! # fn main() -> echo_agent::error::Result<()> {
//! let graph = GraphBuilder::new("pipeline")
//! .add_function_node("step_a", |state| Box::pin(async move {
//! state.set("key", "value")?;
//! Ok(())
//! }))
//! .add_edge("step_a", Graph::END)
//! .build()?;
//! # Ok(())
//! # }
//! ```
//!
//! # Quick Start (Declarative YAML)
//!
//! ```rust,ignore
//! use echo_agent::prelude::*;
//!
//! # fn main() -> echo_agent::error::Result<()> {
//! let graph = Graph::from_yaml("workflow.yaml")?;
//! let result = graph.run(SharedState::new()).await?;
//! # Ok(())
//! # }
//! ```
//!
//! # Key Types
//!
//! | Type | Description |
//! |------|-------------|
//! | [`Graph`] / [`GraphBuilder`] | Build and run directed workflows |
//! | [`SequentialWorkflow`] | Simple linear step execution |
//! | [`ConcurrentWorkflow`] | Parallel step execution |
//! | [`DagWorkflow`] | Dependency-based scheduling |
//! | [`SharedState`] | State passed between nodes |
//! | [`WorkflowEvent`] | Streaming events per node |
//! | [`WorkflowDefinition`] | YAML/JSON workflow definition |
/// Direct re-exports from `echo_orchestration::workflow`.
pub use *;
/// Root-crate declarative DSL built on top of the orchestration workflow types.
/// Root-crate file/YAML loader built on top of the orchestration workflow types.
pub use WorkflowDefinition;