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.119 Copy PIP instructions
This package is the toolserver client and service that the rest of the tree pins:
The service itself (comms, ledgers, boards, exchanges, sessions, vault, VMs, the MCP bridge) is the operator's per-host tool service. It is not on the inference path.
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 Package layout Reusable tool implementations live in hugpy_tools. tools.py imports its registry and adds authentication through the app, command authorization, hosted screenshot URLs, node delegation, fleet vision, and persistent services. The catalog imports the same schema builder used by standalone discovery. Existing endpoint names, arguments, and result formats remain supported; native tools such as fs/read_text are also exposed.
Install both packages from this checkout to exercise the split before release:
pip install -e ../hugpy_tools -e '.[server]' Backend extras (files, web, render, images, media, ui) depend on the corresponding hugpy-tools extras. Base client imports need no server stack.
The implementation is grouped by responsibility, following the package layout used by hugpy_wrapper:
src/abstract_toolserver/ imports/ shared constants, functions, classes, and init_imports support/ shared helpers, prompts, instructions, and Claude paths transport/ channels, clients, messages, routing, and session auth records/ database access, boards, sessions, handoffs, and metrics fleet/ boxes, nodes, packages, seats, vault, and VMs visual/ browser, screen, image, and vision tools station/ station adapter and views routes/ HTTP route registration The package root retains the service entry points (app, cli, mcp, terminal, and tools). Import subsystem modules directly from their owning packages, such as abstract_toolserver.transport.channels and abstract_toolserver.records.sessions. Shared visual implementations live in hugpy_tools.visual (aim, grid, and image).
The imports/ layer groups shared code by purpose:
Generic argument parsing, SQL quoting, environment-file parsing, and terminal text sanitization/cell measurement live in hugpy-resources, which is a direct package dependency. Portable tools and backend adapters come from hugpy-tools. The former station/views/text.py implementation has been removed; its consumers import the shared Resources implementation through the external import boundary.
from abstract_toolserver.imports.constants import DEFAULT_URL from abstract_toolserver.imports.functions.commands import assert_cmd_allowed from abstract_toolserver.imports.classes import ToolError from abstract_toolserver.imports.init_imports import json from hugpy_resources.imports.functions.environment import parse_env_file Both constants and functions are distributed from their directory's __init__.py. The shared layer remains dependency-light: importing it does not connect to services or load optional server, database, GUI, or image backends.
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/*.
Login grants (2026-10-08). abstract-permit login --hours N asks to log in AS another account on this host. On approval the requester's node makes an ed25519 key (~/.ssh/permit/grant-N, never leaves the requester), the owner's node adds the public key to the owner's authorized_keys restricted to from="127.0.0.1,::1",restrict,pty,command="… login-shell --grant N", and the request's note carries the exact ssh -i … @127.0.0.1 line. Every login runs through the shim, which records start/end, the ssh client and the command in permit_logins (abstract-permit logins), and everything done that way acts as — and is audited as — the owner. Expiry/revoke removes the key line (owner's node) and the private key (requester's node).
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.
Every user its own node (2026-10-08). abstract-toolserver node install --user U --port P (root) installs the shared template abstract-toolserver-node@.service (the node runs AS the user from the root-owned shared venv), writes ~U/.config/abstract-toolserver/toolserver.env (127.0.0.1:P, own token, own database toolserver_U, peer auth), creates the role/database, enables and starts abstract-toolserver-node@U, then adds the NODE_ID journal drop-in. Idempotent.
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):
On ae (2026-10-15), the host-side services run from the system venv /opt/abstract-toolserver/venv (0.0.91). They do not run an editable install of this tree, so a source edit reaches them only through a rebuilt install.
Discovery writes endpoint.json. Tokens are resolved in this order:
Auth fails closed when no token is set. /ch/ channels and per-client token paths are exempt. The /vms/ page uses cookie auth.
Subcommands that cli.main dispatches before argparse, so they are missing from --help: db, logs, router, acl, provider, session, node install|status|update and login-shell.
The service uses abstract_database.Database (0.0.2.201 or newer). Client/MCP installs do not need a database of their own: they call a running toolserver. The server extra requires Python 3.11 or newer.
pip install 'abstract-toolserver[server]' abstract-toolserver serve --host 127.0.0.1 --port 7004 Without database configuration, the service creates ~/.config/abstract-toolserver/toolserver.sqlite3 (or the same filename under ABSTRACT_TOOLSERVER_HOME). SQLite requires version 3.38 or newer and no separate database daemon. To select a different persistent file, set:
export TOOLSERVER_DATABASE_URL='sqlite:////absolute/path/toolserver.sqlite3' abstract-toolserver db migrate abstract-toolserver db status --json TOOLSERVER_DATABASE_URL can also be set in the protected toolserver.env file selected by TOOLSERVER_ENV_FILE. A postgresql:// URL selects PostgreSQL; pip install 'abstract-toolserver[postgres]' installs the explicit server/driver extra. Version 0.0.2.201 of abstract_database also declares psycopg as a base package dependency, so that version still installs the driver for SQLite users; SQLite itself does not use it.
Existing SOLCATCHER_POSTGRESQL_* configuration remains supported and takes precedence over the SQLite default. Partial or unreachable PostgreSQL settings fail explicitly; they never fall back to an empty database. Explicit abstract-toolserver db install retains its PostgreSQL provisioning commands. Changing a backend opens that backend; it does not copy or delete existing data.
Boards, comms, session records, archives, and the agent-facing HTTP API use the selected backend. SQLite uses reserved write transactions for atomic queue claims and read/modify/write operations. Schema upgrades use a cross-process file lock; PostgreSQL retains advisory locks and row locks. The event stream uses bounded, persistent change records with SQLite triggers and polling, and LISTEN/NOTIFY with PostgreSQL. Event messages remain hints to reload authoritative records.
Per-user node install --db sqlite skips PostgreSQL provisioning. Its private state uses SQLite while shared records retain TOOLSERVER_STORE=hub forwarding; set TOOLSERVER_STORE=local explicitly for a standalone authority. The default node install mode remains --db host for existing deployments. PostgreSQL server administration tools (role/database provisioning and DB grants) still require a PostgreSQL server; choosing SQLite only replaces the toolserver record store.
Proxy/router and hugpy-agent clients need no database URL or driver changes. They continue calling the same configured toolserver endpoint. A remote backend still needs a running service process, regardless of which database it uses.
Install hugpy-tools[documents] or abstract-toolserver[documents] to use document_extract, document_inspect, document_page, and document_search. They call the same media_intelligence.documents engine as Media directly, without a Media HTTP server. Extraction runs in a bounded child process and returns cached artifacts, page references, geometry and completeness status. OCR defaults to off; auto and force use the configured Hugpy OCR backend. Pass the same store_root to extraction and later page/search calls when using a custom artifact store. File authorization belongs to the caller, as for the other local file tools.
The base package remains light. Parsers load only when a document tool is called. The media extra includes document support, and no longer installs legacy OCR/pandas packages or local model runtimes. Existing media_* model tools retain the Media transport and their existing contracts.
server files web render images media documents db postgres ui claude gpt fileshare
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
None of the files in this release were uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




