Inspiration
AI agents are becoming increasingly capable of negotiating, purchasing services, and making decisions on behalf of people. But there is a fundamental difference between an agent proposing a transaction and a person actually authorizing one.
What happens if an agent exceeds its budget, exposes a private spending limit, changes previously approved terms, or attempts to initiate payment without permission?
We built Pact to address this problem.
Our vision was to create a marketplace where customers and businesses could delegate negotiation to AI agents without surrendering control over their money, contractual obligations, or final decisions.
Rather than treating an AI conversation as a binding agreement, Pact introduces a trusted system that independently validates proposals and preserves human authority.
What it does
Pact is a prototype of an agent mediated service marketplace.
A business can publish a service with a public asking price and a private minimum acceptable price. A customer can discover that service, describe a project, set a private budget, and authorize an agent to negotiate.
The agents work toward mutually acceptable terms, while Pact enforces the constraints established by their respective users.
Once a proposal is reached, the transaction does not automatically become binding. Both participants must independently approve the same contract version.
Pact also supports submitting deliverable evidence, checking that evidence against structural requirements, collecting customer review, and preserving a shared audit history.
The public interactive marketplace uses deterministic agents so visitors can explore these mechanics without API credentials or financial risk.
Separately, our guided demonstration presents genuine recorded AI negotiation, an actual host rejection of an unauthorized proposal, and a historical PayPal sandbox transaction confirmed as paid.
How we built it
We developed Pact using Python, FastAPI, React, TypeScript, and PostgreSQL.
The backend manages service listings, participant sessions, negotiation state, authorization policies, contracts, evidence checks, and audit records.
The frontend exposes separate customer and business workspaces alongside a guided demonstration that explains Pact's principal capabilities.
Our agent system uses structured negotiation proposals with distinct buyer and seller objectives. The trusted host validates proposed actions independently of the model, rather than allowing generated text to directly modify contractual or financial state.
We evaluated genuine AI negotiation using GPT 4.1 mini and preserved authentic responses for the public demonstration. The hosted interactive marketplace instead runs deterministic agents.
For payment integration, we implemented a PayPal sandbox adapter using OAuth and the Invoicing API. Its capabilities include invoice creation, authorization controls, provider state retrieval, and reconciliation.
We validated the payment integration with a historical sandbox invoice that reached PAID status, with $300 received and $0 outstanding.
The application is deployed on Vercel, with PostgreSQL used to persist shared marketplace state.
Challenges we ran into
One of our most difficult challenges was separating autonomous agent behavior from actions that require explicit human authority.
A model can generate a convincing offer, but that does not mean it should be permitted to spend money or alter an agreement. We therefore had to design independent validation, private constraint enforcement, contract version checks, and participant authorization.
Another challenge was coordinating two independent users through one persistent transaction. The customer and business must see the same agreement history while preserving their separate identities, permissions, and confidential limits.
Production deployment introduced additional difficulties involving session isolation, trusted request origins, persistent database configuration, and hosting security.
We also encountered an important integration limitation. Although we implemented and tested a PayPal sandbox payment workflow separately, our publicly accessible interactive marketplace does not yet automatically create invoices from newly completed agreements.
This distinction shaped our final demonstration: we show the interactive marketplace, genuine recorded AI behavior, and authentic PayPal payment evidence without implying they all occurred in one uninterrupted transaction.
Accomplishments that we're proud of
We built a working shared marketplace where customers and businesses can negotiate a service agreement, independently approve terms, submit deliverables, and review the outcome.
We implemented trusted host controls that reject unauthorized agent proposals, rather than relying on prompt instructions alone.
We preserved genuine model execution evidence, including a rejected proposal, so that the system's behavior can be inspected rather than simply asserted.
We also integrated with PayPal's developer platform and verified a real sandbox invoice reaching a paid state.
Beyond these individual capabilities, we established a foundation for a marketplace that treats agent autonomy and human authorization as complementary rather than competing goals.
What we learned
The biggest lesson was that a successful AI commerce product requires more than capable agents.
Trust must be enforced through software boundaries, clear permissions, persistent records, and independent verification.
We also learned that completing individual technical components is not the same as completing an integrated user journey. An authentic payment test and a functioning marketplace are valuable, but connecting them into one seamless experience is essential for the product's full vision.
This experience reinforced the importance of developing and testing the complete user journey early, especially when external financial infrastructure is central to the product.
What's next
Our immediate priority is connecting the interactive marketplace directly to the protected PayPal payment workflow.
Once a customer accepts a deliverable, Pact should be able to create the corresponding sandbox invoice with the appropriate authorization, guide the buyer through PayPal checkout, retrieve the provider's payment state, and update the original agreement accordingly.
We also want to expand live AI negotiation, strengthen evaluation against adversarial proposals, and improve contract verification.
Ultimately, we envision Pact as infrastructure for trustworthy agent mediated commerce, where autonomous systems can negotiate efficiently while people retain meaningful control over commitments and payments.
Built With
- 4.1
- api
- css
- fastapi
- gpt
- html
- invoicing
- mini
- openai
- paypal
- postgresql
- python
- react
- sandbox
- typescript
- vercel