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
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.1.3.tar.gz
(11.4 kB
view details)
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 blockconvey_monitor-0.1.3.tar.gz.
File metadata
- Download URL: blockconvey_monitor-0.1.3.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7e2a3a4e274f60d7654b889b8c77667067ec1f52d5c174ad7f0ecd2cc2b24c78
|
|
| MD5 |
77d3c87205dfd9dbf282c2c17a7e9146
|
|
| BLAKE2b-256 |
b51d3734133bc3757dbe7d3e244df734d3454760b233681d5634ad28cb4d4063
|
File details
Details for the file blockconvey_monitor-0.1.3-py3-none-any.whl.
File metadata
- Download URL: blockconvey_monitor-0.1.3-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19d9df21a82a5761b4980d64229f432c454625486b8ce4242a3f4717679953a6
|
|
| MD5 |
573c0cc45b5ee3d087b916ac34a37ed1
|
|
| BLAKE2b-256 |
4d3ac9bcc37cd72ec9d19bfaf137980e73f32beaa5ed8957e66d6053ee3d173a
|