Weave is a toolkit for developing generative-AI applications. You decorate the functions in your application with @weave.op, and each call's inputs and outputs are recorded, with nested calls assembled into a trace tree you can inspect afterwards.
Tracing covers model API calls, generation calls to open-source models, and any validation or data-transformation function you choose to track. Alongside tracing, Weave supports building like-for-like evaluations for language-model use cases and organizing the information generated across an LLM workflow, from experimentation through evaluation to production. It requires Python 3.10 or higher and a Weights & Biases account.
The repository also carries code for the earlier Weave engine and Weave boards. That work is paused while the project focuses on tracing and evaluations; the tracing code sits in weave/trace and weave/trace_server, and the evaluation code in weave/flow.
Features
- Function tracing: the @weave.op decorator records inputs and outputs for any function you mark
- Trace trees: nested decorated calls are assembled into a tree showing how a request flowed through your code
- Evaluations: structured, repeatable comparisons for language-model use cases
- Provider coverage: traces calls to providers such as OpenAI, Anthropic, and Google AI Studio, plus generations from Hugging Face and other open-source models
- Workflow organization: keeps experiment, evaluation, and production artifacts together in one project
