Decorator-first nodes
Register graph steps with @app.node. Routing, retries, and timeouts live right on the decorator — no separate edge wiring.
Version 0.1.0
Fast, minimal, decorator-first LangGraph agents. Nodex gives Python agent builders the same kind of obvious starting path that Express gave Node developers.
terminal
$ pip install nodex-ai
$ nodex new my-agent
$ cd my-agent
$ nodex dev agent:app
from nodex import Agent
app = Agent(name="hello-agent")
@app.node(next="writer")
def research(state):
return {"notes": f"Research: {state.get('query')}"}
@app.node(next="end")
def writer(state):
return {"final": state.get("notes").upper()}
app.run({"query": "agent frameworks"})
Why Nodex
Nodex does not replace LangGraph. It removes the boilerplate around it so you can focus on agent logic, not wiring.
Register graph steps with @app.node. Routing, retries, and timeouts live right on the decorator — no separate edge wiring.
Attach logging, auth checks, metrics, and shared policy once with @app.middleware. Middleware runs in registration order, wrapping every node.
Set retry=2 and on_fail="fallback" directly on the decorator. No extra exception handlers, no global policy files.
Use @app.route(condition, if_true, if_false) to branch the graph on state without building a custom router function.
Every run prints a coloured summary: node name, status, duration, token usage, and cost. No extra setup required.
Test individual nodes in isolation with test_node() and assert_node_output() — no mock graph needed.