Amazon Bedrock
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 useweave.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 will automatically capture traces for Bedrock API calls. You can use the Bedrock client as usual after initializing Weave and patching the client: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: