-
-
Rico: An autonomous financial agent with live browser verification, strict spending limits, and safe PayPal payments.
-
How Rico works: AI plans the task, Chromium checks live prices, safety rules block overspending, and PayPal pays safely.
-
Set spending rules in plain English on the left while watching Rico verify real-time prices in a live browser on the right.
-
Calm Pricing Lens strips hidden fees and confusing upsells so you see honest monthly prices before setting a rule.
-
Two-step PayPal checkout: Rico prepares a verified quote first and never charges money until you confirm.
-
Instant payment receipt verified through PayPal Sandbox MCP with Order ID, rule cap savings, and export options.
-
Built-in Guardrail Simulator blocks over-budget charges, sudden price spikes, prompt attacks, and duplicate billing.
-
Connected to PayPal AI Toolkit and MCP servers (GitHub, Slack, Notion, Stripe) from one clean hub.
-
24/7 Price Sentinel catches surprise price hikes early and sends 1-click approve or pause alerts to Telegram and Slack.
⚡ 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
- 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.
- 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.
- Fail-Closed Network Resilience: Network drops during checkout can cause duplicate charges. We implemented deterministic
PayPal-Request-Idheaders 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
- ai-agents
- automation
- chromium
- deepseek
- drizzle-orm
- finops
- gemini-flash
- mcp
- model-context-protocol
- nextjs
- node.js
- ocr
- paypal
- pdf-lib
- playwright
- postgresql
- react
- sqlite
- tailwindcss
- telegram-bot
- typescript