⚡ About Rico

💡 What Inspired Us

Founders and engineering teams lose thousands of dollars each month to silent subscription price hikes, forgotten trial renewals, and unused SaaS seats. While modern AI models can search and find discounts, giving an autonomous agent direct access to company credit cards is risky—a single hallucination could lead to unintended charges or drained budgets.

We built Rico to solve this problem: an autonomous financial operations (FinOps) and agentic commerce platform. Rico combines real-time browser price verification with cryptographically protected, human-supervised payment execution through PayPal.


🛠️ How We Built It

Rico pairs multi-model AI reasoning with strict, deterministic code-level guardrails:

  • Real Browser Scouting (Playwright CDP): Headless Chromium workers navigate live vendor checkout pages, inspect real DOM pricing, and capture timestamped visual screenshots as proof of purchase.
  • Dual-Rail PayPal Integration:
    • Primary Rail: Direct integration with PayPal Orders v2 and the PayPal AI Toolkit (Model Context Protocol / MCP) using deterministic idempotent request headers.
    • Secondary Rail: Tokenized card failover via PayPal Vault v3.
  • Four-Tier Financial Safety Engine:
    • Hard Budget Ceiling: Strictly blocks any transaction if cumulative spending exceeds the authorized budget: $$ \sum T_{\text{period}} + T_{\text{new}} \le B_{\text{max}} $$
    • Price Spike Anomaly Hold: Automatically pauses checkout if scraped prices exceed the expected baseline by 20% or more: $$ \frac{P_{\text{scraped}} - P_{\text{baseline}}}{P_{\text{baseline}}} \ge 0.20 $$
    • Two-Step HMAC Confirmation: The AI can only generate quotes. Fund capture requires user confirmation with an HMAC-signed token expiring in (\Delta t \le 15\text{ min}).
    • Period Idempotency: PostgreSQL row locks (FOR UPDATE) prevent duplicate charges within the active billing cycle.
  • FinOps Intelligence: Identifies over \$300,000 in startup grants and cloud credits (AWS Activate, PostHog, Notion), extracts receipt line items using OCR, and dispatches one-click approval prompts to Telegram, WhatsApp, and Slack.

🧗 Challenges We Faced

  1. Preventing AI Hallucinations in Financial Flows: LLMs cannot be trusted with raw credentials or blind execution. We separated AI reasoning from execution by isolating all payments behind server-side validation and cryptographic tokens.
  2. Handling Dynamic Checkout Pages: Modern SaaS checkout flows frequently change. We solved this by pairing DOM extraction with visual screenshot verification, giving users full visibility into what the agent sees.
  3. Fail-Closed Network Resilience: Network drops during checkout can cause duplicate charges. We implemented deterministic PayPal-Request-Id headers and stateful reconciliation to guarantee safety.

📚 What We Learned

  • Financial Guardrails Must Live in Code, Not Prompts: System prompts can be bypassed; hard spending limits must be enforced by atomic database transactions and cryptographic tokens.
  • PayPal MCP Unlocks Agentic Commerce: Using PayPal's Model Context Protocol tools lets AI agents inspect orders, check payment statuses, and trigger payouts safely and composably.
  • Visual Proof Builds User Trust: Giving users timestamped browser screenshots and mathematical cost breakdowns transforms user skepticism into high confidence when delegating purchases to AI.

Built With

Share this project:

Updates

Submission history