Metadata-Version: 2.5
Name: parlot-instrumentation-langgraph
Version: 0.1.0
Summary: OTel instrumentation for LangGraph / LangChain agents
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

OpenTelemetry instrumentation for LangGraph / LangChain agents.

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

configure(agent_id="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"}},
)
```

If `thread_id` is not provided, Parlot mints one automatically (`anon-…`) so
contract spans still attach to a session.

Pass `channel` (e.g. `webchat`, `sms`) when LangGraph owns the session so
ingest does not assume voice. Optional `modality` overrides the default
derived from channel (`webchat`/`sms`/`whatsapp` → text, `voice` → voice).

Set `PARLOT_ENDPOINT` and `PARLOT_API_KEY`. Generative AI content capture
(message bodies / tool payloads; default on) is documented in
[Concepts](https://parlot.ai/docs/concepts#generative-ai-content-capture).
Override with `configure(capture_genai_content=False)`.

Session application logs (Python `logging`, default on) follow Settings → Logs /
`configure(capture_logs=…, log_level=…)`. Not `print()`. Treat content like stdout for PII.

When used inside a LiveKit voice agent that already called
`parlot.instrumentation.livekit.configure()`, this package nests GenAI
operational spans under the active LiveKit session and does **not** emit
duplicate `parlot.session` / `parlot.turn` spans — LiveKit owns channel and
modality.
