Package com.aispect.api
Interface AiGraphAgentHandler<T,R,F>
- Type Parameters:
T- Input parameter types during agent processing (Input parameter type)R- Return result type after agent execution (Return result type)F- Resource object type when graph structure is transferred (such as state object, message list, etc.)
- All Superinterfaces:
AiAgentFilter,AiGraphBehaviorOrchestrator<F>,AiGraphCompleteHook,AiGraphStartHook,AiGraphTimeoutHook,AiNodeExceptionHook,AiNodeStatusHook
- All Known Implementing Classes:
AbstractGraphAgent,DynamicWorkflowGraphAgent
public interface AiGraphAgentHandler<T,R,F>
extends AiAgentFilter, AiGraphBehaviorOrchestrator<F>, AiGraphStartHook, AiGraphCompleteHook, AiNodeStatusHook, AiNodeExceptionHook, AiGraphTimeoutHook
graph agent processor (Graph Agent Handler)
This interface is a top-level composite abstraction of the graph agent processing logic, integrating the core capabilities of the agent at each life cycle stage during execution. Classes that implement this interface will also have the following capabilities:
- Conditional filtering (AiAgentFilter):Determine whether the agent should be executed.
- core orchestration (AiGraphBehaviorOrchestrator):The collaborative scheduling and resource transfer logic of each node in the graph.
- start hook (AiGraphStartHook):Triggered before the graph agent starts scheduling and can be used for logging or initialization operations.
- completion hook (AiGraphCompleteHook):Triggered after all nodes of the graph agent have completed execution, and can be used to process final results or resource cleanup.
- Node status hook (AiNodeStatusHook):Triggered when a specific node starts, succeeds or fails, etc. and changes status.
- Node exception hook (AiNodeExceptionHook):Triggered when an exception occurs in node execution, and returns the subsequent processing strategy (such as retry, skip, abort).
- timeout hook (AiGraphTimeoutHook):Triggered when the overall execution of the graph agent times out, used for timeout processing logic.
-
Method Summary
Methods inherited from interface com.aispect.api.AiAgentFilter
doFilter, shouldProcessMethods inherited from interface com.aispect.api.AiGraphBehaviorOrchestrator
orchestrateGraphMethods inherited from interface com.aispect.api.AiGraphCompleteHook
onGraphCompleteMethods inherited from interface com.aispect.api.AiGraphStartHook
onGraphStartMethods inherited from interface com.aispect.api.AiGraphTimeoutHook
onGraphTimeoutMethods inherited from interface com.aispect.api.AiNodeExceptionHook
onNodeExceptionMethods inherited from interface com.aispect.api.AiNodeStatusHook
onNodeStatusChange