wandb/weave
Weave is a toolkit for developing AI-powered applications, built by Weights & Biases.
Weave by Weights & Biases
What it is – Weave is a Python toolkit that records ("traces") the behaviour of AI agents and the functions they call. The recorded data appears in the W&B UI under Agents (for full conversational runs) or Calls (for individual function calls), letting you inspect, debug, and evaluate your agents.
Key capabilities
- Agent tracing – automatically logs each turn, LLM request, and tool use when you run an agent built with the OpenAI Agents SDK, Claude Agent SDK, or Google ADK. The UI shows a timeline of the conversation.
- Custom‑agent support – if you have your own loop, you can wrap it with
weave.start_conversation,weave.start_turn, andweave.start_llm(context‑manager style) to get the same visualisation. - Function tracing – decorate any Python function with
@weave.opto capture its inputs, outputs, and any nested LLM calls. These appear in the Calls tab and are useful for evaluation or scoring pipelines. - Built‑in evaluation – the
weave/flowpackage provides utilities for scoring agent outputs, though the README only hints at this. - Zero‑config for supported SDKs – a single
weave.init("<team>/<project>")call patches the supported agent libraries, so no code changes are required beyond the init.
Typical workflow
- Install the library (and the agent SDK you need). ```bash
pip install weave openai-agents # or claude‑agents, google‑adk
- Call
weave.init("myteam/myproject")– this prints a URL to the W&B project. - Run your agent as usual. Weave automatically records the conversation.
- Open the project URL and explore the Agents tab to see a step‑by‑step view of prompts, tool calls, and LLM usage.
- For non‑agent code, wrap functions with
@weave.opor use the low‑levelweave.start_*context managers.
Example – tracing a simple research‑assistant agent that can call a Wikipedia search tool. The README shows a complete script that:
- defines a
wikipedia_searchtool, - creates an
Agentwith instructions, - runs three questions in a loop using
Runner.run, - and prints the agent’s responses. After
weave.initthe whole interaction appears in the W&B UI.
Who it’s for
- ML engineers building LLM‑powered assistants or chatbots who need visibility into prompt flow and tool usage.
- Researchers evaluating different prompting strategies or model versions.
- Teams that already use Weights & Biases for experiment tracking and want a unified place for agent observability.
Prerequisites
- Python 3.10+.
- A free W&B account and API key.
- API keys for the LLM provider you plan to use (e.g., OpenAI).
Documentation & support
- Full docs: https://wandb.me/weave
- Quick‑start guides for each supported agent SDK.
- Open‑source repository on GitHub (wandb/weave) with CI badges and a PyPI release.
Status – The README notes that the broader “Weave engine” and UI boards are on pause; the current focus is on the tracing and evaluation components (weave/trace and weave/flow).
All details are taken directly from the repository’s README; no additional features are inferred.
Related
- Project
- Project
- Project
- Project
- Project