Expand description
Workflow guard – execution limits for agent workflows.
Prevents runaway workflows: unbounded sub-workflow depth, uncontrolled fan-out, unlimited token consumption, and infinite execution time. Checked before every agent step invocation.
§Examples
use ironflow_engine::guard::{WorkflowGuardConfig, WorkflowGuardState, WorkflowRejection};
let config = WorkflowGuardConfig::default();
assert_eq!(config.max_depth, 5);
let state = WorkflowGuardState::new();
assert!(state.check(&config, "agent-a").is_ok());Structs§
- Workflow
Guard Config - Configurable execution limits for a workflow run.
- Workflow
Guard State - Mutable runtime state tracked by the guard during a workflow execution.
Enums§
- Workflow
Rejection - Reason a workflow invocation was rejected by the guard.
Constants§
- WORKFLOW_
GUARD_ REJECTED_ CODE - Business error code for guard rejections.
Functions§
- new_
shared_ guard_ state - Create a new shared guard state for a workflow run.
Type Aliases§
- Shared
Guard State - Thread-safe handle to a shared
WorkflowGuardState.