Metadata-Version: 2.5
Name: parlot-instrumentation-langgraph
Version: 0.4.1
Summary: Parlot instrumentation for LangGraph / LangChain — same turn model as voice
Project-URL: Homepage, https://parlot.ai
Project-URL: Documentation, https://parlot.ai/docs
Project-URL: Repository, https://github.com/parlot-ai/sdk
Author-email: Parlot AI <hi@parlot.ai>
License-Expression: MIT
License-File: LICENSE
Keywords: agents,ai,langchain,langgraph,observability,opentelemetry,parlot,telemetry
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27.0
Requires-Dist: langchain-core>=0.3.0
Requires-Dist: langgraph>=0.6.0
Requires-Dist: opentelemetry-api>=1.27.0
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.27.0
Requires-Dist: opentelemetry-sdk>=1.27.0
Requires-Dist: parlot-core>=0.1.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.24; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# parlot-instrumentation-langgraph

Parlot’s lead product is production voice observability on LiveKit. Use this package when you already run voice and want the **same debugger** for LangGraph / LangChain — same turn model, not a separate product.

Prefer [`parlot-instrumentation-livekit`](https://pypi.org/project/parlot-instrumentation-livekit/) for voice agents.

**Docs:** [LangGraph guide](https://parlot.ai/docs/guides/langgraph) · [Quick Start](https://parlot.ai/docs/sdk/get-started/quick-start) · [parlot.ai](https://parlot.ai)

## Install

```bash
pip install parlot-instrumentation-langgraph
# or: uv add parlot-instrumentation-langgraph
# or: pip install "parlot[langgraph]"
```

## Instrument

```python
from parlot.instrumentation.langgraph import parlotize

parlotize("support-bot", version="0.1.0", channel="webchat")

# Normal LangGraph usage — no per-call callbacks required
graph.invoke(
    {"messages": [("user", "Hello")]},
    config={"configurable": {"thread_id": "demo-1"}},
)
```

Pass `channel` (e.g. `webchat`, `sms`) when LangGraph owns the session. If `thread_id` is omitted, Parlot mints one automatically. When used inside a LiveKit agent that already called LiveKit `parlotize()`, this nests GenAI spans under that session — see the [LangGraph guide](https://parlot.ai/docs/guides/langgraph).

## Configure

```bash
export PARLOT_ENDPOINT=https://ingest.parlot.ai
export PARLOT_API_KEY=<org-scoped-key>
```

Mint the API key in Parlot **Settings → API Keys**. Session logs and generative AI content capture are configured in Settings or via `parlotize(...)` kwargs — see the [LangGraph guide](https://parlot.ai/docs/guides/langgraph).

## Next

- [LangGraph guide](https://parlot.ai/docs/guides/langgraph)
- [Concepts](https://parlot.ai/docs/concepts)
- Example: [`examples/langgraph/minimal-agent/`](../../examples/langgraph/minimal-agent/)
