> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rotavision.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AWS Bedrock

> Witness AWS Bedrock Converse calls with one line. Residency-compliant in AWS Mumbai for Indian regulated entities.

`watch_bedrock` wraps a boto3 `bedrock-runtime` client's `converse` method. It is
duck-typed, so the Sakshi SDK does not depend on boto3: it wraps the client you
already build. Bedrock in the AWS Mumbai region is the residency-compliant hosted
path for Indian regulated entities, so the `modelId` captured here is para-56
evidence on the deployment most partners will actually run.

## Install

```bash theme={null}
pip install sakshi-sdk boto3
```

## Wrap the client

<CodeGroup>
  ```python Before theme={null}
  import boto3

  client = boto3.client("bedrock-runtime", region_name="ap-south-1")

  reply = client.converse(
      modelId="anthropic.claude-opus-4-6-v1:0",
      messages=[{"role": "user", "content": [{"text": "Assess this applicant."}]}],
  )
  ```

  ```python After theme={null}
  import boto3
  from sakshi.middleware import watch_bedrock

  client = watch_bedrock(
      boto3.client("bedrock-runtime", region_name="ap-south-1")
  )

  with sakshi.witness(agent_id, client_ref="APP-2026-04471") as decision:
      reply = client.converse(
          modelId="anthropic.claude-opus-4-6-v1:0",
          messages=[{"role": "user", "content": [{"text": "Assess this applicant."}]}],
      )
      decision.action(outcome="approved", mode="auto")
  ```
</CodeGroup>

See [the shared shape](/integrations/overview#the-shared-shape) for how `sakshi`
and `agent_id` are created.

## What gets recorded

Each Converse call inside a witness session lands an `llm_call` step, and the
served model identity auto-fills (para-56):

* The provider, recorded as `aws-bedrock`.
* The requested `modelId`.
* The stop reason.
* Input and output token usage.
* The call latency.
* With content capture on, the last message you sent and the first text block of
  the response, each truncated to `content_limit`.

## Capture options

```python theme={null}
watch_bedrock(client, capture_content=True, content_limit=1000)
```

* `capture_content` defaults to `True`. Content capture is safe by design: the
  platform tokenizes PII at ingest, before storage or hashing. Set it to `False`
  for a minimal-capture deployment where only metadata, tokens, and identity are
  recorded.
* `content_limit` caps how much of each message and response is stored. The
  default is 1000 characters.

<Note>
  A call made outside a witness session passes through untouched and is not
  recorded. Recording is fail-open: it never breaks or delays the Converse call.
</Note>

<Card title="Full SDK reference" icon="code" href="/sdk/python">
  The client, the witness session, and enforcement.
</Card>
