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

# QuickStart Overview

> Get started with MutagenT in 4 steps

# Getting Started with MutagenT

Welcome to MutagenT! The fastest way to start tracing your LLM applications is with the MutagenT CLI.

## Prerequisites

* Node.js 18+ or Bun runtime
* A MutagenT account at [app.mutagent.io](https://app.mutagent.io)

## Quick Setup

<Steps>
  <Step title="Install the CLI">
    Install the MutagenT CLI (v0.1.186) globally.

    <CodeGroup>
      ```bash bun (recommended) theme={null}
      bun add -g @mutagent/cli
      ```

      ```bash npm theme={null}
      npm install -g @mutagent/cli
      ```
    </CodeGroup>
  </Step>

  <Step title="Authenticate">
    Log in to connect the CLI to your MutagenT account. The CLI opens your browser for OAuth by default, or you can paste an API key.

    ```bash theme={null}
    mutagent auth login
    ```

    <Tip>
      For CI/CD environments, set the `MUTAGENT_API_KEY` environment variable (no login needed).
    </Tip>
  </Step>

  <Step title="Integrate Your Framework">
    Use `mutagent explore` to auto-detect your framework, then generate the integration code.

    ```bash theme={null}
    # Auto-detect your AI framework
    mutagent explore

    # Generate integration code
    mutagent integrate langchain
    ```

    <Tip>
      After login, the CLI offers a guided integration path that runs `mutagent explore` automatically and walks you through framework selection.
    </Tip>
  </Step>

  <Step title="View Your Traces">
    Run your application as usual. Traces are automatically sent to MutagenT. View them in the dashboard or from the CLI.

    ```bash theme={null}
    mutagent traces list
    ```
  </Step>
</Steps>

## Alternative: Direct SDK Usage

If you prefer programmatic access without the CLI, you can use the SDK directly.

```typescript theme={null}
import { Mutagent } from '@mutagent/sdk';

const client = new Mutagent({
  security: { apiKey: process.env.MUTAGENT_API_KEY },
});
```

For tracing, the SDK can auto-initialize from the `MUTAGENT_API_KEY` environment variable, or you can call `initTracing()` explicitly.

```typescript theme={null}
import { initTracing } from '@mutagent/sdk/tracing';

// Explicit initialization
initTracing({ apiKey: process.env.MUTAGENT_API_KEY! });

// Or just set MUTAGENT_API_KEY in your environment
// and tracing initializes lazily on first span
```

See the [SDK Reference](/sdk/overview) for full details.

## Architecture

<Mermaid>
  flowchart LR
  A\[Your App] -->|"@mutagent/openai\n\@mutagent/langchain\n..."| B\["@mutagent/sdk"]
  B -->|Batch flush| C\["api.mutagent.io"]
  C --> D\[Dashboard]
  E\[mutagent CLI] -->|Auth & Config| C
</Mermaid>

<Tip>
  `api.mutagent.io` is the production endpoint. For local development, configure `MUTAGENT_ENDPOINT` to point to your local server.
</Tip>

## Next Steps

<CardGroup cols={2}>
  <Card title="Installation" icon="download" href="/quickstart/installation">
    Detailed installation instructions
  </Card>

  <Card title="First Trace" icon="paper-plane" href="/quickstart/first-trace">
    Trace your first LLM call
  </Card>

  <Card title="Integrations" icon="plug" href="/integrations/overview">
    All supported frameworks
  </Card>

  <Card title="CLI Reference" icon="terminal" href="/cli/overview">
    Full CLI documentation
  </Card>
</CardGroup>
