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
Commands
agtos start
Start the agtOS server. Spawns the server as a child process, monitors startup, and reports when the health endpoint is ready.
On first run, the CLI checks for configuration in this order:
- Encrypted credentials at
~/.agtos/credentials.json - Environment variables (
ANTHROPIC_API_KEY,OPENAI_API_KEY) .env.localin the current directory
agtos setup first.
Before starting, the CLI checks for port conflicts on all three ports (3000, 4100, 4102) and reports which process holds a conflicting port. Startup progress is displayed in real-time with per-service status:
agtos setup
Interactive first-run configuration wizard. Checks prerequisites, prompts for API keys, validates credentials against the actual provider API, configures model slots, and stores encrypted credentials.
- Node.js version check — requires 22+ (exits if older)
- Docker check — optional, shows running status
- Ollama check — optional, shows installed status
- Anthropic API key — prompts for
sk-ant-api03-...key from console.anthropic.com. Validates against the Anthropic API. Offers retry on failure. Press Enter to skip. - OpenAI API key — optional, prompts for
sk-...key from platform.openai.com. Validates against the OpenAI API. - Model slot configuration — configures the chat slot (required) with provider and model selection, plus an optional reasoning slot for complex tasks. Providers:
claude,openai,ollama. - Encrypt and store — saves credentials to
~/.agtos/credentials.json(AES-256-GCM encrypted) and slot configuration to~/.agtos/config.json. If plaintext API keys exist in.env.local, they are migrated to the encrypted store and removed. - Summary — shows configuration status and next steps
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. Each message has a 30-second timeout. Session continuity is automatic — the server assigns a session ID on the first message and the CLI reuses it for subsequent messages.
Responses show metadata: duration, reasoning steps (if > 1), and tool calls (if any). Errors don’t exit the loop — you can retry or continue chatting.
In-chat commands:
agtos schedule
Manage scheduled tasks.
agtos memory
Search and manage agent memory.
search subcommand queries the episodic and semantic memory system via GET /api/memory/search. Multi-word queries are supported — agtos memory search foo bar baz searches for "foo bar baz". Returns up to 20 results with relevance scores.
The import subcommand scans for available external AI tool memories and imports them. Supported sources: Claude Code, Cursor, Windsurf, Aider, and GitHub Copilot.
The maintain subcommand triggers an on-demand memory lint sweep via POST /api/memory/maintain. It prints a summary (conclusions examined, contradictions, stale, orphans, redundant, pruned, decayed, dangling sources) and exits with one of four codes:
The sweep can take 30-60 seconds on large knowledge bases; the CLI allows up to 120 seconds before timing out.
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 (60-second timeout). Multi-word topics are supported.
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.
✓ pass (green), ⚠ warn (yellow), or ✗ fail (red).
Checks performed:
The doctor finishes with a feature degradation summary showing which features are available based on the check results:
- Text chat: Requires AI provider credentials
- Voice: Requires speech models + AI provider
- Scheduling: Requires Redis
- Memory: Requires Redis
- Local AI routing: Requires Ollama
Environment Variables
What’s next
Device Registry
Manage ESP32, browser, and CLI devices with per-device authentication.
Troubleshooting
Common issues and solutions for setup, voice, memory, and connectivity.