Inspiration

Agentic commerce is arriving rapidly, but trust is lagging behind. Today, when you let an AI shop for you, you either hand it your credit card and hope for the best, or you are forced to approve every single click manually, defeating the purpose of automation. The core trust gap remains: How do you delegate financial authority safely? We wanted to build a third path—scoped, provable delegation.

What it does

Steward AI is a financial governance infrastructure that lets autonomous AI agents purchase goods on your behalf through PayPal, constrained by a strict, machine-enforced "Mandate."

  • The Mandate: You state your intent in plain English (e.g., "Reorder studio supplies, max $120/month, ask me above $60"). Steward converts this into a strict JSON limit policy.
  • The Engine: A 13-rule deterministic policy engine evaluates every cart the agent builds.
  • The Invariant: An AI Risk Reviewer evaluates the context under an "escalate-only" invariant: it can downgrade an approval to a block or a human review, but it never overrides the deterministic engine to authorize a blocked payment.
  • The Proof: Every decision, webhook, and payment state change is written to a SHA-256 hash-chained ledger, making the entire audit trail tamper-evident.

How we built it

We engineered a high-performance SaaS stack utilizing Next.js 15 (App Router), TypeScript, PostgreSQL, and Drizzle ORM, deployed on Render.

  • AI Orchestration: We utilized the Vercel AI SDK to interface with NVIDIA NIM (nemotron-3-ultra-550b-a55b). We built custom backend parsers to safely quarantine the model's <think> reasoning tokens, ensuring strict adherence to Zod schemas.
  • PayPal Integration: We deeply integrated the PayPal Developer Sandbox. Approved transactions flow through PayPal Orders v2 with a two-step creation-then-capture flow, utilizing idempotency keys (sha256(runId + cartHash)). We also implemented strict cryptographic signature verification for PayPal Webhooks.
  • Sponsor Tools: We utilized Channel3 for live product discovery, AG Grid for the interactive audit dashboard, and Render for live edge deployment.

Challenges we ran into

Handling the advanced reasoning tokens (<think>) from the NVIDIA Nemotron model initially broke our strict JSON parsers. We engineered a custom regex extraction pipeline that quarantined reasoning text from JSON execution. Additionally, managing the asynchronous nature of PayPal Orders v2 required us to restructure our capture flow into a robust two-step process to prevent 422 Unprocessable Entity errors.

Accomplishments that we're proud of

We mathematically proved our "Escalate-Only" invariant via Vitest property testing. We also implemented a stateless JWT authentication system with multi-tenant data isolation and database indexing, elevating the project from a hackathon prototype to an enterprise-ready SaaS architecture.

What we learned

We learned that AI agents shouldn't hold the "money switch." LLMs are exceptional at proposing and explaining, but deterministic code must execute the payment.

What's next for Steward AI

Integrating directly with PayPal Agent Ready to become the definitive buyer-side authorization layer for autonomous commerce.

Built With

Share this project:

Updates

Submission history