Iworkflow¶
Classes¶
- class arshai.core.interfaces.iworkflow.INode(node_id, name, **kwargs)[source]¶
Bases:
ProtocolInterface for workflow nodes that wrap agents.
Nodes are callable objects that process workflow state and return updated state along with any other results. They form the building blocks of workflows.
- class arshai.core.interfaces.iworkflow.IUserContext(**data)[source]¶
Bases:
IDTOUser context information.
- model_config: ClassVar[ConfigDict] = {'allow_mutation': False, 'arbitrary_types_allowed': True, 'smart_union': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class arshai.core.interfaces.iworkflow.IWorkflowConfig(settings, debug_mode=False, **kwargs)[source]¶
Bases:
ProtocolConfiguration for workflow orchestration.
This interface defines how workflows are configured, including their structure (nodes and edges) and routing logic.
- class arshai.core.interfaces.iworkflow.IWorkflowOrchestrator(debug_mode=False)[source]¶
Bases:
ProtocolOrchestrates the workflow execution.
The orchestrator manages the flow of control and data between nodes in a workflow. It is responsible for routing input to the appropriate entry node, executing nodes in sequence based on edge connections, and collecting the final results.
- class arshai.core.interfaces.iworkflow.IWorkflowState(**data)[source]¶
Bases:
IDTOComplete workflow state.
This state model follows the pattern from the previous project’s WorkflowState, providing a central object that flows through all nodes in the workflow and captures the complete state of the workflow execution.
-
user_context:
IUserContext¶
-
working_memories:
Dict[str,IWorkingMemory]¶
-
notification_state:
INotificationState¶
- update_from(other)[source]¶
Update this state from another state instance.
This method allows for easy copying of state from one instance to another, which is useful when nodes create new state instances.
- Parameters:
other (
IWorkflowState) – The other state instance to copy from- Return type:
- model_config: ClassVar[ConfigDict] = {'allow_mutation': False, 'arbitrary_types_allowed': True, 'smart_union': True, 'validate_assignment': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
-
user_context: