Local-first agentic trading AI agent with on-device Pilot Router
pip install use-agent-os==2026.10.30 Copy PIP instructions
Local-first agentic trading, minimum tokens. An AI agent with native agentic trading that runs on your own machine, across CLI, Web UI, and chat channels. An on-device Pilot Router classifies each task locally and routes it to the cheapest capable model.
AgentOS is an AI agent. It saves tokens, so it costs less to run. It has a small core. A local Pilot Router picks the cheapest model that can do each job. AgentOS also has memory that stays after you close it, a safe sandbox with many layers, built-in web search, and on-device embeddings.
You can use AgentOS from the AgentOS App on your desktop, the Web UI, the CLI, or chat apps. All of them use the same core loop. This means tool calls, retries, and logs work the same way everywhere. AgentOS can talk to many AI providers. By default it uses OpenRouter. It can also use the Bankr LLM Gateway, OpenCAP, Surplus Intelligence, OpenAI, Anthropic, Ollama, DeepSeek, Gemini, Qwen/DashScope, and 20+ other providers. You do not need to change your code or config to switch providers.
AgentOS 2026.10.30 is the current release. The project website is useagentos.dev. Follow @useAgentOS on X for updates.
For step-by-step guides, start with the AgentOS Product Guide or the documentation index. You can find past releases in CHANGELOG.md and RELEASES.md.
AgentOS App is the native desktop app for macOS. It is the easiest way to run AgentOS: download it, open it, and it installs the engine and starts the gateway for you. Signed builds for Apple silicon and Intel are published on every release.
Each release page lists the app builds next to the Windows portable zip and the Python wheel: AgentOS- -arm64.dmg for Apple silicon and AgentOS- .dmg for Intel. See AgentOS for Mac for install steps, docs/desktop-app.md for a tour of the app, and desktop/README.md for how the app is built.
Every client — the AgentOS App, the Web UI, the CLI, and the chat channels — talks to one local gateway. This gateway handles sessions, approvals, and scheduling. It sends each turn to the Pilot Router, which picks the model. Then it runs tool calls inside the safe sandbox.
Here is what happens to one message: it comes in through a channel, goes through the gateway into the shared turn loop, gets sent to the cheapest model that can handle it, runs any tools in the sandbox, and the reply goes back the same way:
AgentOS works on Windows, macOS, and Linux. Pick the option that fits what you need.
Windows portable and Quick terminal install give you a ready-made release. You do not need Git for these. The other two — Install from source and Develop from source — need a Git checkout (git clone + Git LFS).
Release installs use files from GitHub releases. The Windows portable zip also has a short link at /releases/latest/download/ for the newest release. Python wheel installs use file names with version numbers, because the installer checks the version in the file name.
The default recommended profile installs Pilot Router — AgentOS's own on-device model router (strategy pilot-v1) — along with the Python dependencies it needs (ONNX Runtime, NumPy, Tokenizers). Its model bundle ships inside the wheel, so routing works offline with no extra download. If you install from a source checkout, run git lfs pull first; without it the bundle is only pointer stubs, and the router degrades gracefully — it logs a warning at boot and pins every turn to the default tier (c1) rather than crashing. The llm_judge strategy needs no local model files at all (it routes via a small LLM call, optionally against a local Ollama/LM Studio endpoint) — pick it during onboarding or set agentos_router.strategy = "llm_judge". Set AGENTOS_INSTALL_PROFILE=core to skip the router dependencies, or use the --router disabled flag during first-time setup to keep them installed but turn the router off.
On Windows, Pilot Router needs the Visual C++ runtime too (it comes with the ONNX engine inside Pilot Router). The Windows portable launcher and the from-source PowerShell installer install this runtime for you, using winget. The Quick terminal install (uv tool install) does not do this step. If you see a DLL load failed error in the logs, install it by hand (see Troubleshooting). AgentOS still works without it — it just routes every turn to one single model instead.
The desktop app for macOS 13 or newer, Apple silicon and Intel. It is signed with a Developer ID and notarized, so it opens without any Gatekeeper workaround.
This is the fastest way to start on Windows. The zip file has its own copy of Python inside, so you don't need to install Python yourself.
You can set an OpenRouter key before the first start:
$env:OPENROUTER_API_KEY="sk-..." Set-ExecutionPolicy -Scope Process Bypass .\start.ps1 If OPENROUTER_API_KEY is set and there is no config file yet, the launcher writes a config that points to this key. Then it starts the gateway right away, with no questions asked. If the key is not set, the setup wizard asks you to pick a provider.
The portable zip does not add a global agentos command to your system. If you want a terminal where agentos … works, run AgentOS Shell.cmd. Or call the launcher directly, like this:
.\agentos.cmd onboard --provider openrouter --api-key-env OPENROUTER_API_KEY Quick terminal install This is the best path for Windows, macOS, and Linux. uv installs AgentOS in its own space and manages its own Python. You do not need Python on your system already. This path only installs official releases. If you want main, other branches, or a local checkout, use Install from source instead.
1. Install uv. Skip this if uv --version already works for you.
curl -LsSf https://astral.sh/uv/install.sh | sh . "$HOME/.local/bin/env" Windows PowerShell:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex" $env:Path = "$env:USERPROFILE\.local\bin;" + $env:Path 2. Install AgentOS. This command is the same on every system.
uv tool install --python 3.12 "use-agent-os[recommended]" This installs the latest AgentOS release from PyPI. Then uv downloads whatever else that install needs. The default recommended extra brings in local memory embedding's tools, like ONNX Runtime, NumPy, and tokenizers. So the first install needs internet access, unless these files are already saved on your computer.
agentos onboard agentos gateway run For an install pinned to one exact version, add == — for example uv tool install --python 3.12 "use-agent-os[recommended]==2026.10.30" — or use the GitHub release wheel link directly: https://github.com/use-agent-os/agent-os/releases/download/v2026.10.30/use_agent_os-2026.10.30-py3-none-any.whl.
The primary path is the built-in command, which detects how AgentOS was installed, upgrades it, and — crucially — restarts the managed gateway so it runs the new code (a "successful" upgrade that leaves the daemon on old code is the #1 documented upgrade regret):
agentos upgrade On a uv tool or pipx install this installs the published PyPI release of use-agent-os[recommended] for you (uv tool install --force --python …), then restarts the managed gateway and verifies the running gateway reports the new version before printing Gateway: restarted and verified ( ). It prints the old → new versions on success.
agentos upgrade always installs the release, never a local checkout — the PyPI wheel ships a control UI built in CI, while reinstalling a checkout would re-package whatever browser bundle happens to be on disk. If you installed from source, run bash scripts/install_source.sh again instead; it rebuilds the control UI first. The command says so when it detects a checkout-backed install.
For a plain-pip, Windows portable, editable, or unclassifiable install, agentos upgrade will not fake it — it prints the exact manual command and exits non-zero. Run it yourself (the portable venv has no pip, so its command restores it with python -m ensurepip first):
# pip install python -m pip install --user --upgrade "use-agent-os[recommended]" # install from source cd agent-os git pull git lfs pull --include="src/agentos/memory/models/**" git lfs pull --include="src/agentos/agentos_router/models/**" bash scripts/install_source.sh # Windows: scripts/install_source.ps1 Version skew. Commands that talk to the gateway compare the CLI and gateway versions once per run. A gateway running an older version than the CLI (the normal state right after a package upgrade, before a restart) prints a warning but never blocks. A gateway running a newer version than the CLI (you downgraded the CLI, or are driving a newer gateway from a stale environment) is refused — a newer gateway may have written config with a newer schema, so acting on it from an older CLI risks corruption. Fix it by upgrading the CLI or restarting the gateway from this environment; in an emergency, set AGENTOS_ALLOW_VERSION_SKEW=1 to override.
Update notices. On gateway-connected commands the CLI checks PyPI at most once every 24h and, if a newer release exists, prints a one-line notice on stderr. It is suppressed on non-interactive / CI runs, and you can turn it off entirely with updates.notify = false (see docs/configuration.md or the setup UI's Finish step).
Config & data are safe. Your configuration and data in ~/.agentos/ are not touched by upgrades. Config migrations run at gateway start and write a timestamped backup before rewriting any file. A version-pinned install (== ) stays on its pin — to move it, re-run the install command with the new version. To check the installed version, run agentos gateway status (shows both the CLI and running-gateway versions) or uv tool list.
Use this path to run AgentOS from a Git checkout, without changing the code. The checkout is just the source the installer reads from. After install, use the agentos command — do not use uv run. If you plan to change the code, use Develop from source instead.
Source installs build the bundled Control UI and therefore require Node.js 22 or newer in addition to Python 3.12+, Git, Git LFS, and uv.
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/**" git lfs pull --include="src/agentos/agentos_router/models/**" Run the installer
bash scripts/install_source.sh Windows PowerShell
powershell -ExecutionPolicy Bypass -File ./scripts/install_source.ps1 This script first builds and verifies the React Control UI, then installs .[recommended] (Pilot Router + memory + local models). It uses uv tool install, in its own environment. If uv is not there, it falls back to python -m pip install --user. If agentos is not found after install, open a new terminal.
(optional) Install extra features. Telegram, Slack, and Discord already work with the base install. The remaining opt-in extra is document-extras, which adds PDF generation through WeasyPrint.
AGENTOS_INSTALL_EXTRAS=document-extras bash scripts/install_source.sh # macOS / Linux powershell -ExecutionPolicy Bypass -File ./scripts/install_source.ps1 -Extras document-extras # Windows Set up and run — see Configuration.
Install Git, Git LFS, Node.js 22+, and uv from a terminal
winget install --id Git.Git -e winget install --id GitHub.GitLFS -e powershell -ExecutionPolicy Bypass -c "irm https://astral.sh/uv/install.ps1 | iex" git lfs install macOS (Homebrew):
brew install git git-lfs uv git lfs install Debian / Ubuntu:
sudo apt update && sudo apt install -y git git-lfs curl -LsSf https://astral.sh/uv/install.sh | sh git lfs install On Fedora, use sudo dnf install -y git git-lfs. On Arch, use sudo pacman -S --needed git git-lfs. Then install uv with the curl command above. After running these installers, PATH changes only apply in new terminal windows.
Installer environment variables and PATH checks
AGENTOS_INSTALL_PROFILE=core bash scripts/install_source.sh # small install, no Pilot Router AGENTOS_INSTALL_DRY_RUN=1 bash scripts/install_source.sh # just show the plan, don't install To check which agentos your shell is using, run command -v agentos (macOS/Linux) or where.exe agentos (Windows). If it is not on your PATH, run uv tool update-shell. If you reinstall from a local checkout, restart the gateway so it uses the new files.
Use this path when you want to change AgentOS's code: writing changes, running tests, or checking behavior in this checkout. This is not the normal way to install AgentOS. Unlike Install from source, this path needs uv: uv sync builds a .venv folder inside the repo, and uv run runs commands using the files in this checkout.
uv sync --extra recommended --extra dev python scripts/build_control_ui.py build uv run agentos --help The recommended extra also brings Pilot Router here. The dev extra adds the test, lint, and type-check tools. The build command uses Node.js 22+ to produce and verify the React Control UI served by the local gateway. To add more extras to this same setup:
agentos onboard is the wizard you run the first time. It writes your config file. It keeps provider secret keys as environment variables, if you pass --api-key-env. The router is set to recommended by default (this means Pilot Router, on the providers it supports). Pass --router disabled if you want one single model with no routing.
agentos onboard # full interactive wizard agentos onboard --if-needed # safe to run again; does nothing if already set up agentos onboard --minimal # only sets the provider; skips channels and search agentos onboard status # shows every setup section, but changes nothing If you are using SSH, CI, or any place without a normal terminal screen, use the non-interactive form. Keep the secret key as an environment variable, and pass its name — not the key itself:
export OPENROUTER_API_KEY="sk-..." agentos onboard --provider openrouter --api-key-env OPENROUTER_API_KEY Windows PowerShell
$env:OPENROUTER_API_KEY="sk-..." agentos onboard --provider openrouter --api-key-env OPENROUTER_API_KEY OpenRouter is just one example — you can use any supported provider and its own API key variable instead.
You can change one part of the setup later, without doing the whole wizard again. (These examples assume you already have the API key set as an environment variable.)
agentos configure provider --provider openai --model gpt-4o --api-key-env OPENAI_API_KEY agentos configure router --router recommended agentos configure search --search-provider brave --api-key-env BRAVE_SEARCH_API_KEY agentos configure channels Sections: provider, router, channels, search, image-generation, memory-embedding. The Web UI shows the same options at /control/setup. Provider and Router are the two main ones to set up first. Channels, Search, Image generation, and Memory embedding are in the Capability Center — you can set these up later. If you leave channels empty, that's fine — it just means you chose not to use them.
Config file order: AgentOS checks these one after another, and uses the first one it finds: AGENTOS_GATEWAY_CONFIG_PATH → ./agentos.toml → ~/.agentos/config.toml → its own built-in defaults. But secret values set as environment variables always win over anything in a file.
If you already have data in ~/.openclaw or ~/.hermes, run a dry run first. This shows you a report without changing anything. Then run it again to actually apply the changes:
agentos migrate openclaw --json agentos migrate openclaw --apply agentos migrate hermes --json agentos migrate hermes --apply Use agentos migrate --source openclaw,hermes --apply to bring in data from both at once. Only add --migrate-secrets after you have checked the dry-run report. See MIGRATION.md for custom paths and how conflicts are handled.
agentos gateway run # runs in this terminal, at 127.0.0.1:18791 agentos gateway start --json # runs in the background, waits until healthy agentos chat # opens an interactive chat in your terminal agentos agent -m "your prompt" # runs one task and stops; good for scripts Open the Web UI at http://127.0.0.1:18791/control/. The Health page shows if AgentOS is ready, what is not ready yet, and what to do next. From the CLI, you can run:
agentos doctor agentos doctor --json agentos doctor --config ./agentos.toml --json /health and /healthz are simple checks — they just say if the process is alive. agentos doctor and the Web UI Health page check much more: your provider setup, memory, logs, search, channels, sandbox safety, router, image generation, and how to fix problems. Press Ctrl+C to stop a gateway that is running in your terminal.
Other command groups include sessions, skills, memory, migrate, cron, channels, providers, models, and cost. Run agentos --help or agentos --help to see more.
Saving a channel's settings does not mean it is actually connected and working. After you change channel settings, restart the gateway. Then check the real, live status:
agentos gateway restart agentos channels status --json Only treat a channel as connected when the status shows enabled=true, configured=true, and connected=true. Discord uses websocket mode by default, Telegram uses polling, and Slack can use Socket Mode — none of these need a public URL. Telegram webhook mode and Slack webhook mode do need a public URL that the provider can reach.
To open the Web UI from another computer, bind the gateway to all network interfaces, and use this computer's public IP address:
agentos gateway run --listen 0.0.0.0 --port 18791 To let other computers in, you also need to open this port in your firewall or cloud security settings. Do not run the gateway with [auth] mode = "none" while doing this — set up token login first, before you bind to 0.0.0.0.
The Docker Compose setup runs an agentos:local image that you build yourself. Build it from a source checkout, after pulling the Git LFS embedding-model files (see Install from source for the clone and git lfs pull steps):
docker build -t agentos:local . ./start.sh (or start.ps1 on Windows) then runs docker compose up -d and shows the gateway logs. Docker means you don't need Python installed on your computer — but you still need to build the image locally first.
Provider tiers, sandbox settings, image generation, and concurrency settings are all in agentos.toml.example.
If the startup log shows DLL load failed while importing onnxruntime_pybind11_state, AgentOS still works — but the built-in local memory embedding (the on-device ONNX model) stays off and memory falls back to keyword search until you install the Visual C++ Redistributable for Visual Studio 2015–2022 (x64).
The Windows portable launcher and the from-source PowerShell installer both try to install this for you, using winget. If you used Quick terminal install, or if winget is not available on your computer, install it yourself and then restart PowerShell: https://aka.ms/vs/17/release/vc_redist.x64.exe. After that, restart the gateway:
agentos gateway restart Credits AgentOS is built on OpenSquilla (Apache-2.0) and influenced by OpenClaw and Hermes Agent. Other tools and code used inside AgentOS are credited in THIRD_PARTY_NOTICES.md and the root NOTICE file.
We welcome all kinds of help — bug reports, new ideas, better docs, new provider or channel support, new skills, and core code work. See CONTRIBUTING.md, then open an issue or pull request on GitHub.
Code of Conduct · Security · Support · License (Apache-2.0)
All 2 files in this release have provenance metadata.
dev document-extras mem0 memory ml-router recommended
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.
All 2 files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




