Back to Blog
Nexus OS terminal showing naos CLI commands
Tutorialgetting-startedclitutorial

Tutorial: Building Your First AI Agent with Nexus OS

Leonidas Esquire WilliamsonApril 12, 20265 min read

Prerequisites

Before we begin, make sure you have:

  • Rust toolchain installed (rustup)
  • An API key for your preferred LLM provider
  • 10 minutes of free time

Step 1: Install the CLI

cargo install naos

Verify the installation:

naos --version
# naos 0.1.0

Step 2: Initialize a Project

naos init my-first-agents
cd my-first-agents

This creates the project structure with a nexus.config.yaml file, an SQLite database, and an example agent.

Step 3: Create an Agent

naos create researcher --template research

The research template comes pre-configured with web browsing capabilities and a summarization skill.

Step 4: Configure Cost Controls

Open nexus.config.yaml and add a budget:

cost:
  researcher:
    budget: $5/day
    alert_at: 80%
    action: throttle

This ensures your agent won't exceed $5/day in LLM token costs. At 80% usage, you'll get an alert. At 100%, the agent throttles to lower-cost models.

Step 5: Run the Agent

naos run researcher

Step 6: Monitor with the Dashboard

naos dashboard --open

Navigate to http://localhost:4200 to see your agent's status, cost tracking, and audit trail in real time.

What's Next?

  • Add a supervisor: naos deploy researcher --supervisor one-for-one
  • Install a WASM skill: naos marketplace install json-parser
  • Deploy to the edge: naos edge deploy researcher

Check the full documentation for advanced configuration options.