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

# Introduction

> Capture traces from your AI applications, then improve them directly from your coding agent

## What is Bitfab?

Bitfab helps you understand what your AI is doing and iterate on it faster. You capture traces with our SDK, then improve your code and prompts directly from your coding agent - with the [web portal](https://bitfab.ai) available to dive deeper when you need it.

<Steps>
  <Step title="Capture">
    Add the SDK to capture inputs, outputs, errors, and context for every AI call. 1-shot setup with the Claude plugin or MCP - your coding agent reads your codebase, finds AI workflows, instruments them, and creates replay scripts.
  </Step>

  <Step title="Assistant">
    Ask your coding agent to find failures, diagnose issues, and fix your code and prompts. Replay production traces through updated code to verify changes work before you ship. Use [replay mocking](/replay-mocking) to skip expensive or environment-specific child calls while the root function runs real code.
  </Step>
</Steps>

## Quick Start

Install the CLI and run init:

```bash theme={null}
npx bitfab-cli init
```

This detects your editor (Claude Code, Codex, or Cursor), installs the Bitfab plugin, authenticates you, and launches the setup workflow. See the [Claude Code plugin](/claude-plugin) docs for full details.

For agents without a dedicated plugin, connect via [MCP](/mcp-setup) or visit the [setup page](https://bitfab.ai/setup).

## How It Works

### Capture

Your coding agent handles the entire setup:

1. **Instrument + create replay scripts** - Reads your codebase, finds AI workflows, and in parallel adds tracing with minimal diffs and generates scripts so you can regression-test against production data with one command
2. **Get traces** - Run your app and traces flow into Bitfab automatically

### Assistant

Once traces are flowing, iterate directly from your coding agent:

1. **Find issues** - Ask your agent to diagnose failures, search traces, and pinpoint what's going wrong
2. **Fix code and prompts** - Your agent suggests fixes and replays production traces through updated code to verify the changes work. [Mock child spans during replay](/replay-mocking) when an upstream LLM call, API call, or database lookup should return its recorded output while the code under test runs real.
3. **Dive deeper** - Use the [web portal](https://bitfab.ai) to inspect individual traces, compare outputs side-by-side, and explore patterns across your data

## Core Workflows

<CardGroup cols={2}>
  <Card title="Replay Mocking" icon="clone" href="/replay-mocking">
    Replace selected child calls with recorded outputs so you can iterate on the root behavior without paying for every dependency again.
  </Card>

  <Card title="Database Branching" icon="database" href="/db-branching">
    Replay each trace against the database state that existed when it was captured.
  </Card>
</CardGroup>
