ClearFills Documentation (v0.8.0)
ClearFills is an open-core portfolio firewall and execution OS for AI agents. Connect Claude Code, Codex, Cursor, Windsurf, ChatGPT, or custom Python agents over MCP without handing them brokerage passwords or wallet keys. Every order passes through deterministic Python risk invariants, RFC 8785 canonical hashing, 120-second single-use Ed25519 policy tickets, and optional Touch ID WebAuthn P-256 human co-signing before reaching IBKR, Alpaca, Kalshi v2, or Polymarket CLOB.
Documentation Sections
- Quickstart (/docs/quickstart): 15-second offline verification with
pip install clearfillsandclearfills benchmark. - Remote & Local MCP Setup (/docs/mcp): OAuth 2.1 Remote MCP (17 propose-only tools;
decide_approvalremoved from/mcp) and local stdio MCP. - Risk Guardrails & Mandates (/docs/guardrails): Built-In Guard Packs (Core Risk, Tax & Cross-Border, Compliance) plus unlimited Custom User Guards.
- Venues & Enclave Deployment (/docs/ibkr): IBKR TWS/Gateway, Alpaca OTO/Bracket, Kalshi v2 RSA-PSS, Polymarket MetaMask EIP-712, and Fly.io/Nitro Enclave kits.
- Workspace, Alerts & Lab (/docs/workspace): Paper/Live isolation, PWA Push/Telegram/Email/SMS alerts, Sub-Desks, and Epistemic Lab.
- Security & Trust Model (/docs/security): RFC 8785, split-key Ed25519,
py_webauthn, and Docker UID isolation. - Technical Deep Dive & Honest Threat Model (/docs/deep-dive): Cryptographic verification spec and explicit deployment threat boundaries.
- CLI & API Reference (/docs/reference): All 12
clearfillsCLI subcommands and REST endpoints.
Open Core (Apache-2.0) vs. ClearFills Cloud
| Module / Capability | Distribution | What Is Included |
|---|---|---|
| Deterministic Risk Firewall & Custom Guards | Open Core (Apache-2.0) | Limit-only orders, mandatory hard stops, NLV/heat caps, cumulative intraday notional and order-rate limits, kill-switch, and @firewall.guard plugins. |
| RFC 8785 Canonical Hashing & Split-Key Ed25519 Verifier | Open Core (Apache-2.0) | Deterministic JCS order digest (approval_hash), 120s single-use Ed25519 attestation tickets, nonce replay protection, and SHA-256 hash-chained audit ledger. |
WebAuthn P-256 Passkey Verifier (py_webauthn) |
Open Core (Apache-2.0) | Independent local verification of Touch ID, Face ID, and hardware security key signatures bound to sha256(nonce:approval_hash). |
Local IBKR clearfills watch Worker & Docker Isolation Kit |
Open Core (Apache-2.0) | Atomic claim loop, 50 bps fresh-quote collar, IBKR parent/child bracket dispatch, and deploy/isolated-worker/ Docker isolation separating worker UIDs from local AI agents. |
| Strategy Envelopes & Local MCP / CLI | Open Core (Apache-2.0) | Signed CPU strategy envelopes, plain-English policy compiler, local stdio MCP server (clearfills mcp), and policy regression suite (clearfills benchmark). |
| Hosted Multi-Entity Console & SnapTrade Sync | ClearFills Cloud | Unified Personal + OpCo + HoldCo + Trust net worth console, 1-tap Approval Inbox, sub-desks with scoped agent keys, and read-only SnapTrade (20+ brokerages) sync. |
| Cloud Venue Adapters & Multi-Channel Alerts | ClearFills Cloud | Hosted Alpaca Paper/Live, Kalshi v2, and Polymarket CLOB coordination, plus Push (Mobile & Web), Telegram, Email, SMS, and Slack alerts. |
| Tax, FX & Epistemic Compliance Engines | ClearFills Cloud | CCPC $50k SBD passive-income tracker, cross-entity wash-sale and superficial-loss guard, Canada-US Treaty Art. XXI & PFIC checks, FX spread router, and SEC EDGAR XBRL verifier. |
Explore more: Home | /audit | /docs | /docs/security | /docs/deep-dive | /challenge | /console | /llms.txt