Magus.GraphAgent (Magus v0.1.0)

Summary

Types

@type node_name() :: atom()
@type t() :: %Magus.GraphAgent{
  cleanup_fn: term(),
  entry_point_node: term(),
  final_output_property: term(),
  graph: term(),
  initial_state: term(),
  name: term(),
  node_to_conditional_fn: term(),
  node_to_fn: term()
}

Functions

Link to this function

add_conditional_edges(agent, node_a, possible_nodes, conditional_fn)

@spec add_conditional_edges(t(), node_name(), [node_name()], (... -> any())) :: t()
Link to this function

add_edge(agent, node_a, node_b)

@spec add_edge(t(), node_name(), node_name()) :: t()
Link to this function

add_node(agent, node, node_fn)

@spec add_node(t(), node_name(), (... -> any())) :: t()
Link to this function

cleanup(agent, cur_state)

@spec cleanup(t(), any()) :: t()
Link to this function

get_final_output(agent, cur_state)

@spec get_final_output(t(), any()) :: any()
@spec get_final_output(t(), any()) :: any()
Link to this function

set_entry_point(agent, node)

@spec set_entry_point(t(), node_name()) :: t()