Skip to main content

Lightweight telemetry for Amazon Bedrock multi-agent collaboration and orchestration

Project description

BlockWatch Python SDK

Non-blocking telemetry for agent orchestration (Bedrock today; LangGraph, CrewAI, AutoGen planned). 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 with your API key and framework.
  3. For Bedrock, use bedrock-agent-runtime as usual (before creating the client).
pip install blockwatch
import os
import blockwatch
import boto3

blockwatch.init(
    api_key=os.environ["BLOCKWATCH_API_KEY"],
    framework="bedrock",
)

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 when framework="bedrock".

AWS Lambda

requirements.txt

blockwatch>=0.1.2

Call blockwatch.init(api_key=..., framework="bedrock") at module load. Build your layer on Amazon Linux:

pip install -r requirements.txt -t python/

API

Function Description
blockwatch.init(api_key, framework) Start telemetry. framework: bedrock, langgraph, crewai, or autogen.

Telemetry is sent to https://api.blockwatch.ai/telemetry with header X-BlockWatch-Framework set to your framework value.

Notes

  • Python 3.9+
  • Requires boto3 and requests (installed with the package)
  • SDK errors never crash your app (failures are silent)
  • Boto3 patching applies only when framework="bedrock"

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.2.tar.gz (9.2 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.2-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: blockwatch-0.1.2.tar.gz
  • Upload date:
  • Size: 9.2 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.2.tar.gz
Algorithm Hash digest
SHA256 3bb94974251f3cd3b1e0fd930c7799736d9b5ff149a5a99c4af593db88fe4da5
MD5 d5a924d9f7ca208875aa0c1c6e0378a9
BLAKE2b-256 c1dbcdc50a3fe52ad345707fd9428b7747acf78e20e12f01bb60bd61f747a31e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: blockwatch-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dc12705ea54f5a34131a0d6c810eb2084c5962343c9d75d1fca364bb006ad39d
MD5 382900e6c7e2211b1734b68be052ea29
BLAKE2b-256 159528e2bb70069853dde5b1abcb14d9c1a5d18b46e08e2750eed0b8df406053

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