Agentic document editing using the Bedrock Converse API.
Docs: Integrations
- AWS credentials configured (
aws configureor environment variables) - Bedrock model access enabled in the AWS console
npm install
npx tsx index.ts contract.docx reviewed.docxpython -m venv venv && source venv/bin/activate
pip install superdoc-sdk boto3
python index.py contract.docx reviewed.docx| Variable | Default | Description |
|---|---|---|
AWS_REGION |
us-east-1 |
AWS region with Bedrock access |
BEDROCK_MODEL_ID |
us.anthropic.claude-sonnet-4-6 |
Any Bedrock model that supports tool use |
- Connects to SuperDoc via the SDK
- Loads tool definitions in Anthropic format — the same format Bedrock's Converse API expects
- Converts to Bedrock's
toolSpecshape (3-line mapping) - Runs an agentic loop: the model calls SuperDoc tools to read, query, and edit the document
- Saves the reviewed document