tooluniverse.compose_scripts.tool_graph_generation moduleΒΆ

Tool Graph Generation Compose Script

Efficiently evaluates directional data-flow relationships between all unique pairs of provided tool configs using one agentic tool:

  • ToolRelationshipDetector

Outputs a graph structure with edges representing valid directional relationships. Each edge stores: source, target, rationale.

Performance considerations:
  • Iterates i<j once (O(N^2/2) pairs)

  • Lightweight JSON serialization of minimal fields

  • Optional batching hook (currently sequential because call_tool likely remote)

param tool_configs:

type tool_configs:

list[dict]

param max_tools:

type max_tools:

int

param output_path:

type output_path:

str) path to write resulting graph JSON (default './tool_relationship_graph.json'

param save_intermediate_every:

type save_intermediate_every:

int) checkpoint frequency (default 5000 pairs processed

returns:

nodes, edges, stats

rtype:

dict with keys

tooluniverse.compose_scripts.tool_graph_generation.compose(arguments, tooluniverse, call_tool)[source]ΒΆ