Skip to main content
Pass your existing CrewAI Agent or Crew to Reflect. It creates an invocation copy, adds its filesystem tool and memory, and uses CrewAI’s asynchronous execution path.

Installation

Python only; use Python 3.11+ for this CrewAI example. Install Reflect together with the framework and model provider used below.

Credentials

For a self-hosted platform, also set PANDAPROBE_ENDPOINT to your API base URL. Reflect uses the same client configuration as tracing.

Enable Reflect

This example creates a policy assistant. Add your own domain tools where indicated; Reflect supplies reflect_bash automatically.
Python

How the integration behaves

Keep the CrewAI tracing adapter enabled. A standalone Agent takes text/messages; a Crew takes its native inputs dictionary, as shown above.

Crews and reflection

Give the final task an explicit agent. That agent performs the reflection checkpoint; Reflect does not rerun the whole crew. Reflection restricts its tools, disables delegation/code execution, and bounds iterations. Reflect reserves the input name pandaprobe_reflect_active_memory for current instructions. Do not supply that key yourself. Filesystem tool caching is disabled because its working state can change.

Conversations and replay

Keep business state and native crew context under application control. A Reflect session ID groups evidence; it does not automatically recreate prior crew outputs. Build fresh business fixtures and native task state for each replay arm. run() returns the task’s native result after evaluation and any triggered reflection. A healthy answer may produce no proposal. The workspace persists accepted guidance and pending proposals across restarts.

Validate learned rules

Add independent replay or controlled trials before proposed changes can become shared accepted guidance. Reset your business environment and conversation for each validation arm. See Rules and memory for the working filesystem and session notes.