LangGraph Integration
Map planner, tool, and synthesis steps to decorated functions so LangGraph execution can be visualized and estimated in Neurovn.
Install & Run
Install
Setuppip install langgraph langchainpip install neurovnRun
ExecuteNEUROVN_API_URL=https://agentic-flow.onrender.com python langgraph_app.pyArchitecture Flow
Planner
Planner node decides next action and routes to tool/agent branches.
Execution
Tool and model steps are traced as workflow edges with timing metadata.
Analysis
Neurovn computes graph type, critical path, and scenario estimates.
Implementation Snippets
Pattern
pythonfrom neurovn import trace@trace.agent(name="Planner", model="gpt-4o")def planner(state: dict) -> dict: return state@trace.tool(name="Retriever")def retrieve(query: str) -> str: return "docs"Troubleshooting
Wrap `app.invoke(...)` or `app.stream(...)` in `with trace.session(..., source="decorator", canvas_name="...")` so one LangGraph run becomes one named Neurovn canvas.
Track retry edges explicitly in your graph state to reflect loop behavior in estimates.
Use condition node routing metadata to keep branch-path estimates interpretable.
Set `expected_calls_per_run` for orchestrator-heavy agents where applicable.