LangGraph
LangGraph is LangChain’s graph-based framework for building stateful, multi-actor agents. Neens ingests its traces through standard OpenTelemetry with zero Neens-specific code — you point an OTLP exporter at Neens and instrument LangChain once at startup.
At a glance
| Language | Python |
| Instrumentation | openinference-instrumentation-langchain (OpenInference LangChain instrumentor — community-maintained by Arize) |
| Endpoint | POST /v1/traces (OTLP/HTTP) |
| Auth | Authorization: Bearer nk_live_… agent key |
Instrument your agent
Install the instrumentation
LangGraph runs on LangChain, so the OpenInference LangChain instrumentor captures LangGraph spans automatically.
pip install openinference-instrumentation-langchain opentelemetry-sdk opentelemetry-exporter-otlpPoint the exporter at Neens
from openinference.instrumentation.langchain import LangChainInstrumentor
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
exporter = OTLPSpanExporter(
endpoint="https://<your-neens-host>/v1/traces",
headers={"Authorization": "Bearer nk_live_your_key_here"},
)
provider = TracerProvider()
provider.add_span_processor(BatchSpanProcessor(exporter))
trace.set_tracer_provider(provider)
# Instrument once, before you build or invoke your graph.
LangChainInstrumentor().instrument()Run your agent
Run your LangGraph app as usual — invoke or stream your compiled graph. Spans export to Neens in the background.
What Neens captures
The instrumentor emits spans for each LLM call (model, token counts, prompt/response messages), every tool call, and the graph’s node and chain spans — so you see the full agent trajectory. For multi-turn agents, set a conversation/session id on your runs so Neens groups them into one session (see Traces & sessions).
Name your final answer in the graph state. OpenInference maps every LangGraph node and graph to a chain span, whose payload is state, not dialogue. Neens reads a chain span as a conversational turn only when the state names its content — the user’s question under message/query/question/prompt, and the final reply under answer/final_answer/final_output (among others). If your last node returns a bare string or an unrecognized key, the Conversation tab shows the question and no reply — and the same derivation is what a golden dataset item and a pre-prod baseline record. See Conversation transcript.
Neens speaks standard OTLP — this is not a Neens SDK fork. Any OpenTelemetry-instrumented LangGraph app exports to Neens by pointing its exporter at the endpoint above. See Send traces for the full attribute reference, size limits, and response codes.
Verify
Open Traces in Neens; your LangGraph runs appear within a few seconds. Continue to Traces & sessions.