weave.init(), Weave automatically intercepts (patches) supported LLM client libraries. Your application code stays unchanged: you use the provider SDK as usual, and each request is recorded as a Weave Call. You get full tracing with minimal setup.
This page describes when and how to change that behavior: turning automatic tracking off, limiting it to specific providers, or post-processing inputs and outputs (for example, to redact PII).
Default behavior
By default, Weave automatically patches and tracks calls to common LLM libraries such asopenai and anthropic. Call weave.init(...) at the start of your program and use those libraries normally. Their calls will appear in your project’s Traces.
Configure autopatching
- Python
- TypeScript
Weave provides automatic implicit patching for all supported integrations by default:Implicit Patching (Automatic): Libraries are automatically patched regardless of when they are imported.Disabling Implicit Patching: You can disable automatic patching if you prefer explicit control.Explicit Patching (Manual): You can explicitly patch integrations for fine-grained control.For more on handling sensitive data, see How to use Weave with PII data.