Skip to content

CrewAI Adapter

CrewAIAdapter

Wraps a CrewAI Flow instance to apply stroma contract validation on decorated steps.

Takes a ContractRegistry for validation. Call .wrap(flow_instance) to discover decorated methods and replace them with validating wrappers. State lives on flow_instance.state and is extracted/merged automatically.

wrap(flow)

Discover stroma-decorated methods on flow and replace them with validating wrappers.

stroma_crewai_step(node_id, contract)

Decorator that attaches stroma contract metadata to a CrewAI Flow method.

Binds node_id and contract as attributes on the decorated method so CrewAIAdapter can discover and validate it.