weave.init(), Weave intercepts (patches) supported LLM client libraries. Your application code stays unchanged. You use the provider SDK as usual, and Weave records each request as a Weave Call.
This page describes when and how to change that behavior: turn off automatic tracking, limit it to specific providers, or post-process 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 appear in your project’s Traces.
Configure autopatching
The following sections describe how to enable, disable, or fine-tune autopatching in Python and TypeScript. Choose the tab for your SDK.- Python
- TypeScript
Weave provides automatic implicit patching for all supported integrations by default.Implicit patching (automatic): Weave automatically patches libraries regardless of when you import them.Disabling implicit patching: You can turn off automatic patching if you prefer explicit control.Explicit patching (manual): You can explicitly patch integrations for fine-grained control. This is useful when implicit patching is off or when you only want to trace a subset of providers.After you run the preceding code, Weave only traces the providers you explicitly patched.For more information about handling sensitive data, see How to use Weave with PII data.