Plott Analytics SDK for LangGraph - Automatic analytics tracking for LangGraph
Project description
Plott SDK for LangGraph
Automatic analytics tracking for LangGraph applications. Just wrap your graph and analytics are collected transparently.
Installation
pip install plott-sdk-langgraph
Quick Start
from langgraph.graph import StateGraph
from langchain_core.messages import HumanMessage
from plott_langgraph import plott_tracked_graph
# Create and compile your graph
graph = workflow.compile(checkpointer=memory)
# Wrap with Plott - that's it!
tracked_graph = plott_tracked_graph(graph, {
"api_key": "cpk_...", # or set PLOTT_API_KEY env var
"environment": "development",
})
# Use exactly like the original graph - analytics are automatic
async for event in tracked_graph.astream_events(
{"messages": [HumanMessage(content="Hello!")]},
config={"configurable": {"thread_id": "123", "run_id": "run-456"}},
):
# Your normal event handling
if event["event"] == "on_chat_model_stream":
print(event["data"]["chunk"].content, end="", flush=True)
What Gets Tracked
The SDK automatically tracks:
| Event | Description |
|---|---|
| Messages | User input and assistant responses |
| Tool Calls | Tool executions with arguments and results |
| State Snapshots | State changes as the graph executes |
| Run Lifecycle | Start and end of each graph run |
| Errors | Any errors that occur during execution |
Configuration
tracked_graph = plott_tracked_graph(graph, {
"api_key": "cpk_...", # Required (or PLOTT_API_KEY env var)
"environment": "production", # production, staging, development, test
"retry_attempts": 3, # Number of retry attempts on failure
"retry_delay": 1.0, # Seconds between retries
"debug": False, # Enable debug logging
})
Environment Variables
PLOTT_API_KEY- API key (if not provided in config)
Tracked Methods
The following methods have analytics tracking:
astream_events()- Full event streaming with detailed trackingastream()- State streaming with lifecycle trackinginvoke()- Synchronous invocation with lifecycle trackingainvoke()- Async invocation with lifecycle tracking
License
Apache 2.0
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 plott_sdk_langgraph-0.0.1a1.tar.gz.
File metadata
- Download URL: plott_sdk_langgraph-0.0.1a1.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7c8040a6af8f326507ee4362f323b842ee4566186848db6095984e816a5a785
|
|
| MD5 |
5a6a374a687db7edc3b3acfbb10bd035
|
|
| BLAKE2b-256 |
9857940bdcad16e53edd4e4b386ee680f35c484a7e0eecab6a80a3ae4156257e
|
File details
Details for the file plott_sdk_langgraph-0.0.1a1-py3-none-any.whl.
File metadata
- Download URL: plott_sdk_langgraph-0.0.1a1-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.5.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ba531a72500a0f749fd22e2ff1526a9bd9bfe13ee1aaa7e6b8d3c291e4176d7
|
|
| MD5 |
4c1791cecf52b78c9e5e42ec5a0f0cca
|
|
| BLAKE2b-256 |
90fced8f7965c2cb803c526e6a4a19ea52f331699c51117b02aef28ebed49779
|