mngr_forward
Auth + agent-origin forwarding plugin for mngr.
Origins are keyed by agent id (the canonical coordinate; legacy host-<hex>
origins from older persisted URLs are redirected to it).
mngr forward runs a local proxy that serves
[<service>.]<agent-id>.localhost:<port>/* and byte-forwards each request to
the matching backend. The bare agent-<hex>.localhost origin maps to the
configured backend (--service NAME, the default workflow, or a fixed remote
port via --forward-port REMOTE_PORT); <service>.agent-<hex>.localhost
origins map to that agent-registered service (an Imbue Studio workspace's chat is
one: a registered app served at its own chat origin), and deeper labels
(sub.<service>.agent-<hex>.localhost) route to the same service -- they are
the service's own sub-origin space. Remote agents are reached via a per-host
SSH tunnel.
The plugin is opt-in:
mngr plugin enable forward
mngr forward --service system_interface
Quick start (browser user)
mngr forward --service system_interface --open-browser
This listens on 127.0.0.1:8421, prints a one-time login URL to stderr (or
emits a login_url JSONL event on stdout with --format jsonl), and streams
discovered agents and their events to stdout as a merged JSONL stream wrapped
in a {stream, agent_id?, payload} envelope. After the browser visits the
login URL, navigations to agent-<hex>.localhost:8421/ are byte-forwarded to
that host's resolved system_interface URL through an SSH tunnel, and
<service>.agent-<hex>.localhost:8421/ reaches any other registered service.
One session cookie (set with Domain=agent-<hex>.localhost by the /goto/
bridge) covers the whole workspace-origin family.
Reverse tunnels
--reverse <remote-port>:<local-port> (repeatable) auto-sets up reverse SSH
tunnels for every known agent on a remote host. The <remote-port> may be
0 to ask sshd for a dynamic assignment; the actual bound port is reported
in a forward.reverse_tunnel_established envelope event.
Manual mode
--no-observe --forward-port REMOTE_PORT runs mngr list --format json once
and forwards a fixed snapshot. --no-observe is invalid with --service NAME.
Sub-process integration
Consumers (notably minds run) can spawn mngr forward --format jsonl --preauth-cookie <opaque-token>, parse the envelope JSONL stream off stdout,
and pre-set the mngr_forward_session cookie in their browser session so the
OTP flow is bypassed.
For plain browsers (which cannot pre-set cookies programmatically), the
consumer can additionally pass --browser-bridge-token <opaque-token> and
302 an already-authenticated browser to
/_bridge?token=<opaque-token>&next=<path>; the plugin sets the bare-origin
session cookie and redirects onward -- no OTP consumed.
Embedding (iframes)
Workspace origins are designed to be embeddable in an iframe by a trusted host application (the Imbue Studio chrome). Two pieces make this work:
- Cookies: on the TLS path (
--use-http2) session cookies areSameSite=None; Secure; Partitionedso they are sent from inside a cross-site iframe. The plain-HTTP path keepsSameSite=Lax(theNoneattribute requiresSecure), so embedding is unsupported without TLS. - frame-ancestors: the proxy APPENDS a
Content-Security-Policy: frame-ancestors ...header to every proxied workspace response. The default policy denies external embedding ('self'+ the workspace's own origin family only); pass--embedder-origin <scheme://host[:port]>(repeatable) to allow specific embedders. This is a deliberate, narrow carve-out from the plugin's byte-forwarding purity: the proxy may add response headers (a service's own CSP still applies -- multiple CSP headers compose by intersection), but never touches bodies or existing headers.
Breaking change note: earlier versions sent no frame-ancestors header
at all, so any page could iframe a workspace origin. The default is now
deny-external; embedders must be allowlisted via --embedder-origin.
Per-agent request headers
A host application can have the proxy stamp headers of its own onto every
request it forwards, with --request-headers-file <path>. The file is one
JSON object: each key is an agent id (agent-<hex>) or "*", and each value
maps header names to string values:
{
"*": {"X-Example-Requester": "owner"},
"agent-<hex>": {"X-Example-Requester": "owner:alice"}
}
On every proxied HTTP request and WebSocket handshake to an agent, the proxy
first deletes any inbound header whose name (case-insensitively) appears
anywhere in the file -- the union over every entry, so a page served by one
agent can never smuggle a header another agent's entry controls -- and then
sets the agent's own entry, else the "*" entry, else nothing. Header names
must be valid tokens and may not be request framing (Host,
Content-Length, Transfer-Encoding) or hop-by-hop headers (Connection,
Upgrade, ...); a file that names one is malformed as a whole.
The file is stat'ed per request and re-parsed when its mtime or size changes, so the host application can rewrite it at any time (atomically, to avoid a torn read); a malformed file is logged once per change and treated as empty. Without the flag nothing is stripped or stamped. The proxy attaches no meaning to the headers: what they carry is the host application's contract with the services behind its agents.
TLS trust for plain browsers
With --use-http2 the proxy serves leaf certificates minted per startup from
a persistent local CA (stored under $MNGR_HOST_DIR/plugin/forward/ca/). Run
mngr forward --trust-ca
once to install that CA into your platform's trust stores (macOS login keychain; Linux per-user NSS database used by Chrome), after which browsers accept every workspace origin without certificate warnings. The Imbue Studio Electron app pins that CA programmatically (the backend hands it the certificate's path) and does not need this.
Status
Experimental.
Metadata
Release files for imbue-mngr-forward 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| imbue_mngr_forward-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for imbue_mngr_forward-0.2.1-py3-none-any.whl |
Release files / imbue_mngr_forward-0.2.1-py3-none-any.whl
| Download URL | imbue_mngr_forward-0.2.1-py3-none-any.whl |
|---|---|
| Size | 125.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5ae13e4cd0515951bff3237afe27bf6318c41f7bb971ba9147bdb7fbf619abcd
|
|
BLAKE2b-256 checksum How to use checksums |
fb09da8423e398b5a69dbbae7d2b7bd9e9919aef0686490742f074590a4cd42d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logSecurity for imbue-mngr-forward 0.2.1
Provenance
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.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for imbue_mngr_forward-0.2.1-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logA note on package security
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.