Build your Next Agent faster.

Follow the shortest path from install to a running workflow.

01

Install NxAgent

Create a virtual environment, then install the package into your project.

python -m venv .venv source .venv/bin/activate pip install nx-agent
02

Create an agent

Start with one focused worker. Give it a role and goal that describe the output you want.

from nx_agent import Agent agent = Agent( role="Researcher", goal="Answer clearly in one paragraph", ) result = agent.run("What is NxAgent?") print(result)
03

Attach a tool

Decorate a normal Python function with @tool. Type hints and docstrings become the tool schema.

from nx_agent import Agent, tool @tool def web_search(query: str) -> str: """Search the web for current information.""" ... # your implementation researcher = Agent( role="Research Analyst", goal="Find accurate source material", tools=[web_search], )
04

Grow into a workflow

Add another agent when the job naturally splits into stages, such as research and writing.

from nx_agent import Agent, Workflow, tool @tool def web_search(query: str) -> str: """Search the web for current information.""" ... # your implementation researcher = Agent( role="Research Analyst", goal="Collect accurate source material", tools=[web_search], ) writer = Agent( role="Technical Writer", goal="Turn findings into a clear brief", ) workflow = Workflow(agents=[researcher, writer])
05

Run and inspect output

Run the workflow with a plain task. Use the result object to read final output and inspect traceable steps.

result = workflow.run("Create a short brief on agent observability.") print(result.output) print(result.steps)

Where to go next

Once the first run works, move into the docs for configuration, streaming, tool design, and multi-agent workflow patterns.

NextUse it for
Tool designTyped arguments, docstrings, and clean return values.
WorkflowsSequential, parallel, and dynamic multi-agent patterns.
ConfigurationModel providers, API keys, logging, and tracing.
API referenceThe core public objects: Agent, Workflow, and @tool.