Skip to main content

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.

PyPI version PyPI downloads license

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.0
  • langgraph >= 0.2.0
  • Python >= 3.10

Related packages

License

Apache-2.0

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

goderash_adapter_langgraph-0.1.1.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

goderash_adapter_langgraph-0.1.1-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

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

Hashes for goderash_adapter_langgraph-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c382bc28c82e9bcef12071a66978e5741b733dab8cbb9f90e5b95fdb06093717
MD5 5afc562f4e26461379b0c118c93a6ade
BLAKE2b-256 a50c3df8be1cb9df5fdb4ce57fb6d4aeb2ca6e6af19f8372b5b80db000f9c030

See more details on using hashes here.

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

Hashes for goderash_adapter_langgraph-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b4668d63e352fb7dfe653622ec680bb00a129b78c2eac0cccd5a93074673a3d
MD5 b6614f463ed5b5979b99700078113eb9
BLAKE2b-256 81d896d805bb07a8ecd6567098abd9e28838bb1881a528455997280c968d90ed

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