adk_graph (erlang_adk v0.9.0)
View SourceFluent compatibility builder for the canonical workflow graph.
The original adk_graph API returns {ok, State} and accepts atom node names. Compilation now lowers that representation into a canonical adk_workflow graph while preserving those public result forms. run/3 keeps the old term-friendly executor by default and accepts runtime => workflow as an explicit JSON-safe migration boundary. New applications which need typed nodes, fork/join, pause or durable invocation should build a kind => graph workflow specification directly; the inspection functions work for either compiled form.
Summary
Functions
Add or replace a state-dependent edge.
Add or replace a deterministic edge.
Add or replace a computation node.
Compile into a compatibility handle backed by adk_workflow.
Return a deterministic JSON-safe descriptor without callbacks or args.
Initialize a new, empty graph.
Execute with the legacy result form and term-compatible default.
Execute with a positive max_steps bound. Set runtime => workflow to use the supervised JSON-safe workflow engine.
Set the starting node.
Render the graph as deterministic Graphviz DOT.
Render the graph as deterministic Mermaid flowchart source.
Return the canonical compiled workflow behind a compatibility graph.
Types
Functions
-spec add_conditional_edge(graph(), node_name(), edge_condition()) -> graph().
Add or replace a state-dependent edge.
Add or replace a deterministic edge.
Add or replace a computation node.
-spec compile(graph()) -> {ok, compiled_graph()} | {error, term()}.
Compile into a compatibility handle backed by adk_workflow.
-spec describe(graph() | compiled_graph() | map()) -> {ok, map()} | {error, term()}.
Return a deterministic JSON-safe descriptor without callbacks or args.
-spec new() -> graph().
Initialize a new, empty graph.
-spec run(compiled_graph(), map()) -> {ok, map()} | {error, term()}.
Execute with the legacy result form and term-compatible default.
-spec run(compiled_graph(), map(), map()) -> {ok, map()} | {error, term()}.
Execute with a positive max_steps bound. Set runtime => workflow to use the supervised JSON-safe workflow engine.
Set the starting node.
-spec to_dot(graph() | compiled_graph() | map()) -> {ok, binary()} | {error, term()}.
Render the graph as deterministic Graphviz DOT.
-spec to_mermaid(graph() | compiled_graph() | map()) -> {ok, binary()} | {error, term()}.
Render the graph as deterministic Mermaid flowchart source.
-spec to_workflow(graph() | compiled_graph() | map()) -> {ok, map()} | {error, term()}.
Return the canonical compiled workflow behind a compatibility graph.