Metadata-Version: 2.5
Name: kitaru-langgraph
Version: 0.1.0
Summary: LangGraph recording and replay adapter for Kitaru.
License-Expression: Apache-2.0
Requires-Python: >=3.11
Requires-Dist: kitaru>=0.22.0
Requires-Dist: langchain-core<2,>=1.5.3
Requires-Dist: langchain<2,>=1.3.14
Requires-Dist: langgraph<2,>=1.2.10
Provides-Extra: deepagents
Requires-Dist: deepagents<0.8,>=0.7.4; extra == 'deepagents'
Description-Content-Type: text/markdown

# Kitaru LangGraph adapter

Record and replay LangGraph agent runs with Kitaru.

## Install

```bash
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

```python
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.
