Package com.aispect.api
Interface AiGraphBehaviorOrchestrator<F>
- Type Parameters:
F- Resource object type when graph structure is transferred (such as state object, message list, etc.)
- All Known Subinterfaces:
AiGraphAgentHandler<T,R, F>
- All Known Implementing Classes:
AbstractGraphAgent,DynamicWorkflowGraphAgent
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
AI Agent graph (Graph)Orchestrator interface.
For complex workflows (multiple nodes, directed acyclic graphs, or multi-agent collaboration) Agent, The orchestrator is responsible for managing resource sharing and flow logic between various graph nodes. It is able to combine multiple subtasks into a complex solution through an orchestrator.
-
Method Summary
Modifier and TypeMethodDescriptionorchestrateGraph(Map<String, Object> nodeResources, AiInvocationContext<?> ctx) Arrange and schedule agent node resources in the graph.
-
Method Details
-
orchestrateGraph
F orchestrateGraph(Map<String, Object> nodeResources, AiInvocationContext<?> ctx) throws AiSpectExceptionArrange and schedule agent node resources in the graph.- Parameters:
nodeResources- A collection of functional function resources for each node registered in the current graph,Key is the node name (logo)ctx- The context that triggers the graph engine call- Returns:
- The final output resource after the graph process runs
- Throws:
AiSpectException- Orchestration infinite loops, node execution failures and other exceptions
-