nxnodex
Search docsv0.1.0GitHub

Guide

Core concepts

Nodex is a thin developer-experience layer over LangGraph. You still model work as nodes and state, but Nodex handles the repetitive registration, tracing, middleware, and failure wiring.

Nodes

Decorator-first graph nodes with explicit next steps.

State

Dict-like state wrapped by Nodex for validation and tracing.

Middleware

One reusable chain for logging, auth, metrics, and policies.

Retries

Node-level retry and fallback behavior for production agents.

Nodes

Write graph steps as Python functions

Each node receives state and returns a non-empty dictionary of updates.

@app.node(next="writer", retry=2)
def research(state):
    return {"notes": "LangGraph without boilerplate"}

State

Pass data through the graph

State exposes get, set, and update while protecting internal execution fields.

Retries

Keep retry behavior near the node

Use `retry` for transient failures and `on_fail` for fallback nodes.

@app.node(next="writer", retry=2, on_fail="fallback_research")
def research(state):
    return {"notes": call_model(state.get("query"))}

@app.node(next="writer")
def fallback_research(state):
    return {"notes": "fallback notes"}

Human review

Pause before continuing

Set `human_review=True` on a node to ask for terminal approval before the graph moves to the next node.