Skip to main content

Production AI agent observability for regulated industries

Project description

blockconvey-monitor

Production AI agent observability for regulated industries.

Install

pip install blockconvey-monitor

Quick start

from blockconvey import monitor

prism = monitor(
    api_key="pt_your-key",
    project_id="your-project-id"
)

# Send a trace
prism.trace(
    input_messages=[{"role": "user", "content": user_input}],
    output_message=agent_response,
    model="gpt-4o",
    latency_ms=1200,
    agent_name="Customer Service Agent"
)

With decorator

from blockconvey import monitor, traced

prism = monitor()

@traced(prism, agent_name="LoanAdvisor", model="claude-sonnet-4-6")
def ask_agent(user_message: str) -> str:
    return your_llm_call(user_message)

Async

from blockconvey import async_monitor

prism = async_monitor()

await prism.trace(
    input_messages=[{"role": "user", "content": user_input}],
    output_message=agent_response,
    model="gpt-4o",
)

Environment variables

BLOCKCONVEY_API_KEY=pt_your-key
BLOCKCONVEY_PROJECT_ID=your-project-id

Integrations

LangChain / LangGraph

pip install blockconvey-monitor[langchain]
from blockconvey.integrations.langchain import BlockConveyCallbackHandler
from langchain_anthropic import ChatAnthropic

handler = BlockConveyCallbackHandler(
    api_key="pt_your-key",
    project_id="your-project-id",
    agent_name="MyAgent"
)
llm = ChatAnthropic(model="claude-sonnet-4-6", callbacks=[handler])
# All llm.invoke() calls are now automatically traced
# LangGraph
from blockconvey.integrations.langgraph import BlockConveyCallbackHandler

handler = BlockConveyCallbackHandler(agent_name="LoanProcessingGraph")
graph.invoke(state, config={"callbacks": [handler]})

OpenAI

pip install blockconvey-monitor[openai]
import openai
from blockconvey import monitor
from blockconvey.integrations.openai import wrap_openai

prism = monitor()
client = wrap_openai(openai.OpenAI(), prism)

# All client.chat.completions.create() calls are now auto-traced
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Explain model risk management."}],
)

Anthropic

pip install blockconvey-monitor[anthropic]
import anthropic
from blockconvey import monitor
from blockconvey.integrations.anthropic import wrap_anthropic

prism = monitor()
client = wrap_anthropic(anthropic.Anthropic(), prism)

# All client.messages.create() calls are now auto-traced
response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "What is SR 11-7?"}],
)

Install all integrations

pip install blockconvey-monitor[all]

Docs

https://docs.blockconvey.com

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

blockconvey_monitor-0.3.0.tar.gz (21.6 kB view details)

Uploaded Source

Built Distribution

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

blockconvey_monitor-0.3.0-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file blockconvey_monitor-0.3.0.tar.gz.

File metadata

  • Download URL: blockconvey_monitor-0.3.0.tar.gz
  • Upload date:
  • Size: 21.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for blockconvey_monitor-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f9ce2d993aced27c11e9413f1465573ad5fbe9c5ed1288beec50719c16bf166d
MD5 d7db1a8da67946d5bf82b6fff6a45947
BLAKE2b-256 e7cafe6e08b4b954ccf364f4c7e9da5e90aee1daf59d321c96b399e4cf7bfeef

See more details on using hashes here.

File details

Details for the file blockconvey_monitor-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for blockconvey_monitor-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a8593889718f49f37065bf8415f644add6ba1d25f2a8c6f92751bd48fda10236
MD5 dc8dd78e1cabbe823706d0a924170c45
BLAKE2b-256 2789e39f38db7ef7cf2b001b02ae61d2a4a453c69f6a3927d8bf7cc641da5afb

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