LangGraph / LangChain callback that emits Goderash audit events — tamper-evident, hash-chained, regulator-ready.
Project description
goderash-adapter-langgraph
LangGraph / LangChain callback that emits Goderash audit events.
Drop-in adapter for LangGraph and LangChain. Plugs into LangChain's standard callback system, so every node, tool call, and LLM call your agent makes lands in Goderash — tamper-evident, hash-chained, regulator-ready.
Mirrors the TypeScript adapter @goderash/adapter-langgraph.
Install
pip install goderash-sdk goderash-adapter-langgraph langgraph
Quickstart
import os
from goderash_sdk import GoderashClient
from goderash_adapter_langgraph import GoderashCallback
from langgraph.graph import StateGraph
goderash = GoderashClient(
api_key=os.environ["GODERASH_API_KEY"],
tenant="acme",
agent_id="support-agent-v1",
)
callback = GoderashCallback(goderash)
graph = StateGraph(...).compile()
graph.invoke(
{"messages": [{"role": "user", "content": "help me"}]},
config={"callbacks": [callback]},
)
# → root chain start → agent.turn.started
# → tool calls → tool.invoked / tool.completed
# → LLM calls → llm.call.started / llm.call.completed
# → root chain end → agent.turn.completed
# All hash-chained into the per-tenant ledger.
Events emitted
| LangChain callback | Goderash event |
|---|---|
on_chain_start (root) |
agent.turn.started |
on_chain_end (root) |
agent.turn.completed |
on_tool_start |
tool.invoked |
on_tool_end |
tool.completed |
on_tool_error |
tool.failed |
on_llm_start |
llm.call.started |
on_llm_end |
llm.call.completed (with token usage) |
Works for both sync .invoke and async .ainvoke paths.
Compatibility
langchain-core >= 0.3.0langgraph >= 0.2.0- Python
>= 3.10
Related packages
goderash-sdk— core SDK + runtime guardsgoderash-adapter-anthropic— Anthropic Messages / Claudegoderash-adapter-openai— OpenAI Chat / Responses / Assistants
License
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 goderash_adapter_langgraph-0.1.1.tar.gz.
File metadata
- Download URL: goderash_adapter_langgraph-0.1.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c382bc28c82e9bcef12071a66978e5741b733dab8cbb9f90e5b95fdb06093717
|
|
| MD5 |
5afc562f4e26461379b0c118c93a6ade
|
|
| BLAKE2b-256 |
a50c3df8be1cb9df5fdb4ce57fb6d4aeb2ca6e6af19f8372b5b80db000f9c030
|
File details
Details for the file goderash_adapter_langgraph-0.1.1-py3-none-any.whl.
File metadata
- Download URL: goderash_adapter_langgraph-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6b4668d63e352fb7dfe653622ec680bb00a129b78c2eac0cccd5a93074673a3d
|
|
| MD5 |
b6614f463ed5b5979b99700078113eb9
|
|
| BLAKE2b-256 |
81d896d805bb07a8ecd6567098abd9e28838bb1881a528455997280c968d90ed
|