Initializes a new instance of the GraphAI object with the specified graph data and a dictionary of callback functions.
data: GraphData
: The graph data including nodes and optional concurrency limit.callbackDictonary: AgentFunctionInfoDictonary
: A dictionary mapping agent IDs to their respective callback functions info to be used for all nodes.
Executes the graph asynchronously, starting with nodes that have no dependencies or whose dependencies have been met. The method continues to execute nodes as their dependencies are satisfied until all nodes have been executed or an error occurs.
Returns: A promise that resolves with the results of all executed nodes or rejects with the first encountered error.
Compiles and returns the results of all executed nodes in the graph.
Returns: A dictionary mapping node IDs to their results. Only includes nodes that have completed execution and produced a result.
Compiles and returns the errors from all nodes that encountered an error during execution.
Returns: A dictionary mapping node IDs to the errors they encountered. Only includes nodes that have executed and encountered an error. It does not include any errors which have been retried.
Retrieves all transaction logs recorded during the execution of the graph.
Returns: An array of transaction logs detailing the execution states and outcomes of the nodes within the graph.
Injects a result into a specified node. This is used to manually set the result of a static node, allowing dependent nodes to proceed with execution.
nodeId: string
: The ID of the static node into which the result is to be injected.result: ResultData
: The result to be injected into the specified node.