Skip to main content

Lightweight telemetry for Amazon Bedrock multi-agent collaboration and orchestration

Project description

BlockWatch Python SDK

Non-blocking telemetry for Amazon Bedrock Agent invoke_agent calls. Traces are collected in the background and sent to BlockWatch — your app code stays unchanged.

Install: pip install blockwatch · PyPI: https://pypi.org/project/blockwatch/

Quick start

  1. Install the package.
  2. Call init() once, before any Bedrock client.
  3. Use bedrock-agent-runtime as usual.
pip install blockwatch
import os
import blockwatch
import boto3

blockwatch.init(
    api_key=os.environ["BLOCKWATCH_API_KEY"],
    endpoint="https://api.blockwatch.ai/telemetry",
)

client = boto3.client("bedrock-agent-runtime", region_name="us-east-1")

response = client.invoke_agent(
    agentId="YOUR_AGENT_ID",
    agentAliasId="YOUR_ALIAS_ID",
    sessionId="your-session-id",
    inputText="Hello",
)

for event in response.get("completion", []):
    if "chunk" in event:
        print(event["chunk"]["bytes"].decode(), end="")

enableTrace=True is set for you automatically.

AWS Lambda

requirements.txt

blockwatch==0.1.0

Call blockwatch.init(...) at module load (use env vars for the API key and endpoint). Build your layer on Amazon Linux:

pip install -r requirements.txt -t python/

API

Function Description
blockwatch.init(api_key, endpoint) Start telemetry and patch boto3. Safe to call once per process.

Notes

  • Python 3.9+
  • Requires boto3 and requests (installed with the package)
  • SDK errors never crash your app (failures are silent)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blockwatch-0.1.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blockwatch-0.1.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file blockwatch-0.1.1.tar.gz.

File metadata

  • Download URL: blockwatch-0.1.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for blockwatch-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3fcfd0c8bc062eb54d060f770f9aef75f01df26ecaa87cefe24fd914758f623d
MD5 b7cd6d980d2e6b4ad620557918a4acc4
BLAKE2b-256 9c3b79d0f1c60cb01a5d847772129c59cf06a1d564190681d5aa8874260f706c

See more details on using hashes here.

File details

Details for the file blockwatch-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: blockwatch-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for blockwatch-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4f81a1fe01de23e4a12ecbbd1d8aae168aa003337580d20eed1350f08104cd89
MD5 ef7b91e9961d7f1454544b8353965476
BLAKE2b-256 409a6f339ae4c19de3b5c79162ad038ba2affe4b7df7d012f2164efba1a8ac76

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page