Skip to main content
Last updated on

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:

GuideDescription
Integration WalkthroughEnd-to-end guide for replacing plain CrewAI types, governing a crew, and understanding runtime behavior
ConfigurationEnvironment variables, engine options, defaults, and production guidance
Approvals and GuardrailsHow verdicts are enforced and how to test live policy and guardrail behavior correctly
TelemetryTask events, HTTP/database/file capture, flow correlation, and attribution model
TroubleshootingDiagnose startup, policy, approval, telemetry, and runtime integration issues
What the SDK Does

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 Agent and Task instances 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()
  • OpenBoxAgent
  • OpenBoxTask
  • GovernedCrew
  • OpenBoxEngine

What The SDK Captures

OpenBox receives:

Workflow Session Boundaries

  • WorkflowStarted
  • WorkflowCompleted

These are emitted per governed agent session.

Task Boundaries

  • ActivityStarted
  • ActivityCompleted

These apply to governed OpenBoxTask instances.

Signals

  • SignalReceived for 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

RequirementValue
Python>=3.10
CrewAI>=1.14.1
OpenBox Corereachable over HTTPS except localhost development

Next Steps

  1. Start with the Integration Walkthrough.
  2. Configure runtime behavior in Configuration.
  3. Read Telemetry before writing policy for hook-level data.