api-architect
Compile API specs into first-class Hermes tools.
unbrowse turns pages into text. api-architect compiles API specs — OpenAPI /
Swagger / Postman — into schema-checked Hermes tools: validated calls through
one audited network guard, credentials scoped to a host the owner pinned, and
manifests that survive the session. It doesn't read the documentation; it
compiles it.
Status: work-in-progress for the Hermes Agent Plugin Hackathon (submission due 2026-11-11, 5PM EST).
Tools
| Tool | What it does | State |
|---|---|---|
architect_learn | Fetch a spec URL (OpenAPI 3 JSON / Swagger 2 / Postman v2.1), compile endpoints+params with per-endpoint provenance into a manifest | ✅ working |
architect_commit | Draft → active (human-visible review + human approval; commits REPLACE an active manifest of the same slug) | ✅ working |
architect_list | Learned APIs, persistent across sessions | ✅ working |
api_call | Schema-checked execution; invalid params fail locally, never as server 400s; non-GET calls go through the human approval gate | ✅ working |
Design commitments (disclosure — catalog rule 13)
- Network: fetches user-supplied URLs (specs) and calls committed API hosts.
Private networks (loopback, RFC 1918, link-local, ULA) are blocked by
default; opt-inallow_private_hostsin settings. Requests carry
request_timeout_sand response size caps; redirects are not followed at v0. - Credentials are host-scoped by the OWNER, not by the model. Each secret
slot has a companion setting the model can never write:api_key_1_host/
api_key_2_host, an exact hostname (e.g.api.openweathermap.org). A commit
that binds a slot is refused unless the manifest's hostname equals that
value exactly, and the call path re-checks it against the manifest's recorded
host before the secret leaves the store — so a poisoned spec
(servers[0].urlpointing somewhere else, which is how alearn → commit → callinjection would exfiltrate a key) simply has nowhere to send it. If the
owner re-points a slot, every older manifest for the previous host stops
sending its credential. Slots resolve through Hermes secret routes
(config_schematypesecretread viaagent.secret_scopeat call time);
manifests store the slot name and the approved hostname, never the value.
No.env/auth.json/keychain access; no OAuth flows at v0. - Destructive policy — a human gate, not a flag. The plugin registers a
pre_tool_callhook:architect_commitand every non-GETapi_callare
escalated to Hermes' human approval gate ({"action": "approve", ...}with
the<method> <host><path>in the prompt), and both are blocked inside cron
runs viactx.current_cron_execution(). There is noconfirmargument to
set: the handlers refuse unless that hook cleared the exact call (and refuse
outright in cron), so the calling model cannot authorize its own write. The
spec's own metadata never authorizes anything (the spec can lie). - No hallucinated endpoints: every endpoint in a manifest carries
provenance (where in the doc it was read). No spec found →endpoints: []
plus an honest message. - No telemetry. Nothing leaves the machine except the calls the user asked for.
- Zero Python dependencies at v0 (stdlib only) — nothing to consent, nothing to break on NixOS.
Compatibility
- Hermes
>=0.22.0(manifest v2, plugin API 1) · Python 3.11–3.14 · Windows/macOS/Linux. - Manifests persist in the plugin data dir (
plugin-data/api-architect/manifests/), survive
update/remove, and are profile-scoped.
Development
Run tests: python -m unittest discover tests (stdlib).
Day-by-day build plan and the Red/Blue decision behind this design live in a private
planning vault (not published here).
Test scope (honest)
python -m unittest discover tests— 281 tests: 208 module tests (digest, parsers,
netguard, redactor, secrets_bridge) + the red-lens regression suite
(tests/test_redlens_fixes.py, from an external adversarial audit of this
code) + the catalog-review suite (tests/test_review_gates.py: one class per
blocker of the 2026-11-10 maintainer review — host-scoped slots, the
pre_tool_callgate, cron refusal, commit-replaces-active, disclosure
alignment) + the handler-stack tests: pure stdlib, no network except loopback
servers inside netguard's own tests.tests/test_handlers.pyruns the FULL handler stack (learn → draft refusal →
commit → list → api_call) with a mocked network adapter, and skips cleanly
where Hermes core is not importable (bare machines): the four tool handlers
sit onplugin_data_dir/ctx, which exist only inside a Hermes host.- Covered so far on Python 3.12 (Ubuntu) and 3.14 (Windows + Android/Termux).
The 3.11 floor (core's minimum) is untested at this time — declared.
v0 security limits (stated, not hidden)
- DNS rebinding, pre-pin: the guard resolves ONCE, validates the addresses,
and pins the connection to the validated IP (SNI/Host keep the hostname). A
resolver POISONED beforeguarded_fetchis called can still hand us an
attacker-controlled but public-looking IP — out of scope at v0. - TLS: system trust store, standard certificate + hostname verification; no
client certs, no public-key pinning, no TLS fingerprint handling. - Proxies: none — direct socket connection only.
- Compression: never negotiated (
Accept-Encoding: identityforced); the
byte cap counts ordinary network bytes; a server that gzip-stamps anyway gets
its data read opaquely (we do not decompress). - Approval grain and its limits: the hook keys the
[a]lwaysallowlist on
api-architect:nonget:<host>(calls) andapi-architect:commit:<slug>
(commits) — permanently allowing one host's non-GET calls is a deliberate
owner choice, not a default. The hook's clearance for a single call is a
single-use, 3-minute ticket held in plugin memory; the handler refuses a
non-GET call or a commit it has no ticket for, so a dispatch path that skips
the hook cannot execute one either. Inside cron everything is refused before
the approval gate is even consulted, whateverapprovals.cron_modesays. - Numeric/IPv6-smuggled private addresses (decimal/hex hosts,
::ffff:…,
NAT64/6to4/Teredo) ARE denied by the guard (tested).
License
MIT — © 2026 Jose Juan Moñino Coll (monyinet)
README from the reviewed commit 6c115c8; it updates when the author re-pins.

monyinet