Skip to main content
Weave automatically tracks and logs LLM calls made via Amazon Bedrock, AWS’s fully managed service that offers foundation models from leading AI companies through a unified API. There are multiple ways to log LLM calls to Weave from Amazon Bedrock. You can 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.
For the latest tutorials, visit Weights & Biases on Amazon Web Services.

Traces

Weave will automatically capture traces for Bedrock API calls. You can use the Bedrock client as usual after initializing Weave and patching the client:
of using the converse API:

Wrapping with your own ops

You can create reusable operations using the @weave.op() decorator. Here’s an example showing both the invoke_model and converse APIs:

Create a Model for easier experimentation

You can create a Weave Model to better organize your experiments and capture parameters. Here’s an example using the converse API:
This approach allows you to version your experiments and easily track different configurations of your Bedrock-based application.

Learn more

Learn more about using Amazon Bedrock with Weave

Try Bedrock in the Weave Playground

Do you want to experiment with Amazon Bedrock models in the Weave UI without any set up? Try the LLM Playground.

Report: Compare LLMs on Bedrock for text summarization with Weave

The Compare LLMs on Bedrock for text summarization with Weave report explains how to use Bedrock in combination with Weave to evaluate and compare LLMs for summarization tasks, code samples included.