> ## Documentation Index
> Fetch the complete documentation index at: https://mirrors.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Mirrors documentation

> Connect your agent and deliver reviewed context when it is relevant.

Mirrors helps you address recurring mistakes in an AI agent. It collects conversation
traces, groups failures for investigation, and returns relevant context for your
application to add to its existing system prompt.

You or your coding agent write the correction and choose when to activate it. Your
application continues to own model calls, tools, streaming, and cancellation. Once
the SDK is integrated, eligible context updates can reach subsequent turns without
redeploying your application.

## How it fits together

1. **Capture original conversations.** The SDK uploads snapshots in the background.
   A trace is the ordered record of messages, tool calls, and tool results from one
   execution or conversation.
2. **Investigate recurring failures.** Use the captured evidence to understand what
   went wrong and write narrowly scoped guidance.
3. **Preview and activate a correction.** Check where the saved version matches,
   review exclusions, then activate it when ready.
4. **Retrieve context at each user turn.** In active mode, the SDK can return
   relevant text. Your application appends it before making its normal model call.

When optional context is unavailable, the SDK returns empty context so your
application can use its original prompt. An empty result is also expected when no
correction matches or the agent is in shadow or off mode.

<CardGroup cols={2}>
  <Card title="Connect your agent" icon="plug" href="/docs/quickstart">
    Install the Node.js SDK and add capture and context retrieval.
  </Card>

  <Card title="Review a correction" icon="check" href="/docs/guides/corrections">
    Understand preview, activation, and what the results establish.
  </Card>
</CardGroup>

## What to measure

Track context delivery, added turn latency, and task outcomes separately. Receiving
context does not prove your application applied it. Matching recorded traces does
not prove the correction improves future answers. Compare behavior on representative
conversations before expanding a rollout.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.