converse API usage so you can debug, evaluate, and monitor your Bedrock-based applications.
You can log LLM calls to Weave from Amazon Bedrock in multiple ways. Use weave.op to create reusable operations for tracking any calls to a Bedrock model. Optionally, if you’re using Anthropic models, you can use Weave’s built-in integration with Anthropic.
Traces
Weave automatically captures traces for Bedrock API calls once you patch the client. After you initialize Weave and patch the client, use the Bedrock client as usual:converse API:
Wrap calls with your own ops
Wrap Bedrock calls in your own ops to group related logic, capture custom inputs, and reuse the same tracked function across your application. Create reusable operations with the@weave.op() decorator. The following example shows both the invoke_model and converse APIs:

Create a Model for easier experimentation
A Weave Model bundles configuration and prediction logic together so you can iterate on parameters and compare runs side by side. Create a Weave Model to better organize your experiments and capture parameters. The following example uses the converse API: