KnowledgeMay 11, 2026·2 min read

Weave — Trace and Debug LLM Apps

Weave adds tracing to LLM apps with `@weave.op`. Install `weave`, call `weave.init()`, then track inputs/outputs across API calls and validation steps.

Agent ready

Ready-to-run agent install

This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.

Native · 96/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Knowledge
Install
Single
Trust
Trust: Established
Entrypoint
Asset
Direct install command
npx -y tokrepo@latest install c79b88fe-91bf-424e-9a4d-f73956516f59 --target codex

Run after dry-run confirms the install plan.

Intro

Weave adds tracing to LLM apps with @weave.op. Install weave, call weave.init(), then track inputs/outputs across API calls and validation steps.

  • Best for: teams debugging agent workflows who need end-to-end traces across tool calls, validation ops, and model calls
  • Works with: Python, weave.op decorator, integration with LLM API calls and custom validation functions (repo examples)
  • Setup time: 9 minutes

Quantitative Notes

  • Install: pip install weave (repo)
  • Setup time ~9 minutes
  • GitHub stars (verified): see Source & Thanks

Practical Notes

Weave is most valuable when you treat observability as a product feature. Add traces around every boundary: user input → prompt assembly → tool calls → validation → final output. Then use the trace tree to answer: where did latency come from, which step failed, and what data caused the failure?

Safety note: Avoid logging secrets; sanitize prompts and tool args before tracing in production.

FAQ

Q: What should I trace first? A: Start with your top-level agent run function and the model-call wrapper; then add ops around tools and validators.

Q: Does it only work with OpenAI? A: No. The README says you can trace any function, including calls to different providers and open-source models.

Q: How do I keep traces useful? A: Log structured inputs, normalize outputs, and capture error cases; traces are only helpful when they show failures clearly.


🙏

Source & Thanks

GitHub: https://github.com/wandb/weave Owner avatar: https://avatars.githubusercontent.com/u/26401354?v=4 License (SPDX): Apache-2.0 GitHub stars (verified via api.github.com/repos/wandb/weave): 1,090

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets