The abstract_* ecosystem exposed as an API-callable AI toolset: functions become self-describing Flask endpoints with /endpoints discovery and ?help.
pip install abstract-toolserver==0.0.82 Copy PIP instructions
┌──────────────────────────── hugpy (fleet) ───────────────────────────┐ │ central + workers: platform · engine · fleet · server · media · … │ │ OpenAI-compatible /v1 — every local model, incl. B (Qwen3-Coder-Next) │ └───────▲───────────────────────▲──────────────────────────▲───────────┘ │ inference │ inference │ B reductions ┌────────────────────────┴──┐ ┌────────────────┴──────────┐ ┌───────────┴───────────────┐ │ hugpy-station │ │ hugpy-agent │ │ abstract-toolserver │ │ desktop + headless console│──▶│ agent runtime · TUI · │◀─▶│ comms · ledgers · boards ·│ │ tmux seats per locus │ │ OpenCode/qwen seats │ │ exchanges · MCP · b_ask │ └────────────┬──────────────┘ └────────────┬──────────────┘ └───────────▲───────────────┘ │ keeper/codex seats │ --serve │ tools (MCP/HTTP) ┌────────────▼──────────────┐ ┌────────────▼──────────────┐ │ │ abstract-gpt (Codex seat) │ │ abstract-claude serve ────┼───────────────┘ │ abstract-claude (Claude) │ │ └ abstract-serve-core │ └───────────────────────────┘ └───────────────────────────┘ everything ships through abstract-pypit → PyPI (+ GitHub) Package Role PyPI hugpy (14 lockstep dists) the self-hosted LLM fleet: central, workers, engine, media, server hugpy hugpy-station Electron desktop + headless backend; tmux seats, prompt composer, loop/bug scan deb via central install links hugpy-agent agent runtime on the fleet; hugpy-agent tui over abstract-claude serve hugpy-agent abstract-claude Claude Code launch/session/rollover + abstract-claude serve (roles keeper/chat/worker/local) abstract-claude abstract-serve-core the HTTP routes abstract-claude serve actually runs (queue, relay, rollover sweeps) abstract-serve-core abstract-gpt Codex/ChatGPT seat counterpart of abstract-claude abstract-gpt abstract-toolserver one tool service per host: comms, ledgers, boards, exchanges, MCP bridge, B on call abstract-toolserver abstract-pypit one-command publisher: bump → build → PyPI → GitHub push abstract-pypit Run it pip install abstract_toolserver # + the extras you want to expose python -m abstract_toolserver # HOST/PORT/DEBUG from TOOLSERVER_* env from abstract_toolserver import get_toolserver_app app = get_toolserver_app() # a normal Flask/WSGI app Self-describing surface The app auto-mounts introspection endpoints (from abstract_flask):
Call a tool with JSON; unknown keys are pruned to the function signature, and the reply is {"result": ...} (or {"error": ...}). Discover-and-dispatch from a client is already provided by abstract_apis.make_endpoint_call.
browser_surfaces where can I drive? (guests, the desktop, pool guests, the lab) browser_lab(action="start") a disposable clone of the controlled lab image -> on="vm: " browser_go(url, on=...) Ctrl+L, type, Enter, wait until the page stops painting browser_look(on=...) the screen as text: [{id, text, x, y}] (no model) browser_click(text="Sign in") exact visible words (OCR) | each click walks the browser_click(id="t12") an item of the last look | pointer there, presses, browser_click(target="the gear icon") a description (hugpy's VL model) | and diffs the screen: browser_click(cell="C4.B3") a cell of browser_shot(grid=true) | changed_at_click | browser_click(x=412, y=388) a pixel of the screenshot | changed_elsewhere | no_change browser_type(text="...", into_text="Email", submit=true) browser_key("ctrl+l") browser_move / browser_drag / browser_scroll / browser_wait(text=...) / browser_read Surfaces (on=): vm: (libvirt guest on this host: virsh screenshot + QMP tablet/keyboard), pool: (a guest on the delegated VM-pool node), screen | monitor: | window: | region:x,y,w,h (the desktop this toolserver runs on — mss + pyautogui — or the node ui is delegated to). Every coordinate is a pixel of the screenshot; origins, HiDPI scale and the tablet range are the surface's business. Aiming (aim.py). text= is OCR over two readings (the page at 2x and every text line normalised to dark-on-light) and refuses to guess: absent words are an error, repeated words list their places (nth=). target= asks the VL model: a grounding model (Qwen2.5-VL) answers with a box on a wire image sized for it (sides in multiples of 28, >= 1024 image tokens), a second look on a magnified crop must confirm it — framed around any on-screen text the description names — and tiny results are snapped onto the element. Any other VL model aims by grid-image inference: a labelled grid drawn at wire size (each label in the middle of its cell, where "the nearest label" is the right answer), the chosen cell magnified with most of its neighbours and gridded again, the last cell snapped to the element inside it. A bot that reads images itself uses the same grid: browser_shot(grid=true) -> browser_shot(grid=true, cell="C4") -> browser_click(cell="C4.B3"). Results are data a bot can branch on: {ok, point: {x, y, method, confidence}, verdict, regions, ...}; a target that is not on the screen is never clicked: {ok: false, error: {code: "not_visible"}, hint}. The lab: hugpy-browser-lab is a shut-off libvirt image (Ubuntu GNOME, Firefox with a fresh profile and fixed policies, home page = a precision test page, no NIC). browser_lab boots/destroys disposable clones of it, so a test starts from the same pixels every time. browser_lab(action="check") runs the self-check on a fresh clone (pointer error in pixels, text aims, typing, hover, drag, wheel, keys) and action="check_status" returns the pass/fail table. Measured 2026-10-06 (233 labelled targets on five mock screens; real Chrome on Xvfb; Firefox in a lab clone): pointer error 0 px on both surface kinds; exact-text aims reach 81 of 82 visible labels with none wrong (the previous exact-text path: 36 of 82, 4 wrong); description aims with Qwen2.5-VL-7B land on the element for 85% of 40 targets in a single look, and on the hardest kind — small icons, checkboxes and buttons told apart only by a row label or card title elsewhere on the screen — for 14 of 14 with the row-framed second look (median error 1 px; a single look: 11 of 14). On the same 12 targets: the 0.0.64 grid 0 of 12, grid-image inference as released 8 of 12 (10 within 8 px), the default pointing path 11 of 12 with a median error of 1 px. Guide: instructions/hugpy/hugpy-browser.
Tool schemas describe individual calls; the built-in instruction tree documents how calls compose into repeatable workflows:
Authenticated MCP callers may create a new document with instructions_add at an instructions/... path. Creation is durable and immediately readable, but MCP intentionally exposes no update or delete tool. Those operations remain local to server administration, and built-in documents are immutable.
Backends load lazily, so the server boots on a headless box and a missing backend errors only when its tool is called. Beyond that:
Every route requires TOOLSERVER_OPERATOR_TOKEN, sent as X-Operator-Token: or Authorization: Bearer (the MCP bridge sends both). There is no IP allow-list and no loopback bypass: a LAN, WireGuard or 127.0.0.1 caller without the header gets 401 {"error":"unauthorized"} exactly like the public internet (operator ruling 2026-09-29 — the nginx allow 192.168.x/deny all block that used to front toolserver.hugpy.ai was a second, redundant gate and is gone). With the env var unset the server fails closed (every gated route 401s; startup logs an error).
Open by design (they carry their own credential or expose nothing):
TOOLSERVER_REQUIRE_TOKEN (the old opt-in blueprint gate) is deprecated: parsed, logged as ignored, never enforced.
One toolserver node per user; each acts only with its own user's authority. The host node (local only, TOOLSERVER_PERMIT_HUB=1) is the auth delegator: when one user needs something another user owns, the request goes to the hub over a unix socket (the kernel names the caller — no token), and the operator answers deny / once / always (this path) / always (its tree). Nothing is granted up front; "always" answers become standing rules. The owning user's node performs the action, so no Unix permission is ever loosened.
abstract-permit read /srv/other/notes.md --reason "why" # requester (waits up to --wait s) abstract-permit watch # operator: prompts as they arrive abstract-permit rules | revoke ID | log | nodes Every non-hub node connects out to the hub at start and registers as the node for its uid. Refused outright: paths owned by the requester itself, by root, by a user with no node, and anything under .ssh / .gnupg. Tables: permit_rules, permit_requests. Session keys (hps_) cannot call permit/*.
Session keys and the router (2026-10-08). Every session registers with its user's node at start (abstract-toolserver session register --hook from a SessionStart hook) and gets a rotating key tsa_… (24 h, 15 min overlap on rotation; the hub stores only its hash). abstract-toolserver session headers prints {"Authorization": "Bearer tsa_…", "X-Session-Id": …}, rotating when close to expiry — usable as an MCP headersHelper. Nodes accept tsa_ keys of their own user (verified by the hub) with the full tool surface, except the console-only authorization decisions (permit_answer, permit_revoke, permit_node_forget). abstract-toolserver router (default 127.0.0.1:7210) is the one public entry point: it routes by session id to that session's node and streams the response; nodes stay on loopback. A request with no session key but the operator token goes to the host node (the hub's node), which checks the token — how a client-side console (hugpy Station) reaches the permit hub and how seat reporters report.
serve refuses only when this user already has a live node (one node per user); other users' nodes on the host are not duplicates. The consumer hook ensure_endpoint (hugpy orbit) still uses an existing host toolserver rather than starting one.
The station's ◳ canvas tab (⬚ design = wireframe.v1, ⋔ flow = flow.v1) and every seat share ONE copy per (locus, kind) in the canvas table:
Writes fire on the locus_change bus (table canvas, id = kind) so open drawers reload live. Through abstract-claude mcp these are the Claude Code tools canvas_get / canvas_put / canvas_list.
b_ask(question, text= | ledger_locus=,ledger_task= | path=, model=) sends the source plus the question to B, the fleet's local model, and returns {answer, excerpts[], model, source, chars, clipped}. Excerpts are verbatim passages from the source; B is told never to invent content. This is how an agent reads an oversized ledger or file without loading it whole.
comms_ping writes a durable [ping] board row, then (0.0.47+) makes a best-effort live push to the target locus's registered pointer.serve_url (POST /api/session/message, to=keeper, wait=false, 5 s, never blocks; result.push reports pushed to …). The lookup ignores the registry's archive status. from_/to ids must match [a-z0-9][a-z0-9_-]{0,62} — no colons. kind=message rows are drained into the target Station's mail tab and auto-closed.
exchange_ingest_transcript (rolling.py prime_transcript) turns a Claude Code transcript into exchanges rows, one per operator message:
rolling_reduce.py is deterministic — no model call. It folds primed exchange rows into objective / done / in_progress / blockers / next_steps / key_paths / open_questions / init_prompt (each list capped at 30). Since 0.0.48, tool-failure blockers expire once newer turns arrive, prose blockers drop when the objective changes, and nothing expires on an empty slice. Station's banner shows blockers[0..3] of /api/frontier/state. An optional model polish (HANDOFF_POLISH=1, HANDOFF_POLISH_MODEL, ≤30 s, skipped if busy) and the legacy judge fold (HANDOFF_REDUCER=judge) remain available.
abstract-toolserver-mcp exposes every tool as mcp__toolserver__ ; ts_call reaches any tool by name, including ones added after the MCP client loaded its tool list. session_message accepts the cross-locus target :keeper.
Every MCP result over AC_MCP_RESULT_MAX_LINES (200) or AC_MCP_RESULT_MAX_BYTES (16384) is cut to 75 % head + 25 % tail, the full text is archived (exchange_archive_get locus=… source=mcp-result: : ), and a [truncated: …] marker is appended. AC_MCP_GOVERNOR=0 disables it; AC_MCP_GOVERNOR_EXEMPT lists tools never cut (default: the fs_read_* tools and exchange_archive_get). Prefer b_ask over reading a truncated result.
Three things the bridge does for tools that take many optional arguments, refuse a call or return pictures (since the 2026-10-06 releases):
One Flask service per host: unit 7004_hugpy_toolserver (gunicorn as vm_mgr, 127.0.0.1:7004) running an editable install of the dev tree, so a service restart picks up source edits without a publish. Discovery writes endpoint.json. Token resolution order: HUGPY_TOOLSERVER_TOKEN → TOOLSERVER_OPERATOR_TOKEN → TOOLSERVER_TOKEN → HUGPY_OPERATOR_TOKEN → STATION_CONSOLE_TOOLSERVER_TOKEN → env files. Auth fails closed when no token is set; /ch/ channels and per-client token paths are exempt; the /vms/ page uses cookie auth.
server files web media db ui claude gpt fileshare
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.




