Cross-platform desktop assistant. Runs on Windows and macOS from the same source tree, with a Python/FastAPI backend and an Electron overlay.
| Minimum | Notes | |
|---|---|---|
| Python | 3.10+ | 3.12 recommended |
| Node.js | 18+ | ships npm |
| RAM | 4 GB free | Whisper + Kokoro models load at startup |
| Disk | ~2 GB | mostly Chromium + ML models |
An LLM provider is also required — either a Groq API key (free tier, fast, recommended) or a local Ollama install.
Double-click tars.bat, or from a terminal:
tars.bat
chmod +x tars.command # first time only
./tars.commandThen double-click tars.command in Finder from then on.
A
.batfile cannot run on macOS.tars.batandtars.commandare the two platform entry points; both delegate toscripts/launch.py, so behaviour is identical on either OS.
The launcher creates .venv, installs Python and npm dependencies, downloads
Chromium, builds the frontend, starts the backend, waits for it to become
healthy, then opens the overlay. First run takes several minutes; later runs
start in seconds.
tars.bat --dev # Vite + Electron with hot reload
tars.bat --setup # install and build, then exit
tars.bat --backend # backend only (overlay elsewhere)
tars.bat --reinstall # force dependency reinstall
Edit Backend/.env (created automatically on first run).
Groq — fastest, but watch the free-tier budget. Key at https://console.groq.com/keys:
LLM_PROVIDER=groq
LLM_MODEL=llama-3.3-70b-versatile
GROQ_API_KEY=gsk_...Token budget matters more than you'd expect. Every request ships the full tool schema (~1,800 tokens) plus the system prompt (~400), so an agent turn costs ~2,200 tokens before the conversation. Groq's free tier allows 100,000 tokens per day, per model — roughly 40 requests/day, and a multi-step task spends several. When it runs out you get a clear "daily token limit reached" message in the overlay.
The daily cap is per model, so switching
LLM_MODELtollama-3.1-8b-instantgives a fresh budget (and is much cheaper per call, though weaker at multi-step tool use). For genuinely unlimited use, run Ollama below.
Ollama — fully local, no key, no cloud. Tool calling needs a model that supports it:
LLM_PROVIDER=ollama
LLM_MODEL=llama3.1:8b
OLLAMA_BASE_URL=http://localhost:11434The key currently in
Backend/.envis marked as burned in a comment. Rotate it before relying on this.
| Trigger | Action |
|---|---|
| "Hey TARS" | Wake by voice — no hands, no shortcut |
Alt+Space |
Command bar (type) |
Shift+Alt+Space |
Voice input directly |
Esc |
Dismiss — or deny a pending confirmation |
TARS lives in the system tray / menu bar. Closing the window hides it; quit from the tray menu.
Typing (Alt+Space). A single command bar appears. Ask something and the
same bar grows downward into the reply — one continuous object, never a swap.
Activity chips show each tool as it runs. ↑/↓ walk your history.
Voice ("Hey TARS"). A slim island appears at the top-center of the screen and TARS answers out loud. It has three visual states:
| State | Reads |
|---|---|
| Listening | white bars driven by your live microphone |
| Thinking | amber, orbiting halo while the agent works |
| Speaking | blue bars driven by the actual audio being played |
The bars are wired to real AnalyserNode data, not a looping animation — they
go flat when you stop talking, which is how you can tell it is genuinely
hearing you. A live caption under the island echoes what it heard and what it
is saying.
Say "Hey TARS, open YouTube" in one breath and it skips the greeting and acts immediately. Say just "Hey TARS" and it answers, then listens.
The wake phrase requires a greeting prefix ("hey", "ok", "hi", "yo") in front of a TARS-like word. That is deliberate: matching bare "tars" fired constantly on ordinary speech containing "start", "cars", or "stars". Common mishearings ("tarts", "czars", "stars") are all accepted after a prefix.
Wake-word detection runs entirely on your machine: the overlay records short voice-activity-gated clips and transcribes them with the faster-whisper model the backend already loads. No audio leaves the computer, and it works offline.
It deliberately does not use the browser Speech API. That API exists in Electron but can never work — Chromium implements it by streaming audio to Google's servers with an API key baked into Chrome builds, which Electron doesn't ship. It fails instantly and forever, which is what floods the console with
chunked_data_pipe_upload_data_stream ... Error: -2.
-
Start at login — tray menu → Start at login. TARS boots hidden into the tray and is ready on
Alt+Space. -
macOS permissions — the first voice command and the first automation command each trigger a prompt. Grant, under System Settings → Privacy & Security:
- Microphone → TARS (voice input)
- Accessibility → TARS (media keys, window control)
- Automation → TARS → System Events, Spotify, Music (
osascriptcontrol)
Without Accessibility and Automation,
media_controlandpower_controlfail silently at the OS level. -
Windows — no extra permissions. If
Alt+Spacedoes nothing, another app owns the shortcut; check the backend console for a "could not register" warning. -
Packaged builds —
cd frontend && npm run dist:win(ordist:mac) produces an installer infrontend/release/.
21 tools, all cross-platform:
| Area | Tools |
|---|---|
| Apps & web | launch_app, open_website |
| System | set_volume, media_control, clipboard, notify, system_info, power_control |
| Files | find_files, read_file, write_file, move_file, delete_file |
| Web | web_search, fetch_page |
| Browser | browser_open, browser_click, browser_type, browser_read |
| Shell | run_shell |
| Self | set_personality |
It is a real agent loop: up to 8 model→tools→model round trips per request, so "find my resume, open it, and turn the volume down" is one instruction.
open_websitedeep-links into your own browser.site='youtube', query='lofi'lands on the search results page. This is the default and handles most requests.browser_*drives a separate Chromium window that TARS owns, with a persistent profile at~/.tars/browserso logins stick. Used only when a task needs real clicking or page reading. It is not your daily browser — logins and tabs are not shared.
Policy: confirm destructive only.
Runs immediately: opening apps and URLs, volume, media, search, reading files, system info, clipboard, and any shell command that looks read-only.
Held for approval: delete_file, move_file, power_control, overwriting an
existing file, and any run_shell command matching a destructive pattern
(rm, del, Remove-Item, shutdown, mv, git push, output redirection,
curl | sh, and others — see Backend/services/tools/risk.py).
When one is hit, the overlay shows an Allow / Deny prompt and the agent loop blocks until you answer. Denying tells the model not to retry. No answer within 120 seconds cancels the action.
Additional hard limits:
- File tools are confined to your home directory; paths that escape it are refused before anything runs.
delete_filemoves to the trash, never a permanent delete, and refuses to run at all ifsend2trashis unavailable.- The backend binds to 127.0.0.1 only. Do not expose it — it executes shell
commands by design. Override
HOSTonly if you understand that.
Only one backend may hold port 8000. The Electron app health-checks the
port and reuses whatever answers, so an orphaned server from an earlier run will
silently serve stale code — replies fail in ways the current source can't
explain. On Windows pkill -f Main.py often fails to match; check and clear with:
netstat -ano | findstr :8000
taskkill /PID <pid> /F
Run the backend single-process. Pending confirmations are held in memory in
services/confirm.py: the SSE stream parks a future there and POST /api/v1/confirm resolves it. Split those across processes and every
confirmation fails with "unknown or expired". Concretely:
- Auto-reload is off by default.
TARS_RELOAD=1re-enables it for development, and a reload landing mid-turn will break that turn's confirmation. - Never run with
--workersgreater than 1.
Conversation memory is per-session and in-process, trimmed to the last 12
turns. It does not survive a backend restart. POST /api/v1/reset clears it.
Endpoints: GET /health, POST /api/v1/chat/stream (SSE),
POST /api/v1/confirm, POST /api/v1/reset, GET /api/v1/audio/tars-tts.
| Symptom | Cause / fix |
|---|---|
| "Cannot reach groq" | No/invalid GROQ_API_KEY in Backend/.env |
| "Cannot reach Ollama" | ollama serve not running |
| Confirmation says "unknown or expired" | Backend reloaded or multi-worker — see §7 |
| Overlay shows "Offline" | Backend not up; run tars.bat --backend and read the traceback |
Alt+Space does nothing |
Another app owns the shortcut |
| "Hey TARS" never wakes it | Mic permission denied, or Whisper failed to load — check the backend log for "Whisper/faster-whisper unavailable" |
chunked_data_pipe_upload_data_stream flood |
A build still using the browser Speech API. Rebuild the frontend. |
| "daily token limit reached" | Groq free tier is 100k tokens/day per model. Switch model or use Ollama — see §3. |
| Replies stopped working after edits | A stale backend may still hold port 8000. See §7. |
| It wakes at random | Report the phrase — the matcher lives in frontend/src/lib/speech.js and is unit-testable |
| Listening bars stay flat | Mic blocked for level metering; recognition may still work. Grant microphone access. |
| Volume fails on Windows | pip install pycaw comtypes |
browser_* unavailable |
playwright install chromium |
| Media keys do nothing (macOS) | Grant Accessibility + Automation; browser-tab audio isn't controllable this way |
| TTS request hangs | Use voices.bin with am_adam — voices.json/af_heart 500s |