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
- Install the package.
- Call
init()once, before any Bedrock client. - Use
bedrock-agent-runtimeas 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fcfd0c8bc062eb54d060f770f9aef75f01df26ecaa87cefe24fd914758f623d
|
|
| MD5 |
b7cd6d980d2e6b4ad620557918a4acc4
|
|
| BLAKE2b-256 |
9c3b79d0f1c60cb01a5d847772129c59cf06a1d564190681d5aa8874260f706c
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f81a1fe01de23e4a12ecbbd1d8aae168aa003337580d20eed1350f08104cd89
|
|
| MD5 |
ef7b91e9961d7f1454544b8353965476
|
|
| BLAKE2b-256 |
409a6f339ae4c19de3b5c79162ad038ba2affe4b7df7d012f2164efba1a8ac76
|