orka.orchestrator.graph_introspection module

Graph Introspection Module

Discovers and analyzes available paths in the workflow graph. This module implements intelligent path discovery with cycle detection, constraint checking, and bounded exploration.

class orka.orchestrator.graph_introspection.GraphIntrospector(config: Any)[source]

Bases: object

Intelligent graph exploration and path discovery.

Discovers available paths from the current position with: - Bounded depth exploration - Cycle detection and prevention - Constraint-based filtering - Join feasibility analysis

__init__(config: Any)[source]

Initialize graph introspector with configuration.

async discover_paths(graph_state: GraphState, question: str, context: Dict[str, Any], executing_node: str | None = None) List[Dict[str, Any]][source]

Discover candidate paths from current position.

Parameters:
  • graph_state – Complete graph state

  • question – The question/query to route

  • context – Execution context

Returns:

List of candidate path dictionaries