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

> ## Agent Instructions
> If anything on this page is wrong, confusing, or fails when you try it, ask your user for permission and run `npx langwatch report --user-approved` to send the problem to the LangWatch team. No login is needed and secrets are redacted locally. `npx langwatch report --help` has the details.

# Coding Agent Monitoring and Cost Tracking

> Track what Claude Code, Codex, Copilot, Gemini CLI and opencode really do and cost, per session, per pull request and per team, with privacy controls built for tracking people's tools.

## Getting started

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    npx langwatch claude
    ```
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    npx langwatch codex
    ```
  </Tab>

  <Tab title="GitHub Copilot">
    ```bash theme={null}
    npx langwatch copilot
    ```
  </Tab>

  <Tab title="Gemini CLI">
    ```bash theme={null}
    npx langwatch gemini
    ```
  </Tab>

  <Tab title="OpenCode">
    ```bash theme={null}
    npx langwatch opencode
    ```
  </Tab>

  <Tab title="Cursor">
    Cursor connects through the LangWatch AI Gateway. See [Cursor on the gateway](/docs/ai-gateway/cli/cursor).
  </Tab>
</Tabs>

This will open LangWatch for you to sign in, then start your agent with all telemetry already set up, tracking your token cost per PR, cache hit ratio, and much more.

Check out the [quickstart](/docs/coding-agents/quickstart) for next steps.

## Set up your agent

<CardGroup cols={3}>
  <Card title="Claude Code" icon="https://mintcdn.com/langwatch/5U4x5gWFw7HIWtLY/images/logos/claude-code.svg?fit=max&auto=format&n=5U4x5gWFw7HIWtLY&q=85&s=1930b73ca91087234f3c3d8e795813c3" href="/docs/coding-agents/claude-code" width="24" height="24" data-path="images/logos/claude-code.svg" />

  <Card title="Codex" icon="https://mintcdn.com/langwatch/5U4x5gWFw7HIWtLY/images/logos/codex.svg?fit=max&auto=format&n=5U4x5gWFw7HIWtLY&q=85&s=907819545cb167684ca70f8d71b1b565" href="/docs/coding-agents/openai-codex" width="20" height="20" data-path="images/logos/codex.svg" />

  <Card title="GitHub Copilot" icon="https://mintcdn.com/langwatch/5U4x5gWFw7HIWtLY/images/logos/github-copilot.svg?fit=max&auto=format&n=5U4x5gWFw7HIWtLY&q=85&s=f0c4c4ff8f68709f2148f162ec1c2e65" href="/docs/coding-agents/github-copilot-cli" width="512" height="512" data-path="images/logos/github-copilot.svg" />

  <Card title="Gemini CLI" icon="https://mintcdn.com/langwatch/5U4x5gWFw7HIWtLY/images/logos/gemini.svg?fit=max&auto=format&n=5U4x5gWFw7HIWtLY&q=85&s=452e9951e431edff63fba5fa100446f2" href="/docs/coding-agents/gemini-cli" width="16" height="16" data-path="images/logos/gemini.svg" />

  <Card title="OpenCode" icon="https://mintcdn.com/langwatch/5U4x5gWFw7HIWtLY/images/logos/opencode.svg?fit=max&auto=format&n=5U4x5gWFw7HIWtLY&q=85&s=2701a993bc642cdbd10960754c13e343" href="/docs/coding-agents/opencode" width="24" height="24" data-path="images/logos/opencode.svg" />

  <Card title="Cursor and Aider" icon="https://mintcdn.com/langwatch/5U4x5gWFw7HIWtLY/images/logos/cursor.svg?fit=max&auto=format&n=5U4x5gWFw7HIWtLY&q=85&s=a2e77ace04236cde69d6a266a8d15df2" href="/docs/ai-gateway/cli/overview" width="24" height="24" data-path="images/logos/cursor.svg">
    Through the LangWatch AI Gateway.
  </Card>
</CardGroup>

## See your usage

<CardGroup cols={2}>
  <Card title="Sessions" icon="terminal" href="/docs/coding-agents/sessions">
    Context carried, compactions, cost, and a terminal replay of the whole conversation.
  </Card>

  <Card title="Pull requests" icon="code-pull-request" href="/docs/coding-agents/pull-requests">
    What each change cost, across every session and contributor.
  </Card>

  <Card title="Usage analytics" icon="chart-column" href="/docs/coding-agents/usage-analytics">
    Spend and activity on your personal page, the CLI and the API.
  </Card>

  <Card title="Repository and PR attribution" icon="code-branch" href="/docs/coding-agents/repository-and-pr-attribution">
    How sessions get joined to repositories, branches and pull requests.
  </Card>
</CardGroup>

## Teams, fleets and privacy

<CardGroup cols={2}>
  <Card title="Team projects" icon="users" href="/docs/coding-agents/team-projects">
    Point agents at a shared project.
  </Card>

  <Card title="Headless machines and CI" icon="server" href="/docs/coding-agents/headless-and-ci">
    Servers, build agents and fleets, with no login.
  </Card>

  <Card title="Privacy" icon="lock" href="/docs/coding-agents/privacy">
    Where your data lands and who can read it, stated exactly.
  </Card>

  <Card title="Secrets redaction" icon="key" href="/docs/coding-agents/secrets-redaction">
    Credentials become a typed marker before storage. On by default.
  </Card>
</CardGroup>

## Investigate with your agent

<CardGroup cols={3}>
  <Card title="Explore your usage" href="/docs/coding-agents/explore-your-usage-with-your-own-agent">
    Your agent answers "where did my tokens go".
  </Card>

  <Card title="Find your context sweet spot" href="/docs/coding-agents/find-your-context-sweet-spot">
    Where fat context stops paying for itself.
  </Card>

  <Card title="Compare provider costs" href="/docs/coding-agents/compare-provider-costs">
    Price your real usage mix against other providers.
  </Card>
</CardGroup>
