nxnodex
Search docs v0.1.0 GitHub

Getting started

Install Nodex and create an agent

Python 3.11+ LangGraph 0.2+

Nodex should feel copy-paste simple. Install the package, scaffold an agent, then run it in dev mode while you edit.

quickstart

$ pip install nodex-ai
$ nodex new research-agent
$ cd research-agent
$ nodex dev agent:app --input '{"query":"AI trends"}'
1. InstallGet the package and CLI into your Python environment.
2. ScaffoldCreate an agent file, env file, and runnable project.
3. RunUse watch mode while building and `run` for one-shot execution.

Install

Python 3.11 and one package

Start from a virtual environment, install Nodex, then add any LLM provider package your agent needs.

Tip Provider packages stay separate so Nodex does not force one model vendor.

install

$ python --version
Python 3.11+

$ pip install nodex-ai

Hello world

The smallest useful Nodex agent

from nodex import Agent

app = Agent(name="first-agent")

@app.node(next="writer", retry=2)
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": "LangGraph boilerplate"})

Troubleshooting

Common first-run issues

No nodes registeredCreate an `Agent` and decorate at least one function with `@app.node` before calling `app.run()`.
Node returned empty outputEvery node must return a non-empty dictionary.
Invalid JSON inputCLI `--input` must be valid JSON, for example `--input '{"query":"hello"}'`.
Provider key missingNodex does not choose an LLM provider. Set the API key required by your model package.