Inspiration
I wanted a business agent that could support a founder who handles everything: marketing decisions, budgets, approvals, and follow-up. Giving an AI a goal is useful, but giving it unrestricted authority over money creates a different problem.
AgentAllowance starts with a practical question: how can an AI recommend a useful purchase while the business owner keeps clear control over whether money may move? The answer is to separate commercial reasoning, financial authorization, and payment execution.
What it does
AgentAllowance is a single-owner workspace for a marketing growth agent. The owner sets a goal, a monthly allowance, an automatic spending limit, a maximum transaction amount, and allowed or blocked categories. The agent evaluates a curated opportunity and returns a purchase recommendation, a skip recommendation, or a request for more information, together with reasoning and confidence.
A purchase recommendation passes through a deterministic policy engine. A small, permitted purchase can be automatically authorized; a larger permitted purchase requires owner approval; a prohibited category, excessive amount, or insufficient allowance blocks it. An owner approval does not itself complete a payment, and it cannot override a policy block.
The prototype illustrates these boundaries with an $18 newsletter sponsorship, a $45 premium placement, and a $70 gift card. It includes transaction history and an audit trail that distinguishes AI evaluations, policy decisions, owner actions, payment events, and failures. Each event shows the related opportunity and amount when available. Key events can be filtered separately from routine evaluations.
Authorized purchases have a server-side PayPal Sandbox checkout integration, with payer approval separate from business authorization. A clearly labeled simulated payment mode supports repeatable local demos. Marketplace listings are seeded examples; the prototype does not discover arbitrary merchants or make unattended purchases.
How we built it
I built the workspace with Next.js, React, TypeScript, and CSS, with server routes owning financial transitions and provider credentials. OpenAI supplies strict JSON-schema recommendations, which Zod validates before the application uses them. Invalid responses or provider failures stop authorization instead of silently falling back to a purchase recommendation.
The policy engine works in integer USD cents. It checks categories, activity, transaction limits, and available allowance independently of the language model. The PayPal Orders v2 Sandbox adapter implements order creation, payer redirection, and capture reconciliation. It verifies the completed capture and exact USD amount before recording completed spending.
SQLite provides durable local storage. A PostgreSQL adapter is also implemented for persistent hosted environments. Checkout reserves allowance inside a locked state transition before contacting PayPal, and stable request identifiers support retries. Codex assisted with implementation and verification during development.
Challenges we ran into
The main engineering challenge was preserving the meaning of each financial state. A recommendation is not authorization, an approval is not a payment, and an unconfirmed provider response must not release funds that may already be committed. Reservations, policy rechecks, and capture reconciliation address these boundaries.
Integration testing also exposed a stale-decision issue: after switching from demo AI to a live model, an existing demo proposal could hide the new evaluation. I changed proposal reuse to account for the evaluation model and checkout provider while preserving earlier history. Another iteration made the audit trail easier to scan by replacing identical event rows with explicit outcomes, category icons, and emphasis for important financial events.
Accomplishments that we're proud of
The prototype connects opportunity evaluation, deterministic authorization, owner review, checkout state, and an inspectable audit history in one workspace. Its 41 automated tests cover policy boundaries, budget reservations, lifecycle transitions, retry behavior, and provider contracts, as well as event presentation. The production build and TypeScript checks pass, and the interface has been checked in desktop and mobile browsers.
Live OpenAI evaluation has been verified, including a case where the model requested more information and the app correctly authorized no purchase. The interface also makes uncertainty visible: an unevaluated opportunity, a skipped opportunity, a policy block, and an awaiting-payment proposal are distinct states.
What we learned
A useful business agent needs explicit authority boundaries as well as useful reasoning. Confidence and estimated commercial value do not establish permission to spend. Business approval and payer approval must also remain separate.
Readable audit history is part of the product, not just a debugging feature. Showing the outcome, opportunity, amount, and responsible actor helps an owner understand what happened without decoding IDs or long raw responses. Historical events must describe what was true when they occurred, even if a payment completed later.
What's next for AgentAllowance
The next direction is a practical operating assistant for solo founders and small teams. Planned additions include user-created spending requests with supplier information and evidence, structured budgets and OKRs, requests that remain reviewable when AI needs more information, and follow-up against actual business outcomes.
For teams, the roadmap separates requester, approver, and payment roles so Marketing, a CEO, and an authorized accountant can coordinate without sharing unrestricted access. For a one-person business, one owner can perform those roles while the agent tracks missing information and outstanding decisions. These capabilities are planned; the current prototype has one shared owner workspace and seeded opportunities.
Before extending payment capabilities, the next verification milestone is a buyer-approved PayPal Sandbox order and capture, followed by deployment and reconciliation improvements.

Log in or sign up for Devpost to join the conversation.