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:
bash
naos create my-agent --template echoAvailable 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:
bash
naos create my-agent --source ./agents/custom.wasmAgent 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 pairsAgent Lifecycle
Created → Idle → Running → Stopped
↓
Failed → (restart by supervisor)Listing Agents
View all registered agents:
bash
naos statusDeleting Agents
Remove an agent (must be stopped first):
bash
naos stop my-agent
naos delete my-agent