Skip to main content

Kitaru LangGraph adapter

Record and replay LangGraph agent runs with Kitaru.

Install

uv add kitaru-langgraph

Install kitaru-langgraph[deepagents] to also record agents built with deepagents.create_deep_agent through KitaruGraphRunner.from_agent_factory. The langchain.agents.create_agent factory and direct graph wrapping work without the extra.

Model providers

This distribution does not install any model-provider packages. Model strings passed to init_chat_model, such as "openai:gpt-5-nano", require the matching LangChain provider package (for example langchain-openai) in the agent environment. Install the provider package for each model your agent uses.

Use

import uuid

from langchain.agents import create_agent

from kitaru_langgraph import KitaruGraphRunner

runner = KitaruGraphRunner.from_agent_factory(
    create_agent,
    factory_kwargs={"model": "openai:gpt-5-nano", "tools": []},
    agent_id=uuid.UUID("018f0000-0000-7000-8000-000000000100"),
)
result = runner.invoke({"messages": [{"role": "user", "content": "Hello"}]})
print(result)

Wrap an existing compiled graph directly with KitaruGraphRunner(graph) when you build the graph yourself. The runner accepts the same invocation arguments as the wrapped runnable. Kitaru workers provide task, replay, and authentication context through the standard task environment.

Replay support depends on how the graph was constructed. See the LangGraph adapter guide and capability matrix for supported invocation methods, overrides, tool policies, interrupts, and failure behavior.

Before LangGraph 1.2.19, LangGraph trace policies could omit middleware span inputs before callbacks received them, so with Deep Agents 0.7.9 and later some built-in middleware spans record inputs: {}; this does not prove that the hook received empty state. LangGraph 1.2.19 and later apply trace policies only to LangChain tracers, so Kitaru records the state each hook received. Model and tool call inputs are recorded on every supported version. See the adapter guide for details.

Deep Agents runs its built-in middleware before custom middleware, including Kitaru's. A built-in rejection, such as a parallel write to the same file, therefore takes precedence over Kitaru's static or history tool policy. Keeping the same Deep Agents version when replaying avoids changes to these built-in rules across versions.

Tool attempts that return a native result without executing a tool are recorded with execution: short_circuited. An error ToolMessage remains a completed result with its native error status, so history replay can return it to the model rather than turn it into a raised exception.

Licensed under Apache-2.0.

Metadata

Release files for kitaru-langgraph 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kitaru-langgraph 0.4.0
File Size Uploaded Provenance Actions
kitaru_langgraph-0.4.0.tar.gz 28.0 kB With provenance Details for kitaru_langgraph-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for kitaru-langgraph 0.4.0
File Interpreter ABI Platform Actions
kitaru_langgraph-0.4.0-py3-none-any.whl Python 3 none any Details for kitaru_langgraph-0.4.0-py3-none-any.whl

Total release size: 58.1 kB

Release files / kitaru_langgraph-0.4.0.tar.gz

Download URL kitaru_langgraph-0.4.0.tar.gz
Size 28.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9fcadce26e8a065387c861db96ea89e14749c74bbdc034b18cb8f44091314dd8
BLAKE2b-256 checksum
How to use checksums
591e798544a5dd503526e708d7bc99339f3432ba5979b10c16821182178d6098
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Release files / kitaru_langgraph-0.4.0-py3-none-any.whl

Download URL kitaru_langgraph-0.4.0-py3-none-any.whl
Size 30.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
112aeebb1531bb385789f7cd51ba0548dbcc78e4e671ba1d83a4c17ef397d228
BLAKE2b-256 checksum
How to use checksums
49f34b4ef3a4f3dfb2714c4b0cd01e3bd0928fedd119e8d59a27f22424d630f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

Security for kitaru-langgraph 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for kitaru_langgraph-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 25, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page