Skip to content

AbstractGateway — Desktop tray icon

abstractgateway serve can show a small icon in the macOS menu bar, the Windows system tray or a Linux panel. It exists so that anyone running a gateway on their own computer — including people who never open a terminal — can see what it is doing and act on it in one click:

  • The header — on macOS a native row: the AbstractFramework logo, the product name, one line saying what the gateway is doing (2 conversations running · 1 model loaded, Paused · Paused — conversations wait until you resume) and a switch: ON while conversations run, OFF pauses the gateway (the console keeps answering; work waits). Windows and Linux show the name (Linux with the logo beside it), the subtitle and a ☑ Running check row that is the same switch. There is no Pause row anywhere else: the switch is the control. See Pause.
  • Open Console — the web console (/console), already signed in: the tray mints a one-time sign-in link locally (the same code as abstractgateway claim; see Security) so an expired browser session never ends on a token prompt. One door: every other console entry point in the menu is a deep link to a tab of it.
  • Open Assistant — the desktop app, connected and signed in to this gateway (Install Assistant… when the gateway can install it; absent when it can neither, the name then sits greyed under Apps). See Apps.
  • Needs you — every conversation waiting for a person (an approval, a question) as its own row at the top of the menu, with Show and approve…, Deny and Open in Observer; at most three rows, then one line naming the rest. Nothing here while nothing waits.
  • Conversations — what is going on, by the conversation's title (what you asked, or the automation's name — never a workflow id): Running, Need attention and Recent (the last 24 hours), each row with its own actions. See Conversations below.
  • Automations — the standing orders, Active and Paused, each with Open in Observer, Run now, Pause / Resume, and the Automations page in Observer. See Conversations below.
  • Models — memory first: the full memory and GPU figures, what is in memory with one Eject X (size, engine)… row per model and Eject All — frees N… when several are loaded, then Load a Model ▸, Show Activity Window… (two live graphs and the model list; needs tkinter, see below) and the console's Resources tab. See Models below.
  • Apps — the AbstractFramework browser apps, one short line each: Open X (running, whoever started it, or installed: started first), Install X… (installs through the gateway, with progress notifications: the same install as the console's Install button, so Code's terminal app comes with it; nothing opens by itself, the menu then offers Open X), otherwise the app's name, greyed. See Apps below.
  • Connect — where the gateway answers now, every address it answers on (http://127.0.0.1:8080 · this computer, http://192.168.1.175:8080 · local network (Wi-Fi), a .local name, a tailscale name, the internet; a click copies it and a notification says what was copied), who may reach it (Localhost only / Local network / Internet…) and the restart that applies a change. See Network and addresses below.
  • Settings — Start at login (a check item that shows whether this gateway WOULD start at your next login, and switches it; see Start at login), Keep the Mac awake while the gateway runs (the same setting as the web console's switch: checked = this Mac does not idle-sleep while the gateway runs; a change applies at once; greyed when serve --keep-awake pinned it for this run), Warn when memory is almost full, Classic menu.
  • Help — Documentation, Report a Problem, the developer API reference, Copy Console Link, Check for Updates… (while no update is known) and About: the gateway's version, console address and data folder, the AbstractFramework project details and the versions of the framework packages this gateway runs (from GET /api/gateway/about).
  • Restart…, Quit — at the bottom. An update's state (Update to …, Restart to Finish Update…) joins them while it applies. Pausing is the header's switch (see above): it stops new steps from running to free the machine or to look at what is going on (the console keeps answering; work queues until you switch it back on); while paused the subtitle reads Paused — conversations wait until you resume.

The menu (macOS; […] is a greyed information line, ▸ a submenu, ☑/☐ a check item, ●/○ a radio choice). It reads top to bottom in the order a person thinks: what is going on (three status lines), act (the two doors, then whatever waits for you), look (Conversations, Models, Apps), set up (Connect, Settings, Help), lifecycle (an update when one is known, Pause, Restart, Quit):

[logo] AbstractGateway                          (○━━) ← macOS: the native header; ON = running, OFF = paused
       1 conversation running · 1 needs you · 1 model loaded
[Memory 32% · this gateway 10.9 GB · GPU 20%]
────────
Open Console                                   (the default item: signed in)
Open Assistant                                 (the desktop app; Install Assistant… when it can be installed)
────────
[Needs you (1)]                                (only while something waits for a person; at most 3 rows, then "…and N more under Conversations")
🟡 Clean the build folder · approve `execute_command` ▸   [execute_command {"command": "rm -rf build"}] | Show and approve… | Deny | Open in Observer
────────
Conversations ▸     [Running (1)] 🟢 Refactor the sampler into two lanes · step 4 · 2m 10s so far ▸ | [Need attention (1)] … | [Recent — 1 done] ✅ Write the changelog · 7 steps · 1m 42s ▸ | Open Conversations in Console
Automations ▸       [Active (1)] ⏱ Daily digest · Every day at 09:00 · next Fri 17 Oct 09:00 ▸ | [Paused (1)] ⏸ Inbox triage · paused · When mail arrives in me@example.org ▸ | Open Automations in Observer
Models ▸            [Memory 40.6 GB of 128 GB (32%) · this gateway 10.9 GB] | [GPU 20% busy · Apple M5 Max] | [In memory (2) · 16.2 GB] | Eject Qwen3.6-27B-4bit (16.0 GB, MLX)… | Eject Qwen1.5-0.5B-Chat-4bit (249 MB, MLX)… | Eject All — frees 16.2 GB… | Load a Model ▸ | Show Activity Window… | Open Resources in Console…
Apps ▸              Open Observer | Open Continuum | Install Code… | [Entity] | Install Flow… | [Installs unavailable now · Console → Apps] | Manage Apps in Console…
────────
Connect ▸           [Now: localhost only · 127.0.0.1:8080] | [Addresses — click one to copy it] | http://127.0.0.1:8080 · this computer | http://192.168.1.23:8080 · local network (Wi-Fi) | http://mymac.local:8080 · this computer's name | [Who can reach it] | ● Localhost only | ○ Local network | ○ Internet… | Open Network in Console…
Settings ▸          ☑ Start at login | ☑ Keep the Mac awake while the gateway runs | ☑ Warn when memory is almost full | ☐ Classic menu
Help ▸              Documentation | Report a Problem… | Developer API Reference | Copy Console Link | Check for Updates… | About AbstractGateway…
────────
Restart…
Quit AbstractGateway…                          (Force Quit AbstractGateway… while it does not answer)

The header is always there. On macOS it is one native row (NSMenuItem view, tray/header_mac.py): the logo (tray/logo.py, the framework's assets/logo-framework.png cropped square, rounded, 72 px), the product name, a subtitle and the switch. The subtitle is what the machine is doing in words (Idle · no model loaded, 2 conversations running · 1 needs you · 1 model loaded; Slow to answer · leads it when a probe timed out) and, while the gateway is not plainly running, its state first (Paused · Paused — conversations wait until you resume, Pausing… · Finishing 2 runs at the next step, then pausing, Updating… · Installing 0.19.0 · conversations keep running, Not responding · Can't reach it on this computer · retrying, Starting… · Usually a few seconds). The switch is ON while conversations run and OFF while paused; it is greyed while the gateway is pausing, updating, starting or not answering, and absent while it cannot be reached.

Windows and Linux menus cannot hold a control in a row (a Win32 menu row is text, an AppIndicator menu is exported over DBus and drawn by the panel: label, icon, check mark), so there the header is three rows: AbstractGateway 0.19.0 (Linux: with the logo beside it, a GtkImageMenuItem), the subtitle, and ☑ Running — the switch as a check item: unticking pauses, ticking resumes, greyed while it cannot be told. macOS without a usable AppKit falls back to the same three rows, so the switch is never missing. Then the meters as percentages (the full figures and the GPU's name are under Models ▸). The product name is on the header and on Quit, nowhere else. An update changes the bottom section: Checking for Updates…, Update to 0.19.0…, Updating…, Restart to Finish Update… appear above Pause while they apply; otherwise Check for Updates… waits under Help.

This is the menu since 1 November 2026. The previous layout is kept whole and is one click away (see Classic menu); its text rendering is in the gateway's menu_model.py docstring and in tests/test_gateway_tray_menu_model.py.

The icon itself is a live gauge: the outer ring fills with system memory in use (blue), the inner ring with GPU load (amber). A green dot in the centre means a workflow step is executing right now; pause bars mean paused; a red ring with ! means the gateway is not answering.

Everything works offline except Documentation, Report a Problem and Check for Updates, which open a website or check for a newer release (see Restart and update). The documentation is online; the console's docs assistant answers from the llms.txt shipped with the gateway.

Install

The tray is an optional extra so servers never pull GUI libraries:

pip install "abstractgateway[tray]"      # pystray + Pillow
Platform What else is needed Notes
macOS nothing (pystray installs the pyobjc Cocoa bindings) Retina-crisp icon; native alerts.
Windows nothing The icon may start in the tray overflow (the ^ chevron); drag it out to pin it.
Linux the GTK/AppIndicator bindings: sudo apt install python3-gi gir1.2-ayatanaappindicator3-0.1 (Debian/Ubuntu) GNOME needs the AppIndicator and KStatusNotifierItem extension; KDE, XFCE, Cinnamon work out of the box. Pure Wayland sessions without a status-notifier host have no tray.

The Activity window uses tkinter from the Python standard library. Some Python builds ship without it (Homebrew: brew install python-tk; Debian: sudo apt install python3-tk; pyenv builds need the Tk headers at build time). When it is missing, the item is absent; the console's Resources tab shows the same graphs.

When the icon appears

At abstractgateway serve time the gateway decides, and says why on stderr:

While the machine's gateway service runs, the icon is there. The service is the gateway started at login by abstractgateway service install or the installer: the LaunchAgent (launchd job ai.abstractframework.gateway), the systemd user unit (abstractgateway.service), the XDG autostart entry or the Windows Run entry. A serve started any other way (a terminal, a test, an e2e harness, a script) shows no icon unless it is started with --tray, so a scratch gateway never puts a second icon next to yours (operator ruling 2026-10-29). There is no setting to turn the service's icon off and no Hide item in its menu, because the icon is how people who never open a terminal reach their gateway. It is absent only for one of these reasons:

Situation Outcome
abstractgateway[tray] not installed not started; the install hint is printed
No display (SSH session, container, Windows service, macOS daemon, CI) not started (reason headless)
serve --reload (development) not started (the app runs in uvicorn's reloader child)
A runner-only process (abstractgateway runner) not started; the tray belongs to the process that serves the console
Not the machine's gateway service and no --tray (a terminal, a test, a harness) not started (reason not_service)
serve --no-tray not started for this run (reason no_tray_flag), even for the service
A test gateway start: --host 127.0.0.1, a --port other than the configured one (the network setting's, else 8080) and --print-token not started (reason test_gateway), said in one line at start
Otherwise started; Desktop tray: started (pid …)

The console's Resources → Gateway card reports which of these applies, as plain text. If the helper itself crashed, POST /api/gateway/host/tray/show (admin) retries it without restarting the gateway.

Everything the tray shows is also in the console's Resources tab: the Gateway card (pause/resume, update, restart, quit), the memory and GPU meters, and the model table with unload buttons. A paused gateway shows a banner on every console tab with a Resume button.

Conversations

Conversations ▸ is the machine's work as a person sees it. A row is a conversation turn — never a sub-run, an automation's controller or an automation's occurrence. An automation's run is listed under Automations ▸ · Running (N) instead, with the same row and submenu: the runtime tags every run with a session_kind (chat / discussion = a conversation, automation / occurrence = an automation's run; GET /host/runs serves it on each row) and the menu sorts by that tag alone. AbstractNote's own work (its captures and its processing automations, session purpose notes) is in neither menu: GET /host/runs leaves it out. A wake that runs in its caller's conversation is tagged chat and stays a conversation. A row reads under its title: the automation's name for an occurrence, else the first line of what the person typed (folded at 60 characters with a visible "…"), else the workflow's name (GET /host/runs serves it as title with title_source, and the whole first line as title_whole; the Observer's cards use the same text). The list is host-wide, not per-principal: memory, GPU and loaded models on this menu describe the machine, and the conversation list has to describe the same machine. Catalog-published workflows are shown under the name you know them by and are not mistaken for the gateway's own bookkeeping runs. Summoned entities' data planes are not listed (the payload names them in skipped_entity_planes).

Three sections under Conversations ▸ and two under Automations ▸, each under an information line, nothing hidden without saying so:

  • Running (N) — 🟢 <title> · step 4 · 2m 10s so far, whatever day it started; a run whose sub-run is working counts as running. A row waiting for something that is not a person says what (waiting for a timer, waiting for email.received, waiting for a sub-run) and stays here. A paused conversation reads ⏸ <title> · paused. The submenu: when it started, Open in Observer, Pause (the conversation stops at its next step; POST /commands type pause, the whole run tree) or Resume (type resume), and Stop… (asks first; type cancel, with the reason "Stopped from the AbstractGateway menu"). Running — none when nothing runs.
  • Need attention (N) — only an approval or a question, the two waits a person must act on. 🟡 <title> · approve \execute_command`: the submenu shows what is asked on one line, then **Show and approve…** — a dialog with the tool name and its arguments in full (pretty JSON, cut at about 1500 characters with "open in Observer for the rest"), buttons **Approve** / **Deny** / **Cancel**, Cancel being the default and what Esc does — and **Deny** from the row. An approval is never sent from a bare menu click. The answer is the sameresumecommand the Assistant and Code send:{wait_key, payload: {"approved": true|false}}on the run that holds the wait (a sub-run's approval belongs to its parent's row; the dialog reads the full arguments fromGET /host/runs/{run_id}/wait).🟡 · a question`: the question, one line; free-text answers stay in the clients (the Assistant, Code, the console).</li> <li><strong>Automations ▸</strong> (its own item under Conversations ▸) — first <strong>Running (N)</strong>, the automations' active runs (the rows above, shown only when one runs), then the automations (<code>GET /automations</code>) under <strong>Active (N)</strong> and <strong>Paused (N)</strong>: <code>⏱ <automation title> · Every day at 09:00 · next Fri 17 Oct 09:00</code>, <code>⏱ <title> · When Python news has a new item</code> — the trigger in the gateway's words (<code>trigger_text</code>, with the next run from <code>schedule_text</code> for a schedule); the tray computes no next run. The submenu: <strong>Open in Observer</strong> (the Automations page), <strong>Run now</strong>, <strong>Pause</strong> / <strong>Resume</strong> (<code>POST /automations/{id}/commands</code>, types <code>automation.run_now</code>, <code>automation.pause</code>, <code>automation.resume</code>), each offered only when the automation's <code>capabilities</code> list it; the gateway's refusal (an occurrence already running, an archived automation) is shown with its words. <strong>Open Automations in Observer</strong> at the bottom; <code>No automations yet</code> when there are none.</li> <li><strong>Recent — 4 done · 1 cancelled</strong> — the conversations that finished in the last 24 hours (✅ completed, ❌ failed, ⚪️ cancelled), newest first, with the step count and how long each took; five rows, then <code>…and N more</code>. The submenu: when it started, <strong>Open in Observer</strong>.</li> </ul> <p><strong>Open in Observer</strong> opens that conversation's page (or the Automations page) signed in; a stopped Observer the gateway manages is started first; greyed when Observer is not installed. <strong>Open Conversations in Console</strong> at the bottom is the full list.</p> <p>Another account's conversation (the gateway runs several accounts) is listed — the machine is busy with it — but its Pause, Stop and approval controls are greyed and the row says <code>Another account's conversation — act on it from its own app</code>: the tray's commands reach the plane of its own identity (the payload's <code>caller_plane</code>), never another account's runs.</p> <p>The conversation rows are read every 20 seconds (<code>GET /host/runs</code>, cached a few seconds on the gateway; one run document per row) and right after each action. A duration that ticks never rebuilds the menu under the cursor. The <strong>Scheduled</strong> rows follow your event stream instead (below): they are read again when an automation event arrives, after each action, and every 5 minutes to catch an automation created or renamed elsewhere; on a gateway without the event stream they keep the 20-second read.</p> <h2 id="automation-notifications">Automation notifications<a class="headerlink" href="#automation-notifications" title="Permanent link">¶</a></h2> <p>The tray follows your event stream (<code>GET /api/gateway/me/events/stream</code>, <a href="../api/#your-event-stream-apigatewaymeevents">api.md</a>): it reads what happened before it started, then stays connected and picks up where it left off after a break (<code>Last-Event-ID</code>), so nothing is missed and nothing is shown twice.</p> <ul> <li><strong>A notification per automation item.</strong> When an automation has something for you (its run asked to notify, or it failed after its retries), the tray shows one notification: <code><automation title></code> · <em><automation title> has a new result — open it in the Assistant.</em>, or <code><automation title> failed</code> · <em><automation title> failed after its retries — see Automations in the Assistant.</em> Items that existed before the tray started are not shown again.</li> <li><strong>A notification per wait on you.</strong> A conversation that stops for your approval (<em>Approval needed</em> · <em>A conversation waits for your approval — open the Assistant.</em>) or your answer (<em>A question for you</em>) is announced once. Notifications have no click action: open the Assistant from the tray menu (<strong>Apps ▸ Launch Assistant</strong>).</li> <li><strong>A notification per published alert.</strong> A flow's <em>Notify me</em> or <em>Publish to channel</em> step with an alert shows its title · <em>New on <channel> — open the Assistant.</em> An alert whose <code>channels</code> (Notify me's "Where") leave out <code>tray</code> is neither shown nor counted by the tray; an alert with no <code>channels</code> goes everywhere (<a href="../api/#your-event-stream-apigatewaymeevents">api.md</a>).</li> <li><strong>The count.</strong> The icon's tooltip says how many things wait for you (<code>2 things waiting for you</code>): automation items and published alerts not yet seen and conversations waiting on you; seeing an item in a client (the console, the Assistant, the watch) or answering the wait lowers it.</li> <li><strong>Delivery is recorded.</strong> Each notification shown (or that this desktop cannot show) is written to your stream as <code>notification.sent</code> / <code>notification.failed</code> with <code>channel: "tray"</code>.</li> </ul> <h2 id="models">Models<a class="headerlink" href="#models" title="Permanent link">¶</a></h2> <p><strong>Models ▸</strong> is about memory first: the full meters (<code>Memory 40.6 GB of 128 GB (32%) · this gateway 10.9 GB</code>, <code>GPU 20% busy · Apple M5 Max</code>), then what is in memory — <code>In memory (N) · size</code> and one <strong>Eject X (size, engine)…</strong> row per loaded model (<code>kept in memory</code> named in the row for a locked one), and <strong>Eject All — frees N…</strong> when several are loaded. Every eject asks first (that is why a direct row is safe); when work is running on the gateway it says so, because eject stops the calls running on that model first and the next request that needs it loads it again (the gateway's eject semantics). A locked model asks again before it goes; <strong>Eject All</strong> asks once, naming the models and what they free, then ejects them one after the other. <code>Nothing in memory</code> when the list is empty.</p> <p><strong>Load a Model ▸</strong> preloads an installed model (<code>POST /api/gateway/models/load</code>; the gateway pins it resident):</p> <ol> <li><strong>Your defaults</strong> — the models your capability routes name (Text, Image, Voice, Speech to text, Music), loaded under that route's task. A default that is not downloaded is shown greyed with its status, never offered as a click that fails.</li> <li><strong>One submenu per engine</strong> — MLX, LM Studio, Ollama, Hugging Face — with every model the engines hold on this machine (<code>GET /models/installed</code>), size on disk included. Models the catalog recognises come first, then A–Z. A list longer than 30 is split into ranges (<code>A – F (30) ▸</code>); nothing is ever left out. A model larger than the free memory says so, and loading it asks first. Embedding models are listed greyed ("load on use"): the residency API has no embedding task.</li> </ol> <p>Every load shows <em>Loading X</em> while it runs (a notification and a greyed row), then <em>Loaded X after N s</em> — or a dialog with the gateway's full reason when it fails.</p> <p>Installed models are grouped by engine rather than by capability: the engine is always known and decides how a model loads, while many installed artifacts carry no capability metadata. Capabilities appear where they are known: the routes you configured, under <strong>Your defaults</strong>.</p> <p>When no model is listed but the gateway process still holds more than 256 MB of accelerator memory (every model library in the gateway: MLX, llama.cpp, transformers, embeddings), the header adds <code>gateway holds N GB</code> and the menu, the status line and the Activity window say "Gateway still holds N GB (no model listed)" instead of "No models loaded", followed by how the figure was measured ("Measured by metal device counter", "cuda device counter" or "sum of MLX + llama.cpp") and what holds it ("Held by [mlx] qwen/27b × 2 holders", or "Not attributed to any model"): eject the held model in the Console, or restart the gateway to free it. With models loaded, the menu still says how the gateway's memory is measured.</p> <p>After a default-model switch, the Models menu and the Activity window also list the ejects the gateway still owes or that failed: "Will eject X when the in-flight call ends", "X: eject failed: reason", "X kept in memory: reason", "X ejected".</p> <p>The model lists refresh every 5 minutes and after each load or eject; the Activity window and the console's Models tab show the same data live.</p> <h2 id="apps">Apps<a class="headerlink" href="#apps" title="Permanent link">¶</a></h2> <p>The <strong>Apps</strong> submenu lists Observer, Continuum, Code, Entity, Flow (the stack order and ports of <code>scripts/start-local.sh</code>: 3001-3005) and Assistant, one short line each and never a reason: the full reason lives in the console's Apps tab. Presence is detected, never imported — the gateway does not depend on its apps:</p> <table> <thead> <tr> <th>App</th> <th>Detected by</th> <th>Line</th> </tr> </thead> <tbody> <tr> <td>Observer, Continuum, Code, Entity, Flow</td> <td>the gateway (<code>GET /api/gateway/apps</code>): its own installs, and apps started outside it (the dev stack, <code>npx</code>, a service) found on their usual port</td> <td><strong>Open X</strong> when running, whoever started it (a one-time signed-in handover); <strong>Open X</strong> when installed and stopped (starts it, then opens it); <strong>Install X…</strong> when it can be installed (the browser app and, for Code when a ready-made download exists for this computer, its terminal app, as one job; a notification when it is done, then <strong>Open X</strong>); otherwise <strong>X</strong>, greyed</td> </tr> <tr> <td>the same, installed globally</td> <td>the app's command on PATH (<code>abstractobserver</code>, <code>abstractflow-editor</code>, <code>abstractcode-web</code>, <code>abstractcontinuum</code>, <code>abstractentity</code>) or the package under <code>npm root -g</code></td> <td><strong>Open X</strong> — started by the tray with the gateway URL passed in and stopped when the tray exits; sign in inside the app (install it here instead for the one-click sign-in)</td> </tr> <tr> <td>Assistant</td> <td>the same detection as the console's Assistant card (<code>apps_desktop.detect_assistant</code>): <code>AbstractAssistant.app</code> in /Applications or ~/Applications, the <code>abstractassistant</code> command (this Python's scripts folder, or PATH), or the package in this Python (<code>importlib.util.find_spec</code>, without importing it)</td> <td><strong>Launch Assistant</strong> when found (also while it runs): the installed package, else the app bundle — the one the console's card describes; when the other one runs, the line under it says so ("Another Assistant is running: /Applications/AbstractAssistant.app 0.5.0 — quit it to use 0.13.0"). The gateway opens it (<code>POST /api/gateway/apps/assistant/launch</code>, the console's Open), connected and signed in to this gateway; <strong>Install Assistant…</strong> when the gateway can install it into its own Python (the console's Install); otherwise <strong>Assistant</strong>, greyed</td> </tr> <tr> <td>Code's terminal version (the only app with one today)</td> <td>the gateway's presence check, reported as <code>interfaces[kind="tui"]</code> on the app row: its terminal-apps folder (uv's tool bin dir, shared with the installer; <code><data dir>/apps/bin/</code> for a gateway that is not a uv tool install), <code>abstractcode</code> on PATH, or <code>~/.cargo/bin</code></td> <td><strong>Open Code in Terminal</strong> — a new terminal window on this machine, signed in through a one-time code (<code>POST /api/gateway/apps/code/launch-tui</code>, the same route as the console's button). Shown only when the gateway reports it installed; greyed when the gateway would refuse (the console says why)</td> </tr> </tbody> </table> <p>When an app cannot be installed from here, ONE line near the bottom says so: "Installs are off for this gateway · Console → Apps" (the gateway's install setting refuses this caller), or "Installs unavailable now · Console → Apps" (for example the npm registry is unreachable). The tray is on the gateway machine, so with the default setting its installs are allowed whatever address the gateway listens on. <strong>Manage Apps in Console…</strong> at the bottom opens the console's Apps tab (updates, logs, stop, and the full reasons).</p> <p>The tray talks to its gateway over loopback (<code>http://127.0.0.1:<port></code>) for every network mode; the network addresses under <strong>Addresses</strong> are for other devices.</p> <p>A folder called <code>abstractassistant</code> in the gateway's working directory (a source checkout) resolves as a <em>namespace package</em>; it is not an install and is ignored. Apps started by the tray get an environment with every token, secret, password and key removed, like the apps the gateway runs itself.</p> <h2 id="start-at-login">Start at login<a class="headerlink" href="#start-at-login" title="Permanent link">¶</a></h2> <p><strong>Start AbstractGateway at login</strong> is checked only when THIS gateway (its data folder) would really start at your next login. Toggling it registers or removes the same per-user login item as the CLI and the installers:</p> <table> <thead> <tr> <th>OS</th> <th>Mechanism (per user, no admin)</th> <th>"On" means</th> </tr> </thead> <tbody> <tr> <td>macOS</td> <td>LaunchAgent <code>~/Library/LaunchAgents/ai.abstractframework.gateway.plist</code> (<code>RunAtLoad</code>)</td> <td>the plist parses, the program it starts exists, and <code>launchctl print-disabled</code> does not list it as disabled</td> </tr> <tr> <td>Linux (systemd)</td> <td>user unit <code>~/.config/systemd/user/abstractgateway.service</code></td> <td>the program exists and <code>systemctl --user is-enabled</code> says <code>enabled</code></td> </tr> <tr> <td>Linux (no systemd user manager)</td> <td>XDG autostart entry <code>~/.config/autostart/abstractgateway.desktop</code> (graphical login)</td> <td>the program exists and the entry is not switched off (<code>X-GNOME-Autostart-enabled=false</code>, <code>Hidden=true</code>)</td> </tr> <tr> <td>Windows (experimental)</td> <td><code>HKCU\Software\Microsoft\Windows\CurrentVersion\Run\AbstractGateway</code> → <code>pythonw -m abstractgateway.os_service launch …</code></td> <td>the program exists and Task Manager's <em>Startup apps</em> has not disabled it</td> </tr> </tbody> </table> <p>The item reads <strong>— needs repair</strong> when a registration exists but would not start (the gateway was moved or reinstalled elsewhere, the file is unreadable, the unit is disabled); the line under it says why, and a click repairs it. It reads <strong>(another gateway is registered)</strong> when the login item belongs to another data folder; a click asks before replacing it. A registration that pins <code>--host/--port</code> on its command line also reads <strong>— needs repair</strong> ("pinned to 127.0.0.1:N by the login item …"): it starts, but the <strong>Network</strong> choice cannot apply to it. The click rewrites it to plain <code>serve</code> and keeps the stored network mode.</p> <p>Turning it on registers for the <strong>next</strong> login: it never starts a second copy of the gateway that is already running. Turning it off only unregisters: the gateway keeps running now. The same switch from a terminal:</p> <div class="highlight"><pre><span></span><code>abstractgateway<span class="w"> </span>service<span class="w"> </span>status<span class="w"> </span><span class="c1"># on | off | broken | other, and why</span> abstractgateway<span class="w"> </span>service<span class="w"> </span><span class="nb">enable</span><span class="w"> </span><span class="c1"># this gateway at next login; the Network setting binds it</span> abstractgateway<span class="w"> </span>service<span class="w"> </span>disable<span class="w"> </span><span class="c1"># the running gateway keeps running</span> abstractgateway<span class="w"> </span>service<span class="w"> </span>install<span class="w"> </span><span class="c1"># enable + start now + wait for health (installers)</span> abstractgateway<span class="w"> </span>service<span class="w"> </span>uninstall<span class="w"> </span><span class="c1"># disable + stop it</span> </code></pre></div> <h2 id="network-and-addresses">Network and addresses<a class="headerlink" href="#network-and-addresses" title="Permanent link">¶</a></h2> <p><strong>Addresses ▸</strong> lists every address the gateway answers on (loopback, each network interface, the machine's <code>.local</code> name, a tailscale name, a public one) with where it reaches — <code>http://192.168.1.23:8080 · local network (Wi-Fi)</code> — and copies the one you click. <strong>Network ▸</strong> shows what runs now (<code>Now: local network · 0.0.0.0:8080</code>) and three choices — <strong>Localhost only</strong>, <strong>Local network</strong>, <strong>Internet…</strong> — whose mark is what is <em>set</em>. Choosing one saves it (<code>POST /api/gateway/network</code>); when it needs a restart, <strong>Restart to apply</strong> appears (and the Network item says <em>restart required</em>). <strong>Internet…</strong> first shows what exposing the gateway means, with the gateway's own warnings, and posts only after you acknowledge it. A refusal (for example sign-in not set up for that mode) opens a dialog with the reason and the fix.</p> <p>A gateway without the network settings route says so in the Network submenu, and Addresses still offers the address the tray talks to.</p> <h2 id="menus-without-submenus">Menus without submenus<a class="headerlink" href="#menus-without-submenus" title="Permanent link">¶</a></h2> <p>pystray draws submenus and check marks on macOS, Windows and Linux (AppIndicator). Some Linux panels drop submenus: set <code>"flat_menu": true</code> in <code><data_dir>/tray/prefs.json</code> and restart the gateway — every row is kept, prefixed with its path (<code>Models › Load a Model › MLX › …</code>). pystray's plain X11 backend (<code>xorg</code>) has no menu at all: clicking the icon opens the console, and a notification at start names the CLI equivalents (<code>abstractgateway service …</code>, <code>apps …</code>, <code>models …</code>).</p> <h2 id="classic-menu">Classic menu<a class="headerlink" href="#classic-menu" title="Permanent link">¶</a></h2> <p>The layout shipped before 1 November 2026 (the one with a text header, <strong>Addresses ▸</strong> and <strong>Network ▸</strong> as two items, <strong>Show Activity Window…</strong> at the top, the automations inside Conversations ▸, the gateway-wide controls spread over the bottom half and the product name on six rows) is kept whole in <code>menu_model.py</code> and is one click away:</p> <table> <thead> <tr> <th>Way</th> <th>Scope</th> <th>How</th> </tr> </thead> <tbody> <tr> <td><strong>Settings ▸ Classic menu</strong></td> <td>this machine, remembered</td> <td>writes <code>"menu_style": "classic"</code> to <code><data_dir>/tray/prefs.json</code> and rebuilds the menu at once; the classic menu's <strong>Help ▸ New menu</strong> is the way back</td> </tr> <tr> <td><code>abstractgateway serve --tray-menu classic</code> (or <code>v2</code>)</td> <td>this run</td> <td>pins the style for the run whatever the preference says; the service's command line is where to put it for every start (<code>abstractgateway service enable</code> keeps the stored one)</td> </tr> <tr> <td><code>prefs.json</code> by hand</td> <td>this machine</td> <td><code>"menu_style": "classic"</code> or <code>"v2"</code>; an unknown word is ignored</td> </tr> </tbody> </table> <p>Both menus call the same handlers for the same actions (<code>tests/test_gateway_tray_menu_v2.py</code> checks that every classic action is still produced by the new menu), so a roll-back changes what you see, never what the tray can do. <code>flat_menu</code> applies to both.</p> <h2 id="pause">Pause<a class="headerlink" href="#pause" title="Permanent link">¶</a></h2> <p><strong>Pause</strong> — the header's switch on macOS (OFF = paused), the <strong>☑ Running</strong> row on Windows and Linux (unticked = paused) — is process-wide and <strong>persists across restarts</strong>: a laptop paused to get its GPU back does not silently resume after a reboot or an update. One conversation is paused from its own row instead (see <em>Conversations</em>).</p> <p>Pause is a <strong>kill switch</strong>: while the gateway is paused nothing moves forward, and everything continues from where it was when you resume.</p> <ul> <li><strong>Automations and runs.</strong> No new workflow step starts — runs and schedules are accepted and wait. A model or tool call already in flight finishes first (the menu says "Finishing N runs at the next step"); if that step asks for another model call, the call waits for Resume instead of failing.</li> <li><strong>Entities.</strong> No visit, chat turn, summon, meet or speech is started (the request answers <code>409</code> <code>gateway_paused</code>). The background sweeps start no sleep, write no title, summary or brief, and wake nobody. An entity's own-time loop (a separate process) freezes at its next boundary — after the turn it is in — and continues the same day at Resume.</li> <li><strong>Models.</strong> No generation, embedding, speech, image or model load leaves the gateway: not from the gateway API, not from <code>/v1/...</code> (<code>503</code> <code>gateway_paused</code>), not from a background task. A model you unload stays unloaded. <strong>Keep loaded</strong> and a new default model are recorded and applied at Resume. Reading what is loaded and unloading it stay available.</li> <li><strong>Bridges and mail.</strong> Telegram, the Agora bridge, the mailbox and feed watchers and push notifications do not poll or deliver; what arrived meanwhile is handled at Resume.</li> <li>The console, the API and connected apps keep answering (reading, settings, Resume); cancelling a run and stopping an entity still work.</li> <li><code>GET /api/health</code> carries <code>"paused": true</code> while <code>status</code> stays <code>"healthy"</code> — a supervisor must never recycle a paused gateway.</li> </ul> <p>What a pause does not do: it does not cut a model call that is already running (stop the run, or unload the model, for that), and it does not unload anything by itself.</p> <p>Pause reaches inside a tick: AbstractRuntime's <code>Runtime.tick(step_gate=…)</code> consults the gateway's gate at every step boundary. Where the runtime does not offer that gate, the pause takes effect at tick boundaries (up to <code>tick_max_steps</code> steps later); <code>GET /host/runner</code> reports <code>step_gate_supported</code> and the menu says so.</p> <p>In the split layout (<code>serve --no-runner</code> + <code>abstractgateway runner</code>) the pause is written to <code><data_dir>/gateway_paused.json</code> and the runner process picks it up within about two seconds. The same file is how an entity's own-time loop learns of the pause: the gateway names it to every process it starts (<code>ABSTRACTRUNTIME_HOST_PAUSE_FILE</code>), and the loop reads it at each boundary (about every five seconds while it waits).</p> <h2 id="restart-and-update">Restart and update<a class="headerlink" href="#restart-and-update" title="Permanent link">¶</a></h2> <p><strong>Restart</strong> asks uvicorn for its normal graceful shutdown (runner drain, entity close), then relaunches the same command in the same environment (<code>python -m abstractgateway …</code>). On macOS and Linux the process keeps its PID and terminal; on Windows a new process is spawned on the same console. Restart is refused (HTTP 409, greyed out in the tray) under <code>serve --reload</code>, when the server was not started by <code>abstractgateway serve</code>, or while an update is being installed.</p> <p><strong>Check for Updates</strong> (the tray), <strong>Check now</strong> (web console, <strong>Resources > Gateway > Version</strong>) and <code>u</code> in the terminal console's <strong>F3</strong> panel all ask the gateway the same question and show its answer word for word: the version line, a hint, and <strong>Update to …</strong> with a confirmation that says exactly what runs. The check takes at most a few seconds, runs at most once per hour unless you ask again, and offline is a normal answer, not an error. Updating is for admins.</p> <p>What the check compares and what <strong>Update</strong> runs depends on how the gateway was installed:</p> <table> <thead> <tr> <th>Install</th> <th>Compared with</th> <th>Update runs</th> <th>One-click?</th> </tr> </thead> <tbody> <tr> <td>AbstractFramework installer (the one-line install, the macOS double-click installer)</td> <td>the newest <strong>AbstractFramework release</strong></td> <td>the AbstractFramework installer (<code>install.sh</code>), see below</td> <td>yes on macOS and Linux; Windows shows the PowerShell line</td> </tr> <tr> <td><code>pip</code> in a virtual environment</td> <td>the newest <code>abstractgateway</code> on PyPI</td> <td><code>python -m pip install --upgrade "abstractgateway[<your extras>]"</code></td> <td>yes</td> </tr> <tr> <td><code>uv venv</code> / <code>uv pip</code></td> <td>PyPI</td> <td><code>uv pip install --python … --upgrade …</code></td> <td>yes</td> </tr> <tr> <td><code>pipx</code></td> <td>PyPI</td> <td><code>pipx upgrade abstractgateway</code></td> <td>yes</td> </tr> <tr> <td><code>uv tool</code> (installed by hand, no version pin)</td> <td>PyPI</td> <td><code>uv tool upgrade abstractgateway</code></td> <td>yes</td> </tr> <tr> <td><code>uv tool</code> pinned to one version (<code>==X</code>)</td> <td>PyPI</td> <td>— reinstall without the pin (the hint gives the command)</td> <td>no</td> </tr> <tr> <td>editable checkout (<code>pip install -e .</code>)</td> <td>PyPI</td> <td>— update with <code>git pull</code></td> <td>no</td> </tr> <tr> <td>Docker image</td> <td>PyPI</td> <td>— pull the newer image</td> <td>no</td> </tr> <tr> <td>system Python (PEP 668 "externally managed")</td> <td>PyPI</td> <td>— use pipx or a venv</td> <td>no</td> </tr> </tbody> </table> <h3 id="an-abstractframework-installer-install">An AbstractFramework installer install<a class="headerlink" href="#an-abstractframework-installer-install" title="Permanent link">¶</a></h3> <p>The gateway recognises an installer install by the installer's record in its data folder (<code>bootstrap.env</code>), which also names the AbstractFramework release installed. <strong>Update</strong> then runs the same installer as the one-line install, so updating from the tray, either console or by running the line again in a terminal does the same thing:</p> <ul> <li><strong>The release.</strong> The check reads the AbstractFramework repository's <code>main</code> branch at one commit: its install manifest (<code>docs/installers/install-manifest.json</code>, the release version and the gateway version it pins) and its <code>scripts/install.sh</code>. The line reads <code>AbstractFramework 0.6.1 · gateway 0.7.1 · AbstractFramework 0.6.2 available</code>. An install made with <code>--pin</code> records no release; it is offered the release only when the release's gateway is newer than the one installed.</li> <li><strong>What runs.</strong> The confirmation names the script's address (<code>https://abstractframework.ai/install.sh</code>), the commit and the script's sha256, and the command: <code>/bin/sh install.sh --yes --no-start --no-open --no-modify-path --data-dir <data folder></code>. The gateway runs exactly the file it checked, written to a new file of its own for that run; the start must name the sha256 the confirmation showed, and if a newer check fetched a different script in between, <strong>Update</strong> refuses and asks you to check again. One update runs at a time.</li> <li><strong>How it runs.</strong> Nothing is asked and nothing is opened. Start at login stays as it is. The installer keeps your profile, port and the choices it remembers, moves every package to the release's tested versions, and does not stop the running gateway. Its output is the update log (console: <strong>Update log</strong> under the version line; the tray shows its last lines if it fails). The installer's own log is the newest <code>install-*.log</code> in <code><data folder>/logs/</code>.</li> <li><strong>The result.</strong> What moved (<code>AbstractFramework 0.6.1 -> 0.6.2, abstractgateway 0.7.1 -> 0.7.2, …</code>) and <strong>Restart</strong> to finish; <strong>Already up to date</strong> when the installer changed nothing (no restart is offered); or the installer's exit code with the last lines of its log. The running gateway keeps working in every case.</li> <li><strong>Windows</strong> keeps a running program's files locked, so the gateway cannot update itself in place. The hint shows the line to paste in PowerShell; the installer stops the gateway, updates everything and starts it again:</li> </ul> <div class="highlight"><pre><span></span><code><span class="n">powershell</span> <span class="n">-ExecutionPolicy</span> <span class="n">ByPass</span> <span class="n">-c</span> <span class="s2">"irm https://raw.githubusercontent.com/lpalbou/AbstractFramework/main/scripts/install.ps1 | iex"</span> </code></pre></div> <h3 id="from-a-terminal-abstractgateway-update">From a terminal: <code>abstractgateway update</code><a class="headerlink" href="#from-a-terminal-abstractgateway-update" title="Permanent link">¶</a></h3> <p>The same update as a shell command, for an installer install (macOS, Linux; the one-line install or the double-click installer):</p> <div class="highlight"><pre><span></span><code>abstractgateway<span class="w"> </span>update<span class="w"> </span>--check<span class="w"> </span><span class="c1"># what would change; exit 0 up to date, 10 when an update exists</span> abstractgateway<span class="w"> </span>update<span class="w"> </span><span class="c1"># show it, ask once, run the installer here</span> abstractgateway<span class="w"> </span>update<span class="w"> </span>--yes<span class="w"> </span><span class="c1"># ask nothing (scripts, no terminal)</span> abstractgateway<span class="w"> </span>--update<span class="w"> </span><span class="c1"># the same command</span> </code></pre></div> <p>It prints the installed and the newest release, then <strong>What changes</strong>: every package whose installed version differs from the release's (the framework, the gateway, the other Python packages of the gateway's environment, the browser apps and the terminal apps, each as <code>installed -> new</code>), then <strong>Release notes</strong>: the AbstractFramework changelog sections between the two releases, newest first (when the changelog cannot be fetched it says so and goes on). <code>--check</code> stops there. Otherwise it asks <code>Upgrade now? [Y/n]</code> and runs the sha-checked installer in the foreground, its output on your terminal: <code>/bin/sh <data folder>/update/install-….sh --yes --no-open --no-modify-path --data-dir <data folder></code>. No <code>--no-start</code> here: the command is not the gateway process, so the installer keeps your port, profile and login choices and restarts the gateway service itself. The command exits with the installer's exit code and ends with the console's address. On Windows it starts the PowerShell installer in a new window and exits at once (the running command would otherwise hold files the installer replaces). An install the installer did not make (a source checkout, a container, a plain pip / uv / pipx install) is refused with the command to run instead.</p> <p>The newest gateway outside a release is a command-line choice: run the installer with <code>--pin latest</code> (see the AbstractFramework install guide).</p> <h3 id="other-installs">Other installs<a class="headerlink" href="#other-installs" title="Permanent link">¶</a></h3> <p>The installed extras (<code>apple</code>, <code>gpu</code>, <code>embeddings</code>) are detected and kept. The upgrade runs in the background (its log is under the console's version line); <strong>Already up to date</strong> is reported when the package manager installed nothing newer.</p> <p>In every case the running process keeps serving the old code until it restarts: the tray offers <strong>Restart Now</strong>, the console's Gateway card <strong>Restart gateway…</strong>.</p> <h2 id="security">Security<a class="headerlink" href="#security" title="Permanent link">¶</a></h2> <p>The tray talks to the gateway over loopback HTTP with a <strong>per-process ephemeral admin token</strong> handed over on the helper's stdin — never on the command line, never in the environment, never on disk. The token is accepted only from a loopback socket peer (<code>127.0.0.0/8</code>, <code>::1</code>) and dies with the process. Audit-log entries made through it carry <code>source: loopback-ephemeral:desktop-tray</code>.</p> <p><strong>Signed-in links.</strong> <em>Open Console</em> does not ask the gateway to sign anyone in — there is no such endpoint, by design. The tray writes a one-time claim code under <code><data_dir>/auth/claims/</code> (only someone who can write the data folder can), valid 2 minutes, and opens <code>/console#claim=<code></code>; the console redeems it once, from a loopback browser only. A gateway running with a static token (no user accounts) cannot redeem claims, so the plain URL opens and a notification says why. <em>Copy Console Link</em> copies the plain URL: a sign-in link does not belong on a clipboard. App links use the gateway's one-time handover (<code>POST /api/gateway/apps/{id}/open</code>, 2 minutes, single use).</p> <p><code>FORWARDED_ALLOW_IPS=*</code> (uvicorn's proxy setting) would let any client rewrite its peer address; the gateway warns at boot when it sees that with a tray running. Use a concrete proxy IP.</p> <h2 id="troubleshooting">Troubleshooting<a class="headerlink" href="#troubleshooting" title="Permanent link">¶</a></h2> <p>See <a href="../troubleshooting/#there-is-no-tray-icon">troubleshooting.md</a> for a missing icon. Other cases:</p> <ul> <li><strong>The helper starts then disappears</strong>: read <code><data_dir>/logs/tray.log</code>; <code>GET /api/gateway/host/tray</code> reports <code>exit_code</code> and the readiness failure. After two crashes in a row it is not restarted automatically; <code>POST /api/gateway/host/tray/show</code> (admin) starts it again.</li> <li><strong>The icon says "Not responding"</strong>: the gateway is restarting, stopped or unresponsive. <em>Force Quit</em> in that state sends the gateway process SIGTERM and, after five seconds, kills it.</li> </ul> <h2 id="licensing-note">Licensing note<a class="headerlink" href="#licensing-note" title="Permanent link">¶</a></h2> <p><code>pystray</code> is LGPL-3.0 and <code>python-xlib</code> (Linux) is LGPL-2.1. AbstractGateway imports them dynamically as ordinary dependencies, which is compatible with its MIT license. A frozen single-file build (PyInstaller and the like) would have to honour the LGPL relinking terms.</p> </article> </div> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type="button" class="md-top md-icon" data-md-component="top" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class="md-footer"> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-copyright"> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.instant", "navigation.tracking", "navigation.top", "content.code.copy"], "search": "../assets/javascripts/workers/search.a7633da7.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script> <script src="../assets/javascripts/bundle.a5f9d56c.min.js"></script> </body> </html>