-
-
Financial freedom, with a boundary that cannot be negotiated.
-
$6.98 requested. Limit exceeded. Nothing charged.
-
A real AI independently chooses five paid tools under a PayPal-backed budget.
-
Five commitments, one capture, independently verified against PayPal.
-
One gateway. Any agent. Deterministic financial enforcement.
Inspiration
An AI agent can be told not to spend more than $10. But what actually stops it from spending $10.01?
That question eventually became PASHADHARA.
I've always been interested in the relationship between autonomy and authority. We want increasingly intelligent systems that can reason, make decisions, use tools, and act independently. But the more freedom we give them, the more important it becomes to understand where that freedom ends.
I kept coming back to one distinction: instructions are not enforcement. A language model can be persuaded, confused, or simply make a mistake. A financial boundary shouldn't depend on whether the model remembers its instructions.
I wanted to build something where an agent could exercise genuine judgment without being entrusted with unlimited financial authority.
The name PASHADHARA comes from Sanskrit. Pāśa refers to a bond or noose, while dhara means bearer. That idea became the foundation of both the architecture and the visual identity.
The goal was never to make agents less autonomous. It was to make their autonomy financially accountable.
What it does
PASHADHARA is a PayPal-backed financial enforcement gateway for autonomous AI agents, built around the Model Context Protocol (MCP).
A user approves a PayPal authorization hold. PASHADHARA uses that authorization to establish a spending lease, with deterministic limits enforced before paid tools execute.
The agent decides what it wants to do. PASHADHARA decides whether that action is financially permitted.
The system supports:
- PayPal-backed spending authority: A real sandbox authorization establishes the financial boundary.
- Pre-execution enforcement: Requests exceeding the available budget or unsettled spending limit are refused before the paid tool runs.
- MCP interoperability: External AI clients can discover and invoke tools through a standard MCP interface.
- Idempotent execution: Retrying an already processed request returns its recorded result without executing or charging twice.
- Financial journaling: Commitments, refusals, receipts, and settlement records create an inspectable financial trail.
- Capture and reconciliation: Multiple small commitments can be settled together and independently checked against PayPal.
- Explicit provenance: Live readings, recorded executions, computed values, fixtures, and illustrative simulations are identified separately.
I also wanted people to understand the system without having to read the source code.
The interface represents the authorization through a suspended vessel, while a tightening rope illustrates the financial boundary around agents. As spending changes, the visual system communicates what remains available, what has been committed, and what gets refused.
It's financial infrastructure given a physical form.
How we built it
I built PASHADHARA using TypeScript, Next.js, PostgreSQL, PayPal Sandbox REST APIs, and MCP, with the application deployed through Vercel.
The architecture separates two responsibilities.
The language model handles reasoning, tool selection, and decisions. A deterministic financial kernel handles authentication, pricing, spending authority, idempotency, and ledger commitments.
That separation is intentional. The model doesn't get to decide whether its own purchase is affordable.
One of the most important experiments involved connecting a real Claude Haiku agent through the public MCP interface to investigate synthetic invoice data.
I gave it access to different paid finance tools under a $0.20 PayPal sandbox authorization.
The model discovered its available tools and checked whether a $0.20 evidence bundle was affordable. It was. But instead of purchasing the bundle, the model independently chose five individual $0.02 lookups.
Those decisions produced five financial commitments totaling $0.10.
I subsequently captured that $0.10 through PayPal Sandbox and independently retrieved the authorization and capture records. The financial journal matched all five receipts, five commitment groups, and the capture allocations.
The run scored 9 out of 12 against synthetic invoice labels. That's one nondeterministic execution, not a benchmark superiority claim.
The recorded agent workflow is presented inside PASHADHARA alongside separate demonstrations of refusals, budget checks, and settlement.
Everything financial happened in PayPal Sandbox. No real money moved.
Challenges we ran into
The difficult part wasn't making an AI call a tool. It was making the financial consequences of that call reliable.
I had to work through questions that become surprisingly complicated once you stop treating payments as simple API responses.
What happens when a paid tool succeeds but its response is lost? What if the agent retries? What if two requests arrive simultaneously? What if the authorization still has money, but the unsettled spending limit has already been reached?
I couldn't rely on the model to handle those cases correctly. The enforcement had to live outside its control.
Another challenge was PayPal's authorization and settlement lifecycle. Authorized money, committed money, captured money, and spendable money aren't interchangeable.
Then there were the economics.
In the real $0.10 sandbox capture, PayPal reported a $0.10 fee. The entire captured amount was consumed by that fee. That was an important finding because it demonstrated why capturing every tiny tool purchase individually isn't necessarily economically viable.
On the frontend, I faced a different challenge: making all this understandable.
Financial infrastructure is usually presented through tables, dashboards, and technical documentation. I wanted the mechanism itself to become the visual language, without allowing the design to obscure the evidence.
Throughout development, I repeatedly subjected the implementation to adversarial reviews, integration tests, and independent financial verification. Some findings forced me to revisit assumptions rather than simply polish what was already there.
That process improved the product considerably.
Accomplishments that we're proud of
I'm particularly proud that PASHADHARA's central idea is supported by an actual working financial mechanism, not just a compelling interface.
A real language model independently selected paid tools. The gateway enforced the financial rules. Actual PayPal sandbox capture records agreed with the local journal.
I also verified important failure conditions, including over-budget refusals, idempotent replays, and cases where a refused tool must not execute or create a financial commitment.
The system has a working MCP integration, financial receipts, settlement evidence, and an interface that distinguishes what happened live from what was recorded or simulated.
I'm equally proud of the visual identity.
I didn't want another interchangeable AI dashboard. The rope, suspended vessel, typography, colors, and interaction design all emerged from the same underlying idea: permission has a boundary, and that boundary should be visible.
PASHADHARA is an attempt to make technical correctness and visual communication reinforce one another.
What we learned
The biggest lesson was that intelligence and authority do not need to reside in the same system.
An agent can make sophisticated, probabilistic decisions while its financial permissions remain deterministic.
I also learned how much complexity exists between authorizing money and actually settling it. Concurrency, retries, idempotency, fees, and reconciliation aren't secondary implementation details. They're fundamental to whether an autonomous financial system can be trusted.
Another lesson was the importance of evidence.
A successful demo is useful, but a result that can be traced through actual tool calls, financial commitments, database records, and independent PayPal responses is far more convincing.
And perhaps most importantly, I learned that designing something to look trustworthy is fundamentally different from engineering something that deserves trust.
I wanted PASHADHARA to do both.
What's next for PASHADHARA
I want to take PASHADHARA beyond a hackathon demonstration and explore how financially bounded autonomy can work across practical agent ecosystems.
That includes expanding meaningful MCP tool integrations, improving external-client compatibility, developing more realistic autonomous workflows, and investigating settlement strategies that make small agent purchases economically viable.
I'm also interested in stronger delegation models, where different agents can operate under explicitly constrained financial permissions without requiring a human to approve every individual action.
There is still work to do, particularly around broader production readiness, economics, and reproducible real-world validation.
But the underlying principle is one I intend to keep exploring.
An agent should be free to act exactly as far as it was trusted, and not one cent further.
That's PASHADHARA.
Built by Nikhil Puri.
Built With
- anthropic-claude
- claude-haiku-5.5
- docker
- github
- hono
- mcp
- mcp-typescript-sdk
- model-context-protocol
- next.js
- node.js
- openai-codex
- openai-gpt-6
- paypal-orders-api
- paypal-payouts-api
- paypal-rest-api
- paypal-sandbox
- playwright
- postgresql
- react
- rest-api
- supabase
- typescript
- vercel
- xai-grok
- zod