Getting started
Install Nodex and create an agent
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"}'
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 registered | Create an `Agent` and decorate at least one function with `@app.node` before calling `app.run()`. |
|---|---|
| Node returned empty output | Every node must return a non-empty dictionary. |
| Invalid JSON input | CLI `--input` must be valid JSON, for example `--input '{"query":"hello"}'`. |
| Provider key missing | Nodex does not choose an LLM provider. Set the API key required by your model package. |