---
title: Observe and debug agents
description: 'How weft''s recording, Studio, the devtools panel, the playground and the weft command fit together: one OpenTelemetry pipeline records every run, and every surface reads that recording back.'
url: https://weftgo.dev/docs/observe/
type: concept
sources:
  - weft/AGENTS.md:195-214 (block 6, recording), 215-551 (blocks 7, 7a, 7b), 597-634 (block 9, the pipeline)
  - weft/otel/doc.go (package documentation)
  - weft/otel/pipeline.go:332-342 (Install, the zero-config local sink)
  - weft/core/agent.go:495-505 (TracerProvider, the global provider, a no-op until an SDK registers)
  - weft/docs/adr/0024-observability-data.md
  - weft/docs/record-contract.md:1-44 (the authority), 46-76 (the transport), 1652-1674 (stock spans)
  - weft/README.md:319-358 (Recording runs, Inspecting runs)
---

# Observe and debug agents

weft records a run as OpenTelemetry data: spans for its structure, log records for its events, transcript and requests. [`otel.Install`](https://pkg.go.dev/github.com/weftgo/weft@v0.20.2/otel#Install) sends them to one or more [destinations](https://weftgo.dev/docs/reference/glossary/#destination), by default the [local sink](https://weftgo.dev/docs/reference/glossary/#local-sink) `./.weft/weft.db`. Studio, the devtools panel, the playground and the `weft` command all read that recording back; the playground also sends commands to your running app, which dials Studio through `weft/runtime`.

> **Diagram:** Your app runs agents with agt.Generate; every run leaves as OpenTelemetry spans and log records. otel.Install starts the pipeline and sends them to every destination at once; with no options and no destination named by the environment it writes the local sink only. otel.Local writes .weft/weft.db synchronously; otel.Studio exports OTLP over HTTP to a running weft studio. The Inspector reads them back: embedded with studio.Handler over otel.LocalDB(), or served by weft studio.

The core reports every run through the OTel API, which does nothing until a provider is registered. `weft/otel` registers one, configured for weft: one line installs it, each destination has its own content policy, and the local sink needs no network. Any OTLP backend takes the same data, and a non-Go agent that exports the standard GenAI spans appears in Studio too.

## Record runs

Start here. Every other page reads what these pages set up.

- [Record every run with otel.Install](https://weftgo.dev/docs/observe/recording/): one line, the local sink, heartbeats, reading a run back through `obsdb`.
- [Send records to Studio, Datadog, Langfuse or any OTLP backend](https://weftgo.dev/docs/observe/destinations/): several destinations at once, each with its own content policy, queue and signals.
- [Bridge your app's slog lines into runs](https://weftgo.dev/docs/observe/app-logs/): your log lines stored under the span they were logged in.
- [Use your own OpenTelemetry SDK](https://weftgo.dev/docs/observe/opentelemetry/): weft's spans and records through your own `TracerProvider` and `LoggerProvider`.
- [Inspect agents written in other languages](https://weftgo.dev/docs/observe/other-languages/): what Studio derives from a Python or TypeScript agent's GenAI spans.

## Studio

The Inspector: a web UI and JSON API over the recording, embedded in your app or run as `weft studio`.

- [Run Studio: embedded, local binary or hosted](https://weftgo.dev/docs/observe/studio/setup/)
- [Find runs: the runs list, search and filters](https://weftgo.dev/docs/observe/studio/runs/)
- [Read a run in Studio](https://weftgo.dev/docs/observe/studio/run-page/)
- [Browse sessions and traces in Studio](https://weftgo.dev/docs/observe/studio/sessions-and-traces/)
- [Watch runs live](https://weftgo.dev/docs/observe/studio/live/)
- [Compare runs step by step](https://weftgo.dev/docs/observe/studio/compare/)
- [See what a run cost](https://weftgo.dev/docs/observe/studio/cost/)
- [Export a run](https://weftgo.dev/docs/observe/studio/export/)
- [Get around Studio: keyboard, panes and settings](https://weftgo.dev/docs/observe/studio/navigation/)

## Playground

Your app dials Studio and runs its experiment commands as runs of the agents you register.

- [How does the playground work?](https://weftgo.dev/docs/observe/playground/overview/)
- [Connect your app to Studio's playground (weft/runtime)](https://weftgo.dev/docs/observe/playground/connect/)
- [Replay a run from any step, with edits](https://weftgo.dev/docs/observe/playground/replay/)
- [Run experiments with the option lab](https://weftgo.dev/docs/observe/playground/experiments/)
- [Pause runs at breakpoints, then steer or cancel them](https://weftgo.dev/docs/observe/playground/breakpoints/)

## Devtools panel

Studio's run view inside your own web page, scoped to the conversation on screen.

- [What is the devtools panel?](https://weftgo.dev/docs/observe/devtools/overview/)
- [Install the devtools panel](https://weftgo.dev/docs/observe/devtools/install/)
- [Scope the panel to a conversation](https://weftgo.dev/docs/observe/devtools/scope/)
- [Lay out and theme the panel](https://weftgo.dev/docs/observe/devtools/layout-and-theme/)
- [Drive the panel from your page (host API and events)](https://weftgo.dev/docs/observe/devtools/host-api/)
- [Read a run in the panel](https://weftgo.dev/docs/observe/devtools/reading-runs/)
- [Replay, edit and experiment from the panel](https://weftgo.dev/docs/observe/devtools/replay/)
- [Approve and steer your app's own turns](https://weftgo.dev/docs/observe/devtools/app-turns/)
- [Secure the devtools panel](https://weftgo.dev/docs/observe/devtools/security/)

## The weft command

- [Use the weft command](https://weftgo.dev/docs/observe/cli/): list runs, open one, export it, check a Studio.
- [Develop with weft dev](https://weftgo.dev/docs/observe/weft-dev/): Studio and your app in one command, restarted on save.
- [Let Claude Code or Cursor read your runs (weft mcp)](https://weftgo.dev/docs/observe/weft-mcp/)

## See also

- [Record every run with otel.Install](https://weftgo.dev/docs/observe/recording/): the page to read first
- [Environment variables](https://weftgo.dev/docs/reference/env/): what adds a destination without code
- [The record contract](https://github.com/weftgo/weft/blob/v0.20.2/docs/record-contract.md): what the pipeline emits and what Studio reads, field by field
