agtos CLI provides a text-based interface for managing the agtOS system. It communicates with the running server via the REST API on the health port (default 4102).
Installation
Global Options
| Flag | Description |
|---|---|
--help, -h | Show help message |
--version, -v | Show version |
--api-url <url> | Override API base URL (default: http://localhost:4102) |
Commands
agtos start
Start the agtOS server. Spawns the server as a child process, monitors startup, and reports when the health endpoint is ready.
.env.local or ~/.agtos/config.json found), the CLI will prompt you to run agtos setup first.
The server starts three listeners:
- Port 3000: Voice WebSocket
- Port 4100: MCP Server (Streamable HTTP)
- Port 4102: Health + REST API + Dashboard
agtos setup
Interactive first-run configuration wizard. Checks prerequisites, prompts for API keys, validates credentials against the actual provider API, and writes .env.local.
- Node.js version check — requires 22+
- Docker check — optional, needed for Redis
- Ollama check — optional, enables local AI routing
- Claude API key prompt — validates
sk-ant-api03-keys against the API - Claude OAuth token prompt — validates
sk-ant-oat01-tokens - OpenAI key prompt — optional, for OpenAI-compatible providers
- Write
.env.local— saves validated credentials
agtos status
Display system health and service status. Fetches data from the health and system info API endpoints.
- Overall system health (healthy/degraded)
- Per-service status (Redis, STT, TTS, Ollama, Claude, MCP)
- Uptime, Node.js version, memory usage
- Port configuration
agtos chat
Interactive text chat with the agtOS agent. Uses the same agent reasoning loop as the voice pipeline.
POST /api/chat and displays responses in the terminal.
agtos schedule
Manage scheduled tasks.
| Argument | Description |
|---|---|
name | Human-readable task name |
type | Schedule type: cron, once, interval |
expression | Cron expression, timestamp, or interval in ms |
topic | Event bus topic to publish when the task fires |
agtos memory
Search and manage agent memory.
search subcommand queries the episodic and semantic memory system via GET /api/memory/search.
The import subcommand scans for memories from external AI tools and imports them into agtOS via GET /api/memory/sources and POST /api/memory/import.
agtos task
Run a background agent task. The task is processed through the same agent reasoning loop as chat, but designed for longer-running workloads.
agtos models
Manage sherpa-onnx ONNX model files for the local voice pipeline. This command operates directly on the local filesystem and does not require the server to be running.
silero-vad— Voice Activity Detectionmoonshine-tiny-en-int8— Fast English STTsensevoice-int8— Multilingual STT (zh, en, ja, ko)kokoro-int8-multi-v1— TTS (Kokoro)zipformer-streaming-en-20m— Streaming STT for real-time partial results
~/.agtos/models/ (configurable via AGTOS_MODEL_DIR).
agtos doctor
System health diagnostics. Checks all dependencies and reports pass/warn/fail status with actionable remediation hints.
- Node.js — version 22+ required
- Redis — connection test
- Ollama — reachability check
- sherpa-onnx models — download status
- Config file — existence and validity
- Voice port (3000) — availability
- Health endpoint (4102) — responsiveness
- MCP port (4100) — availability
- Credentials — validates API keys against provider APIs
- Network — basic connectivity check
Environment Variables
| Variable | Default | Description |
|---|---|---|
AGTOS_API_URL | http://localhost:4102 | API base URL for CLI commands |
HEALTH_PORT | 4102 | Health server port (used to construct default API URL) |