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 asabstractgateway 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.localname, 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-awakepinned 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 /commandstypepause, the whole run tree) or Resume (typeresume), and Stop… (asks first; typecancel, with the reason "Stopped from the AbstractGateway menu").Running — nonewhen 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). - Automations ▸ (its own item under Conversations ▸) — first Running
(N), the automations' active runs (the rows above, shown only when one
runs), then the automations
(
GET /automations) under Active (N) and Paused (N):⏱ <automation title> · Every day at 09:00 · next Fri 17 Oct 09:00,⏱ <title> · When Python news has a new item— the trigger in the gateway's words (trigger_text, with the next run fromschedule_textfor a schedule); the tray computes no next run. The submenu: Open in Observer (the Automations page), Run now, Pause / Resume (POST /automations/{id}/commands, typesautomation.run_now,automation.pause,automation.resume), each offered only when the automation'scapabilitieslist it; the gateway's refusal (an occurrence already running, an archived automation) is shown with its words. Open Automations in Observer at the bottom;No automations yetwhen there are none. - Recent — 4 done · 1 cancelled — 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
…and N more. The submenu: when it started, Open in Observer.
Open in Observer 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. Open Conversations in Console at the bottom is the full list.
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 Another account's conversation — act on it from its own
app: the tray's commands reach the plane of its own identity (the
payload's caller_plane), never another account's runs.
The conversation rows are read every 20 seconds (GET /host/runs, 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
Scheduled 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.
Automation notifications¶
The tray follows your event stream (GET /api/gateway/me/events/stream,
api.md): it reads what
happened before it started, then stays connected and picks up where it left
off after a break (Last-Event-ID), so nothing is missed and nothing is shown
twice.
- A notification per automation item. When an automation has something
for you (its run asked to notify, or it failed after its retries), the tray
shows one notification:
<automation title>·has a new result — open it in the Assistant. , or<automation title> failed·failed after its retries — see Automations in the Assistant. Items that existed before the tray started are not shown again. - A notification per wait on you. A conversation that stops for your approval (Approval needed · A conversation waits for your approval — open the Assistant.) or your answer (A question for you) is announced once. Notifications have no click action: open the Assistant from the tray menu (Apps ▸ Launch Assistant).
- A notification per published alert. A flow's Notify me or Publish to
channel step with an alert shows its title · New on
— open the Assistant. An alert whosechannels(Notify me's "Where") leave outtrayis neither shown nor counted by the tray; an alert with nochannelsgoes everywhere (api.md). - The count. The icon's tooltip says how many things wait for you
(
2 things waiting for you): 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. - Delivery is recorded. Each notification shown (or that this desktop
cannot show) is written to your stream as
notification.sent/notification.failedwithchannel: "tray".
Models¶
Models ▸ is about memory first: the full meters (Memory 40.6 GB of 128
GB (32%) · this gateway 10.9 GB, GPU 20% busy · Apple M5 Max), then what
is in memory — In memory (N) · size and one Eject X (size, engine)… row
per loaded model (kept in memory named in the row for a locked one), and
Eject All — frees N… 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; Eject All asks once, naming the
models and what they free, then ejects them one after the other. Nothing in
memory when the list is empty.
Load a Model ▸ preloads an installed model (POST
/api/gateway/models/load; the gateway pins it resident):
- Your defaults — 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.
- One submenu per engine — MLX, LM Studio, Ollama, Hugging Face — with
every model the engines hold on this machine (
GET /models/installed), size on disk included. Models the catalog recognises come first, then A–Z. A list longer than 30 is split into ranges (A – F (30) ▸); 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.
Every load shows Loading X while it runs (a notification and a greyed row), then Loaded X after N s — or a dialog with the gateway's full reason when it fails.
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 Your defaults.
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 gateway holds N GB 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.
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".
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.
Apps¶
The Apps submenu lists Observer, Continuum, Code, Entity, Flow (the
stack order and ports of scripts/start-local.sh: 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:
| App | Detected by | Line |
|---|---|---|
| Observer, Continuum, Code, Entity, Flow | the gateway (GET /api/gateway/apps): its own installs, and apps started outside it (the dev stack, npx, a service) found on their usual port |
Open X when running, whoever started it (a one-time signed-in handover); Open X when installed and stopped (starts it, then opens it); Install X… 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 Open X); otherwise X, greyed |
| the same, installed globally | the app's command on PATH (abstractobserver, abstractflow-editor, abstractcode-web, abstractcontinuum, abstractentity) or the package under npm root -g |
Open X — 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) |
| Assistant | the same detection as the console's Assistant card (apps_desktop.detect_assistant): AbstractAssistant.app in /Applications or ~/Applications, the abstractassistant command (this Python's scripts folder, or PATH), or the package in this Python (importlib.util.find_spec, without importing it) |
Launch Assistant 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 (POST /api/gateway/apps/assistant/launch, the console's Open), connected and signed in to this gateway; Install Assistant… when the gateway can install it into its own Python (the console's Install); otherwise Assistant, greyed |
| Code's terminal version (the only app with one today) | the gateway's presence check, reported as interfaces[kind="tui"] on the app row: its terminal-apps folder (uv's tool bin dir, shared with the installer; <data dir>/apps/bin/ for a gateway that is not a uv tool install), abstractcode on PATH, or ~/.cargo/bin |
Open Code in Terminal — a new terminal window on this machine, signed in through a one-time code (POST /api/gateway/apps/code/launch-tui, 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) |
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. Manage Apps in Console… at the bottom opens the console's Apps tab (updates, logs, stop, and the full reasons).
The tray talks to its gateway over loopback (http://127.0.0.1:<port>) for
every network mode; the network addresses under Addresses are for other
devices.
A folder called abstractassistant in the gateway's working directory (a
source checkout) resolves as a namespace package; 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.
Start at login¶
Start AbstractGateway at login 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:
| OS | Mechanism (per user, no admin) | "On" means |
|---|---|---|
| macOS | LaunchAgent ~/Library/LaunchAgents/ai.abstractframework.gateway.plist (RunAtLoad) |
the plist parses, the program it starts exists, and launchctl print-disabled does not list it as disabled |
| Linux (systemd) | user unit ~/.config/systemd/user/abstractgateway.service |
the program exists and systemctl --user is-enabled says enabled |
| Linux (no systemd user manager) | XDG autostart entry ~/.config/autostart/abstractgateway.desktop (graphical login) |
the program exists and the entry is not switched off (X-GNOME-Autostart-enabled=false, Hidden=true) |
| Windows (experimental) | HKCU\Software\Microsoft\Windows\CurrentVersion\Run\AbstractGateway → pythonw -m abstractgateway.os_service launch … |
the program exists and Task Manager's Startup apps has not disabled it |
The item reads — needs repair 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 (another gateway is registered) when the login item belongs to
another data folder; a click asks before replacing it. A registration that
pins --host/--port on its command line also reads — needs repair
("pinned to 127.0.0.1:N by the login item …"): it starts, but the Network
choice cannot apply to it. The click rewrites it to plain serve and keeps
the stored network mode.
Turning it on registers for the next 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:
abstractgateway service status # on | off | broken | other, and why
abstractgateway service enable # this gateway at next login; the Network setting binds it
abstractgateway service disable # the running gateway keeps running
abstractgateway service install # enable + start now + wait for health (installers)
abstractgateway service uninstall # disable + stop it
Network and addresses¶
Addresses ▸ lists every address the gateway answers on (loopback, each
network interface, the machine's .local name, a tailscale name, a public
one) with where it reaches — http://192.168.1.23:8080 · local network
(Wi-Fi) — and copies the one you click. Network ▸ shows what runs now
(Now: local network · 0.0.0.0:8080) and three choices — Localhost only,
Local network, Internet… — whose mark is what is set. Choosing one
saves it (POST /api/gateway/network); when it needs a restart, Restart to
apply appears (and the Network item says restart required). Internet…
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.
A gateway without the network settings route says so in the Network submenu, and Addresses still offers the address the tray talks to.
Menus without submenus¶
pystray draws submenus and check marks on macOS, Windows and Linux
(AppIndicator). Some Linux panels drop submenus: set "flat_menu": true in
<data_dir>/tray/prefs.json and restart the gateway — every row is kept,
prefixed with its path (Models › Load a Model › MLX › …). pystray's plain
X11 backend (xorg) has no menu at all: clicking the icon opens the console,
and a notification at start names the CLI equivalents (abstractgateway
service …, apps …, models …).
Classic menu¶
The layout shipped before 1 November 2026 (the one with a text header,
Addresses ▸ and Network ▸ as two items, Show Activity Window… 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 menu_model.py and is one click away:
| Way | Scope | How |
|---|---|---|
| Settings ▸ Classic menu | this machine, remembered | writes "menu_style": "classic" to <data_dir>/tray/prefs.json and rebuilds the menu at once; the classic menu's Help ▸ New menu is the way back |
abstractgateway serve --tray-menu classic (or v2) |
this run | pins the style for the run whatever the preference says; the service's command line is where to put it for every start (abstractgateway service enable keeps the stored one) |
prefs.json by hand |
this machine | "menu_style": "classic" or "v2"; an unknown word is ignored |
Both menus call the same handlers for the same actions (tests/test_gateway_tray_menu_v2.py
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. flat_menu
applies to both.
Pause¶
Pause — the header's switch on macOS (OFF = paused), the ☑ Running row on Windows and Linux (unticked = paused) — is process-wide and persists across restarts: 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 Conversations).
Pause is a kill switch: while the gateway is paused nothing moves forward, and everything continues from where it was when you resume.
- Automations and runs. 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.
- Entities. No visit, chat turn, summon, meet or speech is started (the
request answers
409gateway_paused). 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. - Models. No generation, embedding, speech, image or model load leaves the
gateway: not from the gateway API, not from
/v1/...(503gateway_paused), not from a background task. A model you unload stays unloaded. Keep loaded and a new default model are recorded and applied at Resume. Reading what is loaded and unloading it stay available. - Bridges and mail. Telegram, the Agora bridge, the mailbox and feed watchers and push notifications do not poll or deliver; what arrived meanwhile is handled at Resume.
- The console, the API and connected apps keep answering (reading, settings, Resume); cancelling a run and stopping an entity still work.
GET /api/healthcarries"paused": truewhilestatusstays"healthy"— a supervisor must never recycle a paused gateway.
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.
Pause reaches inside a tick: AbstractRuntime's Runtime.tick(step_gate=…)
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
tick_max_steps steps later); GET /host/runner reports
step_gate_supported and the menu says so.
In the split layout (serve --no-runner + abstractgateway runner) the
pause is written to <data_dir>/gateway_paused.json 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 (ABSTRACTRUNTIME_HOST_PAUSE_FILE), and the loop reads it at each
boundary (about every five seconds while it waits).
Restart and update¶
Restart asks uvicorn for its normal graceful shutdown (runner drain,
entity close), then relaunches the same command in the same environment
(python -m abstractgateway …). 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 serve --reload, when the
server was not started by abstractgateway serve, or while an update is
being installed.
Check for Updates (the tray), Check now (web console, Resources >
Gateway > Version) and u in the terminal console's F3 panel all ask the
gateway the same question and show its answer word for word: the version line,
a hint, and Update to … 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.
What the check compares and what Update runs depends on how the gateway was installed:
| Install | Compared with | Update runs | One-click? |
|---|---|---|---|
| AbstractFramework installer (the one-line install, the macOS double-click installer) | the newest AbstractFramework release | the AbstractFramework installer (install.sh), see below |
yes on macOS and Linux; Windows shows the PowerShell line |
pip in a virtual environment |
the newest abstractgateway on PyPI |
python -m pip install --upgrade "abstractgateway[<your extras>]" |
yes |
uv venv / uv pip |
PyPI | uv pip install --python … --upgrade … |
yes |
pipx |
PyPI | pipx upgrade abstractgateway |
yes |
uv tool (installed by hand, no version pin) |
PyPI | uv tool upgrade abstractgateway |
yes |
uv tool pinned to one version (==X) |
PyPI | — reinstall without the pin (the hint gives the command) | no |
editable checkout (pip install -e .) |
PyPI | — update with git pull |
no |
| Docker image | PyPI | — pull the newer image | no |
| system Python (PEP 668 "externally managed") | PyPI | — use pipx or a venv | no |
An AbstractFramework installer install¶
The gateway recognises an installer install by the installer's record in its
data folder (bootstrap.env), which also names the AbstractFramework release
installed. Update 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:
- The release. The check reads the AbstractFramework repository's
mainbranch at one commit: its install manifest (docs/installers/install-manifest.json, the release version and the gateway version it pins) and itsscripts/install.sh. The line readsAbstractFramework 0.6.1 · gateway 0.7.1 · AbstractFramework 0.6.2 available. An install made with--pinrecords no release; it is offered the release only when the release's gateway is newer than the one installed. - What runs. The confirmation names the script's address
(
https://abstractframework.ai/install.sh), the commit and the script's sha256, and the command:/bin/sh install.sh --yes --no-start --no-open --no-modify-path --data-dir <data folder>. 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, Update refuses and asks you to check again. One update runs at a time. - How it runs. 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: Update log under the
version line; the tray shows its last lines if it fails). The installer's own
log is the newest
install-*.login<data folder>/logs/. - The result. What moved (
AbstractFramework 0.6.1 -> 0.6.2, abstractgateway 0.7.1 -> 0.7.2, …) and Restart to finish; Already up to date 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. - Windows 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:
powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/lpalbou/AbstractFramework/main/scripts/install.ps1 | iex"
From a terminal: abstractgateway update¶
The same update as a shell command, for an installer install (macOS, Linux; the one-line install or the double-click installer):
abstractgateway update --check # what would change; exit 0 up to date, 10 when an update exists
abstractgateway update # show it, ask once, run the installer here
abstractgateway update --yes # ask nothing (scripts, no terminal)
abstractgateway --update # the same command
It prints the installed and the newest release, then What changes: 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 installed -> new), then Release notes:
the AbstractFramework changelog sections between the two releases, newest
first (when the changelog cannot be fetched it says so and goes on). --check
stops there. Otherwise it asks Upgrade now? [Y/n] and runs the sha-checked
installer in the foreground, its output on your terminal:
/bin/sh <data folder>/update/install-….sh --yes --no-open --no-modify-path
--data-dir <data folder>. No --no-start 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.
The newest gateway outside a release is a command-line choice: run the installer
with --pin latest (see the AbstractFramework install guide).
Other installs¶
The installed extras (apple, gpu, embeddings) are detected and kept.
The upgrade runs in the background (its log is under the console's version
line); Already up to date is reported when the package manager installed
nothing newer.
In every case the running process keeps serving the old code until it restarts: the tray offers Restart Now, the console's Gateway card Restart gateway….
Security¶
The tray talks to the gateway over loopback HTTP with a per-process
ephemeral admin token 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 (127.0.0.0/8, ::1) and dies with the
process. Audit-log entries made through it carry
source: loopback-ephemeral:desktop-tray.
Signed-in links. Open Console 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 <data_dir>/auth/claims/ (only someone who can write the data
folder can), valid 2 minutes, and opens /console#claim=<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. Copy Console Link copies the plain URL: a sign-in
link does not belong on a clipboard. App links use the gateway's one-time
handover (POST /api/gateway/apps/{id}/open, 2 minutes, single use).
FORWARDED_ALLOW_IPS=* (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.
Troubleshooting¶
See troubleshooting.md for a missing icon. Other cases:
- The helper starts then disappears: read
<data_dir>/logs/tray.log;GET /api/gateway/host/trayreportsexit_codeand the readiness failure. After two crashes in a row it is not restarted automatically;POST /api/gateway/host/tray/show(admin) starts it again. - The icon says "Not responding": the gateway is restarting, stopped or unresponsive. Force Quit in that state sends the gateway process SIGTERM and, after five seconds, kills it.
Licensing note¶
pystray is LGPL-3.0 and python-xlib (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.