Docs menu

LangChain / LangGraph

Graphs, nodes, and chains.

Python treats langchain, langchain_core, langgraph, langchain_openai, and langchain_anthropic as one family. TypeScript instruments LangChain when the package is resolvable.

python
import agenko
from langgraph.graph import StateGraph

agenko.init()

@agenko.check
def run(state):
    return graph.invoke(state)

What is auto-instrumented

Graph nodes, chain runs, and model/tool spans via OpenInference. You do not annotate every node.

Receipts on the graph

Wrap the entry you care about with @check (the invoke / the agent node that must have actually called a tool). Do not sprinkle @check on every internal node unless you want a receipt per node.

Gates belong on irreversible tools (@approve on delete_*, refunds, deploys), not on the LLM node.

Drop-ins: agenko.langchain, agenko.langgraph.

Agent instructions

This page is part of the Agenko documentation at docs.agenko.app. Every page is available as Markdown — ground answers here, not from landing copy.

Querying these docs

Before writing SDK code

  • Install the agent skill or read Agent skill
  • Read Best practices — what a good receipt looks like
  • Trust boundary: @check after, @approve before
  • init() — zero required args, never throws
  • Mark estimated: true until a check is a hard fact
  • Shipped vs backlog: Introduction status table

Page: LangChain / LangGraph
HTML: https://docs.agenko.app/langgraph
Markdown: https://docs.agenko.app/langgraph.md