Skip to main content
The Bitfab Amp plugin brings the full evaluation workflow into Amp. It registers the Bitfab tools directly with Amp, ships the setup, assistant, and update skills, and bundles the local commands those skills call, so instrumenting, replaying, and improving your AI workflows all happen in Amp.

Installation

Run the CLI from your project directory:
This clones the plugin into Amp’s plugin directory (~/.config/amp/plugins/bitfab), confirms Amp loaded it, opens your browser to log in, and starts Amp with the bitfab:setup invocation to type. Pass an initial setup request with --prompt (or -p) and the CLI includes it in that invocation:
For the experimental terminal-native flow, run npx bitfab-cli init --v2 instead. It does not launch Amp: setup choices and tool permissions stay in the CLI while the Claude Agent SDK performs repository analysis and approved edits. Set ANTHROPIC_API_KEY or configure a supported Agent SDK cloud provider first. Use npx bitfab-cli setup --v2 instrument to run one setup mode, or add --diagram to print its declarative state graph without starting the agent.
Clone the plugin into Amp’s system plugin directory:
Then run plugins: reload from the command palette (Ctrl-O in the Amp CLI, Cmd/Alt-Shift-A in the editor extensions), or restart Amp. Confirm it loaded:
Ask Amp for bitfab:setup login to sign in.
Use .amp/plugins/bitfab instead of the system directory to install for one project only.

Requirements

  • Node 18 or newer. The plugin’s local commands (login, Bitfab, replay progress) run under node.
  • A Bitfab account. The setup skill opens a browser to sign in when it needs to.

What the Plugin Does

Automatic Setup

The bitfab:setup skill runs a multi-phase workflow:
  1. Login: opens your browser for OAuth authentication and saves credentials securely
  2. Explain: walks through opt-out withTrace/trace, withNode/node, supported withSpan fallbacks, and replay, including the five ways replay can change a method’s execution. Everything after this asks you to make per-method decisions, so it comes first
  3. Approach: asks whether the agent should walk you through instrumenting or hand you the docs so you can do it yourself
  4. Instrument + Replay (in parallel, per workflow): reads your codebase, finds all AI workflows (LLM calls, agents, AI-driven decisions), and presents them as a numbered list. You choose which to instrument, or name a file, function, or directory yourself and it reads only that instead of scanning. Either way it adds tracing with minimal diffs and creates a registry module for the replay command shipped with the SDK
You can run individual phases by asking Amp for the skill with a mode:
The setup is interactive: it presents 2-5 concrete options per decision point with a recommended choice, so you stay in control throughout. Setup reads the selected workflow and writes instrumentation and its replay registry directly. It asks only for missing choices or a required refactor.

Assistant

The bitfab:assistant skill turns production traces into code improvements, whether the goal is correctness (improving pass rates) or efficiency (cutting token usage and cost). Amp does the mechanical work and collaborates with you on three steps:
  1. Build a dataset from production traces: search for failures, label them with expected outcomes
  2. Experiment against that dataset: make isolated code changes, replay, compare results
  3. Hill climb: repeat until the best change is found, then present results
Run it with an optional trace function key:

Building the Dataset

Amp does the data wrangling: it searches production traces for failures, reads full inputs and outputs, and identifies edge cases. It then presents edge cases for your judgment: is this a failure (and what should the output be), correct, or irrelevant? This labeled dataset becomes the benchmark for all experiments. The plugin opens a rich UI for navigating and labeling the dataset, then brings you back to Amp so you stay in flow. You can label every trace yourself, or label a few and let the agent classify the rest based on the patterns you’ve established.

Running Experiments

The skill reads your code, diagnoses failure patterns, and categorizes proposed changes:
  • Code fixes: deterministic bugs, bundled into one experiment as a foundation
  • Judgment-based fixes: prompt changes, search tuning, output formatting, each gets its own experiment
  • Infrastructure proposals: larger changes noted for future work, not experimented on
Experiments run one at a time in your working tree. Each one edits the code, runs the SDK’s replay command with your registry module and labeled dataset, and compares new outputs to expected outcomes.

Results

After each round, you see which traces now match expected outcomes, which still diverge, and whether any regressions occurred. The assistant works through the planned experiments in turn without pausing to ask whether to keep going, then wraps up once the plan is complete. The final summary shows pass rate improvement and all files changed, uncommitted in your working tree for review.

Tools

The plugin registers these tools directly with Amp under the names below, so Amp can call them in any conversation. There is no MCP server in the path: the plugin’s tool bridge talks to Bitfab for you. Ask Amp to search your traces and it can, without invoking a skill.

Core

Trace Inspection

Labeling and Datasets

Experiments

Templates

Instrumentation

Skills

Amp lists every skill for the model by name and description and loads one when it becomes relevant. Ask for one by name, or invoke it from the command palette with skill: invoke.

Example Workflows

Instrument a new project

The agent detects your project language, finds AI workflows, presents options, and instruments your chosen workflows, all interactively.

Analyze the repo headlessly

This runs Amp headless (amp -x) with the setup skill in analyze-repo mode. It ranks the AI workflows in the repository, reports source recommendations for each, and prints a report. It edits no code. bitfab:setup instrument picks those drafts up later and reconciles each against current code.

Diagnose and fix a failing function

Ask Amp naturally:
The plugin calls search_traces and get_traces to inspect failing traces and suggests code fixes directly. For a specific failing trace, run bitfab:assistant fix <trace-id>. The agent diagnoses the failure, confirms why the original trace is wrong before editing when the trace or conversation does not already make that clear, makes the focused code fix, and replays only that trace first. Once the fix passes, it adds that trace to a dataset with a validated failing label, then branches: inspect the before/after in Bitfab, re-run the full dataset (in Bitfab or terminal-only), keep iterating, or stop. If that full-dataset re-run reveals real regressions (previously-passing traces the fix broke), it reports them and keeps the target trace saved as a red test to revisit. If the replay still fails, it offers to keep iterating or save the trace as a failing test instead.

Iterate on a trace function

The agent finds failing traces, walks you through labeling them with expected outcomes, diagnoses the failure patterns in your code, then runs experiments: editing prompts or code, replaying against your labeled dataset, and reporting what improved. You stay in control at every decision point.

Replay after a code change

After updating a function, pass your registry module to the replay command installed by the SDK:
Or ask Amp to do it for you. While the replay runs, Amp runs it as a background shell command and reports progress to you as it goes: one line per trace as it finishes (a pass/fail mark, the running count, and how long that trace took), with any error reason inline, plus a periodic “still running” heartbeat when a slow trace takes a while so the run never looks stuck, then a summary with the total and average time. Full per-item outputs are written under that replay run’s .bitfab/replays/<run-id>/items/ folder and referenced from .bitfab/replays/<run-id>/events.jsonl. If the replay command succeeds but its local result cannot be captured, the plugin reports the outcome as unverified instead of failed, then checks the server test run to recover the final result.

Configuration

Credentials

Credentials are stored in .bitfab/credentials.local.json when that project-local file exists, otherwise in ~/.config/bitfab/credentials.json (created by bitfab:setup login with owner-readable permissions).

Environment Variables

Updating

This pulls the latest plugin into ~/.config/amp/plugins/bitfab. Run plugins: reload in Amp afterward. npx bitfab-cli update --editor amp sdk starts Amp with bitfab:update sdk to type, which walks each workspace’s SDK upgrade in Amp. Asking Amp for bitfab:update does both.

What differs from the other hosts

Session log capture and the session-start banner ship in a follow-up release through Amp’s agent.start and agent.end events.

Troubleshooting

Not authenticated

If a skill reports “Not authenticated”:
  1. Ask Amp for bitfab:setup login to authenticate via browser
  2. Check that ~/.config/bitfab/credentials.json exists and contains your API key
  3. If using an environment variable, verify BITFAB_API_KEY is set

Bitfab tools not available

If Amp cannot see tools like search_traces, the plugin did not load:
  1. Run amp plugins list. The Bitfab entry shows whether it loaded and, if not, why
  2. Run plugins: reload from the command palette, or restart Amp
  3. Check that the plugin directory is ~/.config/amp/plugins/bitfab (or .amp/plugins/bitfab in the project) and contains index.js
  4. Make sure node is on your PATH. The skills’ local commands run under node even though the plugin itself runs under Amp’s runtime

Plugin updates

Ask Amp for bitfab:update, or run npx bitfab-cli update --editor amp plugin and then plugins: reload.