A unified, deployment-ready system that integrates the Chromium/WebGPU Launcher as the GPU-accelerated runtime environment with the Booster v2.0 Implicit Contract Enforcement on-chain layer — producing a single launchable agentic system where agents discover hardware, prove VDF/STARK computations via WebGPU, and have their access governed by implicit on-chain agreements.
graph TD
A["Agent Request"] --> B["Orchestrator (FastAPI)"]
B --> C["GPU Discovery"]
B --> D["Implicit Agreement Gate"]
D --> E["On-Chain Contract Check"]
E -->|Fulfilled| F["WebGPU Session Launch"]
E -->|Not Fulfilled| G["Escrow Flow"]
G --> H["Register Holdings"]
H --> I["Deposit Support (5%)"]
I --> J["Oracle Verify"]
J --> F
F --> K["VDF/STARK Proving via WebGPU"]
K --> L["Proof Attestation On-Chain"]
L --> M["Artifact Output"]
C --> F
booster-webgpu-agent/
├── launcher/
│ ├── __init__.py
│ ├── config.py # Unified config (launcher + chain)
│ ├── gpu_detect.py # GPU hardware discovery
│ ├── chromium_finder.py # Chromium binary locator
│ ├── webgpu_flags.py # Flag generation per GPU/OS
│ ├── session.py # Chromium process lifecycle
│ ├── validator.py # Headless WebGPU smoke test
│ ├── external_media.py # External drive discovery
│ └── manager.py # Top-level launcher API
├── chain/
│ ├── __init__.py
│ ├── agreement_gate.py # Implicit agreement client
│ ├── escrow_client.py # SupportEscrow interaction
│ ├── license_checker.py # Soulbound NFT license query
│ └── attestor_client.py # On-chain proof attestation
├── agent/
│ ├── __init__.py
│ ├── orchestrator.py # Unified agent orchestrator
│ ├── proving_worker.py # WebGPU VDF/STARK proving pipeline
│ └── strands_tools.py # Strands @tool wrappers
├── contracts/
│ ├── ImplicitAgreement.sol
│ ├── SupportEscrow.sol
│ ├── EulerCycleAttestorV2.sol
│ └── ClockSpringMath.sol
├── terms/
│ └── booster_v2_terms.json
├── server.py # Unified HTTP API
├── smoke_test.html # WebGPU validation page
├── requirements.txt
├── install.sh
├── deploy_contracts.sh
└── .env
.env# ═══ Launcher Config ═══
CHROMIUM_BINARY_OVERRIDE=
EXTERNAL_MEDIA_ROOT=/mnt/external
PROFILE_BASE_DIR=./profiles
HEADLESS=false
# ═══ Server Config ═══
LAUNCHER_HOST=127.0.0.1
LAUNCHER_PORT=8200
# ═══ Chain Config ═══
RPC_URL=https://mainnet.base.org
CHAIN_ID=8453
ATTESTOR_CONTRACT=
ESCROW_CONTRACT=
APPROVER_ADDRESS=
COLLECTION_BIN=
ORACLE_ADDRESS=
AGENT_PRIVATE_KEY=
# ═══ Orchestrator Config ═══
ORCHESTRATOR_CALLBACK_URL=
MAX_CONVERGENCE_COILS=5
BASE_RISK_THRESHOLD=0.4
PROVING_TIMEOUT_SECONDS=120
requirements.txtfastapi>=0.110
uvicorn>=0.29
psutil>=5.9
pydantic>=2.0
python-dotenv>=1.0
httpx>=0.27
web3>=6.15
eth-account>=0.11
eth-abi>=5.0
launcher/config.py — Unified Configurationfrom __future__ import annotations
import os
from pathlib import Path
from dataclasses import dataclass
from dotenv import load_dotenv
load_dotenv()
@dataclass
class LauncherConfig:
chromium_binary_override: str = os.getenv("CHROMIUM_BINARY_OVERRIDE", "")
external_media_root: Path = Path(os.getenv("EXTERNAL_MEDIA_ROOT", "/mnt/external"))
profile_base_dir: Path = Path(os.getenv("PROFILE_BASE_DIR", "./profiles"))
launcher_host: str = os.getenv("LAUNCHER_HOST", "127.0.0.1")
launcher_port: int = int(os.getenv("LAUNCHER_PORT", "8200"))
headless: bool = os.getenv("HEADLESS", "false").lower() == "true"
# Chain
rpc_url: str = os.getenv("RPC_URL", "<https://mainnet.base.org>")
chain_id: int = int(os.getenv("CHAIN_ID", "8453"))
attestor_contract: str = os.getenv("ATTESTOR_CONTRACT", "")
escrow_contract: str = os.getenv("ESCROW_CONTRACT", "")
approver_address: str = os.getenv("APPROVER_ADDRESS", "")
collection_bin: str = os.getenv("COLLECTION_BIN", "")
oracle_address: str = os.getenv("ORACLE_ADDRESS", "")
agent_private_key: str = os.getenv("AGENT_PRIVATE_KEY", "")
# Orchestrator
orchestrator_callback_url: str = os.getenv("ORCHESTRATOR_CALLBACK_URL", "")
max_convergence_coils: int = int(os.getenv("MAX_CONVERGENCE_COILS", "5"))
base_risk_threshold: float = float(os.getenv("BASE_RISK_THRESHOLD", "0.4"))
proving_timeout_seconds: int = int(os.getenv("PROVING_TIMEOUT_SECONDS", "120"))
def __post_init__(self):
self.profile_base_dir.mkdir(parents=True, exist_ok=True)
CONFIG = LauncherConfig()
chain/agreement_gate.py — Implicit Agreement Client"""
Implicit Agreement Gate.
Queries and enforces the on-chain implicit agreement state.
Any agent that passes through this gate has its agreement status
checked. If unfulfilled, the gate blocks access and returns
the escrow flow instructions.
"""
from __future__ import annotations
import logging
from dataclasses import dataclass
from enum import Enum
from web3 import Web3
from eth_account import Account
from launcher.config import CONFIG
logger = logging.getLogger(__name__)
class AgreementStatus(str, Enum):
NO_AGREEMENT = "no_agreement"
PENDING_HOLDINGS = "pending_holdings"
PENDING_ESCROW = "pending_escrow"
PENDING_VERIFICATION = "pending_verification"
FULFILLED = "fulfilled"
REVOKED = "revoked"
@dataclass
class AgreementState:
agent_address: str
status: AgreementStatus
terms_version: int = 0
terms_hash: str = ""
support_owed: float = 0.0
support_paid: float = 0.0
license_active: bool = False
error: str = ""
# Minimal ABI for the functions we need
ATTESTOR_ABI = [
{
"inputs": [{"name": "agent", "type": "address"}],
"name": "getAgreement",
"outputs": [
{
"components": [
{"name": "agent", "type": "address"},
{"name": "termsVersion", "type": "uint256"},
{"name": "termsHash", "type": "bytes32"},
{"name": "agreedAt", "type": "uint256"},
{"name": "firstTxHash", "type": "bytes32"},
{"name": "fulfilled", "type": "bool"},
{"name": "supportOwed", "type": "uint256"},
{"name": "supportPaid", "type": "uint256"},
],
"name": "",
"type": "tuple",
}
],
"stateMutability": "view",
"type": "function",
},
{
"inputs": [{"name": "agent", "type": "address"}],
"name": "isAgreementFulfilled",
"outputs": [{"name": "", "type": "bool"}],
"stateMutability": "view",
"type": "function",
},
{
"inputs": [{"name": "agent", "type": "address"}],
"name": "isLicensed",
"outputs": [{"name": "", "type": "bool"}],
"stateMutability": "view",
"type": "function",
},
{
"inputs": [{"name": "agent", "type": "address"}],
"name": "hasAgreed",
"outputs": [{"name": "", "type": "bool"}],
"stateMutability": "view",
"type": "function",
},
{
"inputs": [],
"name": "getCurrentTerms",
"outputs": [
{
"components": [
{"name": "termsHash", "type": "bytes32"},
{"name": "termsURI", "type": "string"},
{"name": "effectiveDate", "type": "uint256"},
{"name": "supportRateBps", "type": "uint256"},
{"name": "supportAsset", "type": "string"},
{"name": "licenseGrant", "type": "string"},
{"name": "negotiable", "type": "bool"},
{"name": "active", "type": "bool"},
],
"name": "",
"type": "tuple",
}
],
"stateMutability": "view",
"type": "function",
},
]
class AgreementGate:
"""Queries on-chain agreement state and gates access."""
def __init__(self):
self.w3 = Web3(Web3.HTTPProvider(CONFIG.rpc_url))
self.contract = self.w3.eth.contract(
address=Web3.to_checksum_address(CONFIG.attestor_contract),
abi=ATTESTOR_ABI,
)
def check_agent(self, agent_address: str) -> AgreementState:
"""Full status check for an agent."""
addr = Web3.to_checksum_address(agent_address)
state = AgreementState(agent_address=agent_address, status=AgreementStatus.NO_AGREEMENT)
try:
has_agreed = self.contract.functions.hasAgreed(addr).call()
if not has_agreed:
return state
agreement = self.contract.functions.getAgreement(addr).call()
state.terms_version = agreement[1]
state.terms_hash = agreement[2].hex()
state.support_owed = agreement[6] / 1e18
state.support_paid = agreement[7] / 1e18
is_fulfilled = self.contract.functions.isAgreementFulfilled(addr).call()
is_licensed = self.contract.functions.isLicensed(addr).call()
state.license_active = is_licensed
if is_licensed and is_fulfilled:
state.status = AgreementStatus.FULFILLED
elif is_fulfilled and not is_licensed:
state.status = AgreementStatus.PENDING_VERIFICATION
elif state.support_owed > 0 and state.support_paid < state.support_owed:
state.status = AgreementStatus.PENDING_ESCROW
elif state.support_owed == 0:
state.status = AgreementStatus.PENDING_HOLDINGS
else:
state.status = AgreementStatus.PENDING_VERIFICATION
except Exception as e:
state.error = str(e)
logger.error("Agreement check failed for %s: %s", agent_address, e)
return state
def get_terms(self) -> dict:
"""Fetch current on-chain terms."""
try:
terms = self.contract.functions.getCurrentTerms().call()
return {
"terms_hash": terms[0].hex(),
"terms_uri": terms[1],
"effective_date": terms[2],
"support_rate_bps": terms[3],
"support_asset": terms[4],
"license_grant": terms[5],
"negotiable": terms[6],
"active": terms[7],
}
except Exception as e:
logger.error("Failed to fetch terms: %s", e)
return {"error": str(e)}
def is_access_granted(self, agent_address: str) -> bool:
"""Quick boolean check — is this agent licensed and fulfilled?"""
state = self.check_agent(agent_address)
return state.status == AgreementStatus.FULFILLED and state.license_active