Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zizkadb_langchain-0.1.0.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

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

zizkadb_langchain-0.1.0-py3-none-any.whl (2.2 kB view details)

Uploaded Python 3

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

Hashes for zizkadb_langchain-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6f941f8a0ff98b1d8691bb429d3206de46c74f6d03549db08ddf9d63c01b4979
MD5 6cf84fa6be635e128d20ce9c2b213c41
BLAKE2b-256 f58f27371a960462dd765e1811f4faa9d59ef3315702842f040b14a0ae6dd57b

See more details on using hashes here.

File details

Details for the file zizkadb_langchain-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for zizkadb_langchain-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef69e9a32d086645ddc9bb628a3f9141804c97ce99f4e6a39e4d4db1d7f51f39
MD5 fa7a9074528d017c13b9e4b93199ef93
BLAKE2b-256 dd687021a31c76ebbd1f52f9e14542cc726fa1364b31db0810fe42776045ab60

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