LangChain callbacks for ZizkaDB causal agent logging
Project description
zizkadb-langchain
LangChain AsyncCallbackHandler that logs LLM and tool steps to ZizkaDB with parent_id lineage.
pip install zizkadb-sdk zizkadb-langchain langchain-openai
from langchain_openai import ChatOpenAI
from langchain_core.messages import HumanMessage
from zizkadb import ZizkaDB
from zizkadb_langchain import ZizkaDBCallbackHandler
async with ZizkaDB("zizkadb_live_...") as db:
handler = ZizkaDBCallbackHandler(db, agent="my-bot")
llm = ChatOpenAI(model="gpt-4o-mini")
await llm.ainvoke([HumanMessage(content="Hello")], config={"callbacks": [handler]})
await db.why(handler.last_event_id).print()
Monorepo dev install:
pip install -e sdk/python -e integrations/langchain
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 zizkadb_langchain-0.1.0.tar.gz.
File metadata
- Download URL: zizkadb_langchain-0.1.0.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f941f8a0ff98b1d8691bb429d3206de46c74f6d03549db08ddf9d63c01b4979
|
|
| MD5 |
6cf84fa6be635e128d20ce9c2b213c41
|
|
| BLAKE2b-256 |
f58f27371a960462dd765e1811f4faa9d59ef3315702842f040b14a0ae6dd57b
|
File details
Details for the file zizkadb_langchain-0.1.0-py3-none-any.whl.
File metadata
- Download URL: zizkadb_langchain-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ef69e9a32d086645ddc9bb628a3f9141804c97ce99f4e6a39e4d4db1d7f51f39
|
|
| MD5 |
fa7a9074528d017c13b9e4b93199ef93
|
|
| BLAKE2b-256 |
dd687021a31c76ebbd1f52f9e14542cc726fa1364b31db0810fe42776045ab60
|