Skip to main content
Reflect registers its filesystem tool through an SDK MCP server. Configure Python options before opening a native client; in TypeScript, pass the traced query function to Reflect.

Installation

Python 3.10+ and Node.js 22+ for these examples. 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.

How the integration behaves

Complete the Claude Agent SDK’s native runtime and authentication setup as described in the tracing guide. The example disables built-in tools; add your application’s tools/MCP servers through native options when needed. Reflect preserves those task options on copies. The supplied tool is named mcp__pandaprobe_reflect__reflect_bash. The example’s model, thinking, and effort settings are application choices, not Reflect defaults.

Conversations and replay

Reflection resumes the completed native session with only Reflect’s MCP server/tool and a bounded turn limit. Validation clears session/resume/continue options for a fresh conversation. For ordinary multi-turn tasks, manage native session/resume options yourself; a Reflect session ID alone does not resume Claude history. The adapter collects query messages, closes owned query/server resources, and surfaces native terminal errors with provider details. 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.