AgentOS
Install
Getting started

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.

Step 01

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.

Step 02

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
01Providerrequired

Choose the LLM provider and paste a key.

02Routerrequired

AgentOS Router on, or direct single-model.

03Channelsoptional

Slack, Telegram, Discord, Matrix.

04Searchoptional

DuckDuckGo or Brave web search.

05Image generationoptional

Wire an image model tier.

06Memory embeddingoptional

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
Step 03

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 GatewayBANKR_API_KEYllm.bankr.bot/v1
OpenAIOPENAI_API_KEYapi.openai.com/v1
AnthropicANTHROPIC_API_KEYapi.anthropic.com
Ollama localno keylocalhost:11434
DeepSeekDEEPSEEK_API_KEYapi.deepseek.com
Google GeminiGEMINI_API_KEYgenerativelanguage.googleapis.com
Aliyun DashScopeDASHSCOPE_API_KEYdashscope.aliyuncs.com
Moonshot AIMOONSHOT_API_KEYapi.moonshot.ai/v1
Zhipu (Z.AI)ZAI_API_KEYopen.bigmodel.cn/api/paas/v4
Baidu QianfanQIANFAN_API_KEYqianfan.baidubce.com/v2
Volcengine ArkVOLCENGINE_API_KEYark.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.

Step 04

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"
Step 05

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.

Step 06

Configuration #

Config is TOML. AgentOS resolves it in this order. Environment variables for individual secrets always win over file values.

  1. 1AGENTOS_GATEWAY_CONFIG_PATHexplicit path
  2. 2./agentos.tomlcurrent directory
  3. 3~/.agentos/config.tomlglobal user config
  4. 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 onboardInteractive first-run wizard.
agentos doctorReadiness check across provider, memory, sandbox.
agentos gateway runStart the gateway in the foreground.
agentos gateway startStart in the background and wait for ready.
agentos gateway stopStop the background gateway.
agentos chatInteractive terminal REPL.
agentos agent -m "..."One-shot, scriptable run.
agentos providersList 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.