Signed decision evidence for CrewAI agents.
Keep your CrewAI agents, tools and guardrails. LoopGrid captures native model and tool execution evidence, connects it to application-provided policy and human review, and verifies the signed decision history through LoopGrid Core.
loopgrid-crewai v0.1.0 · validated with CrewAI 1.15.25 · Python 3.10–3.13 package support · LoopGrid SDK 0.8.0 · Core 0.8.1-design-partner.
Keep action control native. CrewAI runs the agents, guardrails and tools. Your application supplies authorization, reviewer identity and real downstream outcomes; LoopGrid captures and verifies the evidence.
Install the native CrewAI integration.
pip install loopgrid-crewai==0.1.0
The package is available on PyPI and integrates with crewai==1.15.25 and the loopgrid 0.8.x SDK. Use an existing LoopGrid Core workspace and the credentials configured for your environment.
Bind one CrewAI Crew run to one LoopGrid decision.
from crewai import Crew, Process
from loopgrid_crewai import LoopGridCrewAI
bridge = LoopGridCrewAI(
base_url="http://127.0.0.1:8000",
workspace_id="default",
agent_id="billing-crew",
)
bridge.install()
decision = bridge.start_decision(
decision_type="customer_refund",
agent={"id": "billing-crew", "version": "1"},
authority={"acting_for": "Example Store", "scope": ["refund:create"], "limit_usd": 100},
model={"provider": "openai", "name": "configured-model"},
context={"prompt_version": "refund-v1"},
proposed_action={"tool": "refund.create", "amount": 25},
policy={"policy_id": "refund-policy", "version": "1", "decision": "auto_allowed"},
)
# Supply your own real CrewAI agents, tasks and (sandboxed) tools.
crew = Crew(agents=[...], tasks=[...], process=Process.sequential)
with bridge.decision_context(decision["decision_id"]):
output = crew.kickoff()
bridge.flush()
bridge.assert_healthy()
# Later, only when your application observes a real downstream outcome:
bridge.record_outcome(
decision["decision_id"],
{"status": "succeeded", "external_reference": "verified-system-id"},
observer="billing-webhook",
)This is an integration template: replace the placeholder agents, tasks and tools with your CrewAI setup. For runnable local scenarios, including native event capture and sandbox tool execution without paid model credentials, use the repository examples ↗.
Observe native CrewAI events; preserve the LoopGrid lifecycle.
start_decision() records application-supplied agent identity, authority, policy and the proposed action.
The native LLMCallCompletedEvent records model_completed evidence with model and execution provenance.
The native ToolUsageFinishedEvent records paired tool_requested and tool_executed evidence for an observed completed, uncached tool call.
record_human_review() records application-authenticated approval or rejection; CrewAI retains the actual action gate.
record_outcome() records the downstream result only after your application observes it.
LoopGrid Core can mark the applicable decision lifecycle evidence_complete and verify the signed evidence history.
Record the action that actually runs.
# Your authenticated approval handler (not the CrewAI tool itself):
bridge.record_human_review(
decision["decision_id"],
reviewer="authenticated-reviewer-id",
approved=True,
reason="Approved by operator",
)
# Rejection: approved=False, and the action must remain blocked.
# After execution, flush and check delivery:
bridge.flush()
bridge.assert_healthy()The listener derives paired tool-request and execution records from completed native tool events; it does not claim to intercept a tool before execution. This keeps the evidence consistent with CrewAI's native approval, rejection and argument-modification behavior.
Privacy-safe capture by default.
capture_content=False uses SHA-256 commitments for model responses and tool arguments/results instead of storing their raw contents by default.Use decision_context() to bind the correct decision to a CrewAI run. Native events are queued for delivery without making the CrewAI execution path wait for each network write. Call flush() and assert_healthy() to confirm delivery, and shutdown() when the bridge is no longer needed. Keep credentials, authenticated reviewer identity and observed business outcomes under application control.
Validated from native CrewAI through signed LoopGrid Core.
evidence_complete (normal and approved), rejected (rejected)verifyValid: true with no failures in tested scenariosloopgrid-crewai==0.1.0 clean-installed from PyPI, imported and passed pip checkValidation uses local sandbox tools and a deterministic reviewer fixture, with no real-money movement. LoopGrid verifies recorded evidence integrity/provenance; applications remain responsible for real-world actions and their outcomes.
Keep CrewAI native. Make the evidence verifiable.
Connect one Crew run to one signed decision history, then extend to your own production authorization and outcome sources.