# Help your agent learn from mistakes.
Reflect helps your agent understand what went wrong and teaches it how to avoid making the same mistake next time.
[Start with Reflect](https://docs.pandaprobe.com/reflect/quickstart) · [Chat with us](https://www.pandaprobe.com/contact)
*Illustration: A loupe reviews trace evidence and evaluation signals on the left. A tabbed guidance file on the right rests one-third open and opens counterclockwise as the scanner moves down, with its left half fixed and guidance lines printing across both halves. Fully open, it matches the evidence panel's dimensions and orientation. Move up to fold it back and rewind the writing, or use arrow keys to explore the scan. The proposal still needs independent validation; your checks decide what is accepted.*
---
## From a mistake to a tested lesson.
Your existing agent reviews the evidence and proposes a lesson to help avoid the same mistake. Reflect tests it against your checks before making it available to future runs.
### Detect — Find the failure signal
Evaluate completed execution evidence for configured failures, regressions, or stalled progress.
### Notify — Bring the evidence back
Give the agent a focused notice with relevant scores, execution details, and diagnostic evidence.
### Reflect — Propose a useful change
At a dedicated checkpoint, your agent writes or updates a rule: guidance describing what to do and when it applies. It can also leave things unchanged when the evidence is insufficient.
### Validate — Check the proposal independently
Compare executions with and without the proposed change using task checks you provide. Protect successful behavior and publish changes that meet the acceptance criteria.
[See the hotel-assistant example](https://www.pandaprobe.com/#example) · [Read how Reflect works](https://docs.pandaprobe.com/reflect/concepts)
---
## Keep the lesson. Find it when it matters.
Accepted rules persist beyond a single execution. Your agent can search for relevant guidance and bring useful details into its current task.
### Reusable rules
Persistent Markdown guidance with an explicit description of when it applies. Accepted versions become available to fresh executions.
### Active notes
A bounded working context helps the agent carry relevant information through supported execution checkpoints. These notes remain distinct from accepted shared rules.
### Illustrative rule workspace
*Your agent · Rule workspace · Proposed change · Awaiting validation*
**Rule · `/rules/guest-hotel-requests.md`**
```markdown
# Help guest users find a hotel before sign-in
Applies to: guest user hotel requests when browsing is allowed
Help the guest user search and choose a hotel.
Do not exit early, request sign-in before confirming a booking.
Keep authentication requirements intact.
```
A rule records what to do differently, and when it applies.
**The mistake behind the rule · `/inbox/evidence.txt`**
**Guest request:** Can you help me book a hotel in downtown Manhattan?
**Agent response:** I'm not able to perform this action without authentication.
**Permitted journey:** Guests can search and choose a hotel. Confirming a booking requires sign-in.
**Evaluation finding:** The agent stopped without offering an allowed next step.
The agent reviews the failure evidence before proposing guidance.
**How this rule is recorded**
1 rule added · No accepted rules changed
1. **Written by your agent:** The agent writes the Markdown file in its isolated working rules using reflect_bash.
2. **Captured as a proposal:** Reflect compares the working rules with the accepted revision and records the proposed change with its supporting evidence.
3. **Waiting for your checks:** Independent validation decides whether to publish a new accepted revision. Until then, this proposal stays out of fresh executions.
Recording a proposal does not make it accepted guidance.
The agent retrieves relevant guidance instead of automatically loading the entire rule collection into every prompt. Reflect provides `reflect_bash` for searching, reading, and editing an isolated workspace.
[Read about rules and memory](https://docs.pandaprobe.com/reflect/rules-and-memory)
---
## Test the change. Protect what already works.
Once you connect your task cases and checks, Reflect runs validation in the background, using the acceptance criteria and limits you set.
### Compare both versions
Reflect replays matched cases with the accepted rules and with the proposed change.
### Include successful cases
Your checks verify that the proposal preserves behavior the agent already handles correctly.
### Keep the decision explicit
Reflect records whether the proposal is accepted, rejected, or still pending, together with the supporting evidence.
You provide representative cases, an environment to replay them, and independent outcome checks. Reflect coordinates the comparison; you can inspect the decision and its evidence.
[Explore how validation works](https://docs.pandaprobe.com/reflect/validation)
---
## Connect the evidence. Define the checks. Enable reflection.
### Connect existing traces
Use the PandaProbe SDK to capture the executions Reflect will evaluate.
### Provide independent outcomes
Define representative cases and checks that establish whether a proposed change helps and whether existing successes are preserved.
### Enable the reflection checkpoint
Turn Reflect on for your agent so it can review failure evidence and propose guidance.
Reflect reuses your tracing client's configuration. Your application continues to own the agent and its model configuration.
[Python quickstart](https://docs.pandaprobe.com/reflect/quickstart) · [TypeScript quickstart](https://docs.pandaprobe.com/reflect/quickstart)
---
## Questions, answered.
### What is PandaProbe Reflect?
Reflect connects agent execution evidence to a reflection and validation loop. It helps your existing agent to understand what went wrong and propose persistent rules to avoid them while independently testing changes before accepting them.
### Does Reflect train or fine-tune my model?
No. Reflect changes the guidance available to your agent through rules and active context. It uses your existing model without updating its weights.
### Does it create a separate reflection agent?
No. Reflect uses your host agent at a dedicated reflection checkpoint. Native integrations handle continuation and restrict the tools available during that phase.
### Can the agent approve its own rules?
The supplied tool lets the agent propose edits. Independent validation controls whether those changes become accepted guidance.
### What do I need to provide for validation?
Representative task cases, a suitable execution environment, and independent outcome checks. Reflect cannot reconstruct an arbitrary application environment from traces alone.
### Can I use Reflect without replay?
Yes. Reflect supports explicitly matched control and candidate trials with host-verified outcomes. Unrelated later successes do not automatically validate a rule.
### Does every stored rule enter the agent's context?
No. The agent searches and reads relevant rules. Reflect also maintains bounded active notes at supported checkpoints; it does not automatically insert the entire rule collection.
### Will it prevent the same mistake from happening again?
Reflect helps agents learn from mistakes and improve over time. Results still depend on the model, task, retrieved context, and quality of your checks. Acceptance is evidence of tested behavior, not a guarantee.
### Does reflection add latency or cost?
It can. Evaluation, reflection, and validation perform additional work. You control relevant budgets and limits, and the agent continues to use your model configuration.
### Can I use tracing without Reflect?
Yes. Reflect is explicitly enabled. You can use PandaProbe for tracing and evaluation independently and add reflection later.
### How do Cloud, Enterprise, and Community relate to Reflect?
Reflect runs in your application through the PandaProbe SDK. Use [managed Cloud](https://www.pandaprobe.com/pricing#cloud) or discuss a paid VPC/on-premises [Enterprise deployment](https://www.pandaprobe.com/pricing#enterprise) for the platform. [Community resources](https://github.com/chirpz-ai/pandaprobe) help individual developers explore the project, get started, and contribute.