Overview

The utilization of the ExecutionGraph is handled by Overeasy under the hood and is exposed to help with debugging and visualization.

An Execution Graph tracks the relationships between different Execution Node instances, representing the entire workflow’s execution. Let’s take a look at one step in a workflow:

Upon execution of the agent, Node 2 is added to the Execution Graph, which contains its own image and data attributes.

A workflow is comprised of a series of agents that are executed in order. An Execution Graph takes the form of a Directed Acyclic Graph (DAG), where each layer of the graph represents the outcome of a step in the workflow. Here’s an example:

Methods

ExecutionGraph.ascii_graph()

Prints a text-based representation of the graph.

ExecutionGraph.top_sort()

Returns:

  • List[List[ExecutionNode]]: Performs a topological sort of the graph, returning a list of list of nodes representing each level of the graph.