The loop
- Detect. Reflect captures trace IDs inside an explicit application boundary, waits for persisted traces, and requests platform evaluations. Configured thresholds and trajectory signals determine whether to create a notice.
- Notify. The notice and diagnostic evidence become read-only files assigned to that execution. Judge explanations are evidence to investigate, not unquestionable instructions.
- Reflect. Your agent continues at a bounded checkpoint. It searches existing rules and proposes a change through
reflect_bash, or leaves the rules unchanged. - Validate. Your replay or matched trial supplies independently checked outcomes. The SDK compares control and candidate results and publishes an accepted revision only when its criteria are met.
Who owns what?
Native integrations restrict reflection to memory administration. For a custom loop, you implement the same restriction in the actual tool dispatcher.
Execution, session, and workspace
- Execution: one application invocation and its evidence. Use a unique ID for every invocation, including retries.
- Session: related work, such as a customer conversation. A session is not a unique execution.
- Workspace: durable rules, proposals, evidence, and bookkeeping. Multiple sessions can use it; each execution gets an isolated working view.
completed=False in Python or completed: false in TypeScript. This allows trajectory signals without classifying incompleteness alone as final failure.
Detection defaults
The primary metrics aretask_completion and coherence, both with threshold 0.5. For an execution containing several traces, Reflect uses the lowest score per metric.
For each metric, signals are checked in order:
A score equal to its threshold does not breach it. Repeated observations of the same execution do not create a trajectory. Cooldowns suppress repeated signatures. Missing or unusable scores never count as success.
When a notice is created,
tool_correctness and argument_correctness provide follow-up diagnosis by default. Diagnostic failure does not erase the primary notice. Sampling, concurrency, and an optional evaluation cap control work; see Configuration.

