Black-box agent wrapping and the local 4B verifier sidecar¶
OpenAdapt works with any closed-source or open-source agent (Claude, GPT, Gemini, Codex, Browser Use, Playwright, or your own Python script) with zero access to your agent's weights.
You never fine-tune, patch, or host your agent's model to use OpenAdapt.
OpenAdapt sits outside the agent as a wrapper or local tool server. When visual
verification or prompt-injection screening is enabled, OpenAdapt's open-source
LoRA adapters (Veto-4B-r6, taint-guard) run solely on OpenAdapt's own local
4B verifier sidecar (~3.15 GB VRAM) on your host.
Architecture boundary¶
What each layer owns¶
| Layer | Runs where | Sees agent weights? | Purpose |
|---|---|---|---|
| Your agent | Cloud API or your own host | Yes (owned by you or the vendor) | Decides which task to run and supplies inputs |
| OpenAdapt wrapper and compiled tool | Local host (openadapt wrap or openadapt agent serve) |
No | Executes compiled workflows at 0 model calls and checks outcomes via deterministic read-back |
| Local 4B verifier sidecar (optional) | Local host (~3.15 GB VRAM) | No | Runs OpenAdapt's open-source LoRA adapters (Veto-4B-r6, taint-guard) on local screenshots with zero screenshot egress |
Why the verifier runs as a separate sidecar¶
- Works with frontier API models. Hosted models like Claude, GPT, and Gemini do not expose weights for LoRA adapters. Running verification on an independent local sidecar lets you keep your preferred frontier agent while still checking outcomes and screening untrusted screen content locally.
- No screenshot egress. When pixel-level checks are needed (for example on Windows RDP, Citrix, or legacy desktop apps), screenshots stay on the local machine and are inspected by the 4B sidecar instead of leaving your network.
- Fast adapter switching. Because the base 4B model stays loaded in ~3.15
GB VRAM, OpenAdapt can swap between small task-specific LoRA adapters
(
Veto-4B-r6for state verification,taint-guardfor prompt-injection detection) without reloading the base model or touching the calling agent.
Quickstart: download and run OpenAdapt/openadapt-veto-4b-r6¶
The OpenAdapt/openadapt-veto-4b-r6 LoRA adapter (81 MB, Apache-2.0) pairs
with Qwen/Qwen3.5-4B in 4-bit NF4 quantization (~3.15 GB VRAM) and outputs a
single verdict token (PASS, VETO, or ABSTAIN).
1. Download from Hugging Face or run via openadapt wrap¶
Download the adapter weights locally:
pip install openadapt huggingface_hub
huggingface-cli download OpenAdapt/openadapt-veto-4b-r6 --local-dir ./veto-4b-r6
Or let openadapt wrap pull the adapter directly from Hugging Face and run it
around any agent command:
2. Serve the shared BYOC sidecar (byoc_veto_server.py)¶
When workstations have no local GPU, run openadapt_flow.byoc_veto_server on a
host or VPC GPU to expose POST /v1/verify and GET /healthz. The server
requires per-tenant API keys, an app allow-list, and server-issued single-use
run bindings, and returns HALT_ESCALATE whenever the verifier abstains or
cannot confirm a save:
from openadapt_flow.byoc_veto_server import create_byoc_veto_server
from openadapt_flow.multi_lora_veto import (
AdapterSpec,
AppAdapterRegistry,
MultiLoraVetoRouter,
TenantScope,
)
# Register OpenAdapt/openadapt-veto-4b-r6 with your local LoRA backend.
base_adapter = AdapterSpec(
adapter_id="veto-4b-r6",
base_model="Qwen/Qwen3.5-4B",
adapter_uri="./veto-4b-r6",
sha256="<adapter-sha256>",
calibrated_threshold=0.5,
tenant_scope=TenantScope.PUBLIC,
)
registry = AppAdapterRegistry(default_base_adapter=base_adapter)
router = MultiLoraVetoRouter(
base_model="Qwen/Qwen3.5-4B",
registry=registry,
backend=local_lora_backend,
)
server = create_byoc_veto_server(
router=router,
tenant_api_keys={"clinic-a": "<tenant-api-key>"},
tenant_allowed_apps={"clinic-a": {"portal-ehr"}},
host="127.0.0.1",
port=8443,
)
server.start()
Verify the sidecar is ready:
Related guides¶
- Connect an agent: expose compiled workflows over local MCP or wrap an existing agent script.
- How a save is checked: deterministic read-back checks and what happens when a save cannot be confirmed.