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

# Wizard (@codspeedbot)

> CodSpeed's AI agent that sets up benchmarks, explains performance changes, and proposes fixes directly in GitHub.

export const TocConfig = ({hideBelow}) => {
  const ALL_LEVELS = ["h2", "h3", "h4"];
  const HEADING_TO_DEPTH = {
    h2: "0",
    h3: "1",
    h4: "2"
  };
  const cutoff = ALL_LEVELS.indexOf(hideBelow);
  if (cutoff === -1) return null;
  const hidden = ALL_LEVELS.slice(cutoff + 1);
  if (!hidden.length) return null;
  const selectors = hidden.map(level => `.toc-item[data-depth="${HEADING_TO_DEPTH[level]}"]`).join(",\n");
  return <style>{`${selectors} { display: none; }`}</style>;
};

export const McpIcon = props => <svg xmlns="http://www.w3.org/2000/svg" className="h-6 w-6" fill="none" viewBox="7 7 166 166" {...props}>
    <path stroke="#FB905C" strokeWidth="11.0667" strokeLinecap="round" d="M23.5996 85.2532L86.2021 22.6507C94.8457 14.0071 108.86 14.0071 117.503 22.6507C126.147 31.2942 126.147 45.3083 117.503 53.9519L70.2254 101.23" />
    <path stroke="#FB905C" strokeWidth="11.0667" strokeLinecap="round" d="M70.8789 100.578L117.504 53.952C126.148 45.3083 140.163 45.3083 148.806 53.952L149.132 54.278C157.776 62.9216 157.776 76.9357 149.132 85.5792L92.5139 142.198C89.6327 145.079 89.6327 149.75 92.5139 152.631L104.14 164.257" />
    <path stroke="#FB905C" strokeWidth="11.0667" strokeLinecap="round" d="M101.853 38.3013L55.553 84.6011C46.9094 93.2447 46.9094 107.258 55.553 115.902C64.1966 124.546 78.2106 124.546 86.8543 115.902L133.154 69.6025" />
  </svg>;

<TocConfig hideBelow="h2" />

The CodSpeed Wizard is an AI agent that sets up benchmarks and CI
configurations, explains regressions, and proposes code fixes. Use it from the
**CodSpeed dashboard** to set up a repository, or mention `@codspeedbot` in any
**pull request comment**, **issue comment**, or **review comment** for ongoing
performance work.

<Frame caption="`@codspeedbot` responding to a GitHub pull request comment with a performance breakdown and proposed fix">
  <img src="https://mintcdn.com/codspeed/GE_LrYDPyn_qQoG5/assets/wizard-github-improvement.png?fit=max&auto=format&n=GE_LrYDPyn_qQoG5&q=85&s=ccae24d887514d60cb78f038d392198b" alt="@codspeedbot responding to a GitHub pull request comment with a performance breakdown and proposed fix" className="rounded-xl w-full max-w-xl mx-auto" width="1824" height="1344" data-path="assets/wizard-github-improvement.png" />
</Frame>

## Example usage

* **Performance breakdown**: ask for a summary of how a branch or pull request
  affects performance.

  ```
  @codspeedbot what's the performance impact of this PR?
  ```

* **Explain a regression**: ask the Wizard to investigate why a benchmark
  regressed and describe the root cause.

  ```
  @codspeedbot explain the regression on bench_parse
  ```

* **Propose a fix**: ask the Wizard to investigate a regression and open a pull
  request with a targeted fix.

  ```
  @codspeedbot fix the regression on bench_serialize
  ```

* **Add benchmarks**: request benchmarks for a specific function or module.

  ```
  @codspeedbot add a benchmark for the parse_config function
  ```

<Note>
  `@codspeedbot` requires the CodSpeed GitHub App to be installed on your
  repository. If you used the dashboard Wizard for initial setup, the app is
  already installed.
</Note>

<Info>
  The Wizard is enabled by default on all accounts and organizations, but can be
  disabled by an admin in the settings.
</Info>

## Next steps

<CardGroup cols={2}>
  <Card title="MCP Server" icon={<McpIcon />} href="/ai/mcp">
    Connect AI coding assistants to your CodSpeed performance data directly from
    your editor.
  </Card>

  <Card title="Agent Skills" icon="books" href="/ai/skills">
    Teach AI assistants to set up benchmarks and optimize performance
    autonomously.
  </Card>
</CardGroup>
