> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-weave-agent-auto-instrumentation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# W&B Weave

> Track, test, and improve language model apps with W&B Weave

W\&B Weave is an observability and evaluation platform that helps you track, evaluate, and improve your agents and LLM applications. With Weave, you can:

* [Trace and collect metrics about your agents](/weave/agent-integration-quickstart) built with popular SDKs and harnesses using Weave OTel-compatible SDK
* [Manually instrument your application's LLM calls and arbitrary functions](/weave/quickstart) to trace, version, and collect feedback about your application
* [Evaluate](/weave/tutorial-eval) your agent's or application's responses using LLM judges and custom scorers

## Get started

Select your workload type and then use the following docs to guide you through the basics of how to use Weave's suite of tools. For more information about the difference between workloads, see [What is Weave?](/weave/concepts/what-is-weave)

<Tabs>
  <Tab title="Trace an agent">
    <CardGroup cols={3}>
      <Card title="Integrate Weave with an agent" icon="plug" href="/weave/agent-integration-quickstart">
        Pick a built-in integration for your agent SDK or harness and start tracing sessions, turns, LLM calls, and tool calls in the Agents view.
      </Card>

      <Card title="Set up custom agent observability" icon="code" href="/weave/custom-agents-quickstart">
        Trace a custom multi-turn agent with the Weave SDK to capture sessions, LLM calls, and tool calls as OpenTelemetry spans.
      </Card>

      <Card title="View agent metrics in Weave UI" icon="chart-line" href="/weave/guides/tracking/view-agent-activity">
        Trace a basic call to an LLM and review the inputs, outputs, and code in your W\&B account.
      </Card>
    </CardGroup>
  </Tab>

  <Tab title="Trace functions with Ops and Calls">
    <CardGroup cols={3}>
      <Card title="Quickstart: Instrument and trace functions" icon="chart-line" href="/weave/quickstart">
        Start by tracing a basic call to an LLM and reviewing the data in your W\&B account.
      </Card>

      <Card title="Get started evaluating your app" icon="clipboard-check" href="/weave/tutorial-eval">
        Learn how to build an evaluation pipeline using Weave scorers to test and track your application's performance.
      </Card>

      <Card title="Evaluate a RAG application" icon="search" href="/weave/tutorial-rag">
        Build and evaluate RAG applications using Weave with LLM judges to measure retrieval quality.
      </Card>
    </CardGroup>
  </Tab>
</Tabs>

## Automatically instrument agents with Weave

To automatically instrument your agents to use Weave, update the following prompt with your project name and [W\&B API key](https://wandb.ai/settings) environment variables, then pass the prompt to your agent:

```text theme={null}
Fetch and then use the following skill to instrument all agents with Weave:

https://raw.githubusercontent.com/wandb/weave/refs/heads/master/skills/weave-instrument/SKILL.md

Project configuration:
WEAVE_PROJECT=$[YOUR-PROJECT-NAME]
WEAVE_API_KEY=$[WANDB-API-KEY]`;
```

Your agent installs Weave's auto-instrumentation skill and uses it to:

1. Install the Weave package, authenticate with W\&B, and add `weave.init("YOUR-TEAM-NAME/WEAVE_PROJECT")` to agent entry points.
2. Identify the codebase's language, LLM/agent libraries, agent's structure (loop, model calls, tool dispatch, sub-agents), and any existing OTel setup.
3. Help you structure your trace data and properly instrument your application.
4. Verify the configuration works by sending traces to your Weave project.

Once you've completed the configuration, your agents automatically start sending traces to Weave.

If you want to manually instrument an agent, see [Quickstart: Set up custom agent observability](/weave/custom-agents-quickstart).
