Star on GitHub ★

CrewAI Integration Guide

Enforce role-based behavioral contracts across your CrewAI agents. Guard inter-agent task delegation and enforce governance rules before finalizing crew deliverables.

Wrapping CrewAI Agents with Contracts

crewai_example.py
from crewai import Agent, Task, Crew
from agentassert_abc import Contract, Monitor

contract = Contract.from_yaml("contracts/researcher.yaml")

researcher = Agent(
    role="Senior Research Analyst",
    goal="Synthesize verified market trends",
    backstory="Expert financial investigator"
)

# Wrap agent step callback with contract monitor
guarded_researcher = Monitor(contract).wrap_crewai(researcher)