NEW Workflows: agents follow the steps, you sign off. Read more →
Ulpi

TradePreflight

PLUGIN

Deterministic, fail-closed execution firewall for AI-initiated equity orders.

by Mohamedhazeem · v0.1.0

What it does

Deterministic, fail-closed execution firewall for AI-initiated equity orders. A pre_tool_call hook normalizes broker-specific trade calls into one canonical order, evaluates it against an operator-owned policy (gross buy notional cap, max quantity, symbol / order-type / side allowlists) and blocks anything it cannot prove compliant; every decision and execution outcome is recorded in SQLite.

Ships two paper-trading execution tools with deliberately different broker schemas (symbol/side/quantity/limit_price vs ticker/direction/qty/price), a read-only dry-run tool, a policy inspector and an audit reader. Disclosure - no network calls, telemetry, shell commands, background processes or stored credentials; no requires_env; reads only its own shipped policies/default.json (copied once into the plugin data directory to seed the operator policy) and writes only inside plugin_data_dir('trade-preflight') (the policy file and the SQLite audit/ledger database); execution is simulated locally in SQLite and never reaches a broker or a real trading venue, so the plugin adds no real trading capability; the policy file is operator-owned and an agent with unrestricted shell access as the same OS user could modify it, which is a documented limitation rather than a guarantee.

Tools it adds

The tools an agent gets once this plugin is installed.

  • paper_place_order_a
  • paper_place_order_b
  • trade_check
  • trade_policy_get
  • trade_audit

Review notes

What an owner reads and accepts before the install is approved.

  • Ulpi has not reviewed this version: it is listed in the public plugin catalog, and the install still fetches it at its pinned commit, checks its shape and scans it before you approve

More in Tools

All listings →