Creating Agents
Agents are the fundamental unit of work in Nexus OS. Each agent is an isolated process that can be started, stopped, monitored, and orchestrated.
Create from Template
The fastest way to create an agent is from a built-in template:
naos create my-agent --template echo
Available Templates
| Template | Description |
|---|---|
echo |
Simple echo agent that mirrors input |
http |
HTTP request handler agent |
cron |
Scheduled task agent |
pipeline |
Data processing pipeline agent |
Create from Source
Point to a custom WASM binary:
naos create my-agent --source ./agents/custom.wasm
Agent Structure
Each agent gets a record in the embedded database with:
AGENT RECORD
├── name unique identifier
├── source path to WASM binary or template name
├── status idle | running | stopped | failed
├── created_at timestamp
└── metadata JSON key-value pairs
Agent Lifecycle
Created → Idle → Running → Stopped
↓
Failed → (restart by supervisor)
Listing Agents
View all registered agents:
naos status
Deleting Agents
Remove an agent (must be stopped first):
naos stop my-agent
naos delete my-agent