Skip to main content

lellm_graph/
lib.rs

1//! lellm-graph — Graph/Node/Edge 编排层。
2//!
3//! 提供 Workflow DAG + Loop Node + Human-in-the-loop 编排能力。
4
5pub mod barrier_node;
6pub mod error;
7pub mod event;
8pub mod executor;
9pub mod graph;
10pub mod llm_node;
11pub mod node;
12pub mod state;
13pub mod tool_node;
14
15// ─── Error Types ────────────────────────────────────────────────
16pub use error::{BuildError, GraphError, ObservedError, RecoverableError, TerminalError};
17
18// ─── Events ─────────────────────────────────────────────────────
19pub use event::{
20    BarrierDecision, BarrierId, BarrierInnerEvent, EventLevel, GraphEvent, GraphExecution,
21    GraphHandle, GraphStream, NodeEvent, SpanId, TraceId,
22};
23
24// ─── Graph ──────────────────────────────────────────────────────
25pub use graph::{
26    CycleAnalysis, Edge, EdgeAnalysis, EdgeExceededStrategy, EdgePolicy, Graph, GraphBuilder,
27};
28
29// ─── Nodes ──────────────────────────────────────────────────────
30pub use node::{
31    AgentNode, BarrierDefaultAction, BarrierNode, ConditionNode, ConditionNodeBuilder, GraphNode,
32    LLMNode, LoopNode, NextStep, NodeKind, SubGraph, TaskNode, ToolNode,
33};
34
35// ─── State ──────────────────────────────────────────────────────
36pub use state::{
37    ExecutionEntry, GraphResult, State, StateError, StateExt, StateReducer, array_reducer,
38};
39
40// ─── Executor ───────────────────────────────────────────────────
41pub use executor::GraphExecutor;