Skip to main content

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 (or a self-hosted instance)

Quick Setup

1

Install the CLI

Install the MutagenT CLI (v0.1.30) globally.
bun add -g @mutagent/cli
2

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.
mutagent auth login
For CI/CD environments, set the MUTAGENT_API_KEY environment variable (no login needed).
3

Integrate Your Framework

Use mutagent explore to auto-detect your framework, then generate the integration code.
# Auto-detect your AI framework
mutagent explore

# Generate integration code
mutagent integrate langchain
After login, the CLI offers a guided integration path that runs mutagent explore automatically and walks you through framework selection.
4

View Your Traces

Run your application as usual. Traces are automatically sent to MutagenT. View them in the dashboard or from the CLI.
mutagent traces list

Alternative: Direct SDK Usage

If you prefer programmatic access without the CLI, you can use the SDK directly.
import { Mutagent } from '@mutagent/sdk';

const client = new Mutagent({
  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.
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 for full details.

Architecture

Next Steps

Installation

Detailed installation instructions

First Trace

Trace your first LLM call

Integrations

All supported frameworks

CLI Reference

Full CLI documentation