CrewAI SDK (Python)
The OpenBox CrewAI SDK connects CrewAI crews and flows to OpenBox. It governs task boundaries, captures operational telemetry, supports approvals and guardrails, and preserves per-agent identity for governed runs.
Published package: openbox-crewai-sdk-python
Public repository:
| Guide | Description |
|---|---|
| Integration Walkthrough | End-to-end guide for replacing plain CrewAI types, governing a crew, and understanding runtime behavior |
| Configuration | Environment variables, engine options, defaults, and production guidance |
| Approvals and Guardrails | How verdicts are enforced and how to test live policy and guardrail behavior correctly |
| Telemetry | Task events, HTTP/database/file capture, flow correlation, and attribution model |
| Troubleshooting | Diagnose startup, policy, approval, telemetry, and runtime integration issues |
The SDK connects CrewAI runtimes to OpenBox. Trust policy, approvals, guardrails, dashboards, and operator workflows live on the OpenBox platform, not inside the SDK.
Philosophy
The integration is intentionally minimal:
- replace governed
AgentandTaskinstances with OpenBox-aware subclasses - create one standard engine for the process
- wrap crews with
engine.govern(crew) - keep the rest of your CrewAI structure recognizable
Recommended Entry Point
For most applications, use create_openbox_engine():
from openbox import create_openbox_engine
with create_openbox_engine() as engine:
governed = engine.govern(crew)
result = governed.kickoff()
It validates configuration, creates the OpenBox runtime, installs telemetry, and binds governance to standard CrewAI crews.
Public API Summary
Most integrations only need these exports:
create_openbox_engine()create_openbox_flow()OpenBoxAgentOpenBoxTaskGovernedCrewOpenBoxEngine
What The SDK Captures
OpenBox receives:
Workflow Session Boundaries
WorkflowStartedWorkflowCompleted
These are emitted per governed agent session.
Task Boundaries
ActivityStartedActivityCompleted
These apply to governed OpenBoxTask instances.
Signals
SignalReceivedfor approval resume and related runtime signals
Operational Telemetry
- HTTP requests
- supported database activity
- file operations when enabled
- LLM-gate decisions at the CrewAI before-LLM-call hook
Supported Runtime Conditions
| Requirement | Value |
|---|---|
| Python | >=3.10 |
| CrewAI | >=1.14.1 |
| OpenBox Core | reachable over HTTPS except localhost development |
Next Steps
- Start with the Integration Walkthrough.
- Configure runtime behavior in Configuration.
- Read Telemetry before writing policy for hook-level data.