Set up AgentOS in
four steps.
Stop overpaying for AI. Let the router cook. A token-efficient, microkernel AI agent for your CLI, Web UI, and chat channels. Install it, connect a model provider, start the gateway, open the console. This guide covers all of it.
- Default port
- 18791
- Web console
- /control/
- Providers
- 20+
- Python
- 3.12+
What is AgentOS? #
AgentOS is a microkernel Python agent runtime. A local model router (AgentOS Router) sends each turn to the cheapest model that can handle it, while persistent memory, a layered sandbox, built-in web search, and on-device embeddings round out a single shared turn loop. Every entry point (Web UI, CLI, and chat channels) runs through that same loop.
AgentOS Router
An on-device router scores each turn and routes it across tiers c0 to c3, so an easy turn never pays for a frontier model.
Unified gateway
One ASGI server with a WebSocket RPC transport and an embedded control console. CLI, browser, and channels share its turn loop.
Pluggable providers
Speaks to OpenRouter, Bankr, OpenAI, Anthropic, Ollama, DeepSeek, Gemini, DashScope and more behind one config.
Prerequisites #
Before you start, make sure your machine has the following. The install scripts handle the Python toolchain for you, but you will need these baseline pieces.
-
01
Python 3.12 or newer
AgentOS targets requires-python = ">=3.12". The Windows portable build bundles its own CPython, so you can skip this there.
-
02
An API key for one model provider
Cloud providers need a key. Local providers (Ollama, LM Studio) need no key, just a running model server. See step 3.
-
03
Git with LFS (source install only)
The AgentOS Router model files ship via Git LFS. Run git lfs install before cloning if you build from source.
Install AgentOS #
Three supported paths. The uv tool install route is recommended for most people. Pick the tab that matches your situation.
Install uv if you do not have it, then install the AgentOS release wheel as a tool.
# 1 - install uv (macOS / Linux) curl -LsSf https://astral.sh/uv/install.sh | sh # 2 - install AgentOS with the recommended extras (AgentOS Router) uv tool install --python 3.12 \ "use-agent-os[recommended] @ https://github.com/use-agent-os/agent-os/releases/download/v0.0.1/use_agent_os-0.0.1-py3-none-any.whl" # 3 - verify agentos --help
The recommended extra pulls in the local memory embedding stack (onnxruntime, numpy, tokenizers). For a leaner footprint, drop it and install the bare agentos wheel.
Clone the repo, pull the LFS model files, then run the install script for your OS.
git lfs install git clone https://github.com/use-agent-os/agent-os.git cd agent-os git lfs pull --include="src/agentos/memory/models/**" # macOS / Linux bash scripts/install_source.sh # Windows (PowerShell) # powershell -ExecutionPolicy Bypass -File ./scripts/install_source.ps1
Developing on AgentOS? Use uv sync --extra recommended --extra dev then uv run agentos --help.
No Python install required. The portable build bundles its own CPython.
- 1. Download AgentOS-windows-x64-portable.zip from the GitHub releases page.
- 2. Extract it anywhere on your drive.
- 3. Right-click Start AgentOS.cmd and run it as administrator.
Build the image yourself, then bring the stack up with the helper script.
docker build -t agentos:local . # macOS / Linux ./start.sh # Windows # ./start.ps1 → runs: docker compose up -d
There is no published image yet; you build agentos:local from the included Dockerfile.
Run the onboarding wizard #
The interactive wizard walks you through six sections in order. Provider and Router are the fast path; the rest are skippable and can be configured later from the Web UI.
# full interactive wizard agentos onboard # provider only - skip channels, search, image-gen agentos onboard --minimal # inspect every section without writing anything agentos onboard status
Choose the LLM provider and paste a key.
AgentOS Router on, or direct single-model.
Slack, Telegram, Discord, Matrix.
DuckDuckGo or Brave web search.
Wire an image model tier.
On-device or hosted embeddings.
Scripted setup
For CI or unattended installs, pass flags instead of using the prompts. Use --if-needed to make it idempotent.
export OPENROUTER_API_KEY="sk-..." agentos onboard --provider openrouter --api-key-env OPENROUTER_API_KEY agentos onboard --if-needed # safe to re-run
Pick a model provider #
These twelve providers appear in the first-run wizard. OpenRouter is the default and sorts first. Each cloud provider reads its key from the listed environment variable; local providers need no key at all.
| Provider | Env var / key | Default base URL |
|---|---|---|
| OpenRouter default | OPENROUTER_API_KEY | openrouter.ai/api/v1 |
| Bankr LLM Gateway | BANKR_API_KEY | llm.bankr.bot/v1 |
| OpenAI | OPENAI_API_KEY | api.openai.com/v1 |
| Anthropic | ANTHROPIC_API_KEY | api.anthropic.com |
| Ollama local | no key | localhost:11434 |
| DeepSeek | DEEPSEEK_API_KEY | api.deepseek.com |
| Google Gemini | GEMINI_API_KEY | generativelanguage.googleapis.com |
| Aliyun DashScope | DASHSCOPE_API_KEY | dashscope.aliyuncs.com |
| Moonshot AI | MOONSHOT_API_KEY | api.moonshot.ai/v1 |
| Zhipu (Z.AI) | ZAI_API_KEY | open.bigmodel.cn/api/paas/v4 |
| Baidu Qianfan | QIANFAN_API_KEY | qianfan.baidubce.com/v2 |
| Volcengine Ark | VOLCENGINE_API_KEY | ark.cn-beijing.volces.com/api/v3 |
Beyond these twelve, the registry also knows Mistral, Groq, SiliconFlow, MiniMax, Azure OpenAI, LM Studio, vLLM and more. Set any of them by hand with agentos configure provider.
Run the gateway #
The gateway is the heart of AgentOS. By default it binds to loopback only - 127.0.0.1:18791 - so nothing is exposed to your network.
Foreground
Runs in your terminal. Stop with Ctrl + C.
agentos gateway run
Background
Detaches and waits for a healthy readiness signal.
agentos gateway start --json agentos gateway status
Once it reports ready, open the console in your browser:
http://127.0.0.1:18791/control/
Binding beyond localhost
To reach the gateway from another machine, bind a public interface. Only do this behind a firewall and with auth enabled (see configuration).
agentos gateway run --listen 0.0.0.0 --port 18791
Prefer the terminal? Two no-browser entry points share the same loop:
# interactive REPL agentos chat # one-shot, scriptable agentos agent -m "summarize today's commits"
Inside the Web console #
The console at /control/ is a single-page app. The views below are client-side routes. For example /control/setup and /control/chat.
/control/chat
Run and resume sessions with streaming output, tool-call cards, and per-turn usage and savings.
/control/setup
First-run catalog. Provider and Router are the fast path; everything else lives in the Capability Center.
/control/approvals
Durable human-in-the-loop queue for approving or denying sensitive tool calls.
/control/health
Readiness at a glance: provider state, memory, sandbox posture, and recovery hints.
/control/cron
View and manage scheduled runs driven by the SchedulerEngine.
/control/logs
Inspect runtime logs and diagnostics output.
/control/channels
Check channel adapter status and jump to guided setup.
/control/usage
Token and estimated-cost rollups across sessions.
/control/skills
Browse available skills.
Configuration #
Config is TOML. AgentOS resolves it in this order. Environment variables for individual secrets always win over file values.
- 1AGENTOS_GATEWAY_CONFIG_PATHexplicit path
- 2./agentos.tomlcurrent directory
- 3~/.agentos/config.tomlglobal user config
- 4built-in defaults
A minimal agentos.toml looks like this:
[llm] provider = "openrouter" model = "deepseek/deepseek-v4-flash" base_url = "https://openrouter.ai/api/v1" # api_key is read from OPENROUTER_API_KEY [agentos_router] enabled = true auto_thinking = true default_tier = "c1" [agentos_router.tiers.c1] provider = "openrouter" model = "deepseek/deepseek-v4-pro" [memory] source = "workspace" # MEMORY.md + memory/*.md under the workspace [permissions] default_mode = "bypass" # off | on | bypass | full # [auth] # mode = "token" # none | token | password - enable before binding 0.0.0.0 # token = "your-long-random-token"
Where state lives
- Home~/.agentos
- State~/.agentos/state
- Workspace~/.agentos/workspace
- Media~/.agentos/media
Relocate the whole tree with AGENTOS_HOME.
Reconfigure a section
Change one part of the setup without re-running the whole wizard:
agentos configure provider agentos configure router agentos configure channels agentos configure search
Command reference #
The commands you will reach for most. Run agentos --help for the full set.
| agentos onboard | Interactive first-run wizard. |
| agentos doctor | Readiness check across provider, memory, sandbox. |
| agentos gateway run | Start the gateway in the foreground. |
| agentos gateway start | Start in the background and wait for ready. |
| agentos gateway stop | Stop the background gateway. |
| agentos chat | Interactive terminal REPL. |
| agentos agent -m "..." | One-shot, scriptable run. |
| agentos providers | List and inspect configured providers. |
| agentos configure ... | Reconfigure a single setup section. |
Troubleshooting #
The gateway starts but the console is blank. +
Make sure you opened the trailing-slash path: http://127.0.0.1:18791/control/. The console is a single-page app served from that mount; hitting /control without the slash can land you on a fallback.
agentos is not found after install. +
If you installed via uv tool install, ensure uv's tool bin directory is on your PATH - run uv tool update-shell and reopen your terminal.
The provider rejects my key. +
Confirm the environment variable name matches the one in the provider table exactly. Then run agentos doctor to surface which section is failing and why.
Local memory embedding is missing. +
On-device memory embedding needs the recommended extras. Reinstall with the agentos[recommended] wheel, and if you built from source, pull the LFS model files with git lfs pull --include="src/agentos/memory/models/**".
You are set up.
Start the gateway, open the console, and send your first turn. Run a readiness check any time things feel off.