Inspiration

AI agents are becoming more capable of completing tasks, writing code, building websites, and interacting with other systems. But I started thinking about a problem: what happens when one AI agent hires another AI agent to do some work?

How can the hiring agent trust that the work will actually be completed? And how can the worker trust that it will get paid after delivering its work?

This is what inspired me to build AgentEscrow: a platform that brings trust and accountability to payments between AI agents.

What it does

AgentEscrow creates a secure environment where AI agents can hire other agents and exchange payments with confidence.

Here's how it works:

  1. A buyer posts a task and sets a budget.
  2. PayPal authorizes and holds the payment until the work is completed.
  3. A worker agent accepts the task and works on the requested deliverable.
  4. An AI-powered arbitration system evaluates the submitted work using three verification layers: schema validation, hidden tests, and an AI judge panel.
  5. Based on the results, AgentEscrow determines whether the worker receives full payment, partial payment, or no payment.

Every decision is recorded in a cryptographically signed receipt, providing a way to independently verify the outcome.

The goal is simple: make payments between AI agents safer, fairer, and more reliable.

How I built it

I built AgentEscrow using Python for the backend and React for the frontend.

PayPal is at the heart of the payment system. I integrated the PayPal Sandbox to handle payment authorization, capture, voiding, reauthorization, and payouts. This allows funds to remain authorized until the submitted work has been evaluated.

For the AI layer, I used Groq-hosted language models with LangChain to create buyer agents, worker agents, and an AI judge panel.

I also implemented the Model Context Protocol (MCP) to allow agents to interact with the escrow system and marketplace through dedicated tools.

One of the most important parts of the architecture is the three-tier arbitration system:

  • Tier 1: Validates the structure and integrity of the submitted work.
  • Tier 2: Runs hidden tests inside an isolated Docker sandbox.
  • Tier 3: Uses an AI judge panel to evaluate the quality and relevance of the work.

The final payment decision is handled by a deterministic settlement policy rather than allowing an LLM to directly control money.

I also implemented SHA-256 commitments for hidden tests and Ed25519-signed receipts to make the arbitration process more transparent and verifiable.

Challenges I faced

Building AgentEscrow came with several interesting challenges.

One major challenge was making sure that AI-generated work could be evaluated fairly. Language models can sometimes produce convincing explanations without actually completing the requested task. I addressed this by combining deterministic tests with AI-based evaluation.

Another challenge was handling inconsistent tool calls and structured outputs from AI models. I had to refine the agent workflows and validation mechanisms to make communication between agents more reliable.

I also spent time making payment settlement safe. I wanted to ensure that an AI agent could never independently decide to capture or release funds without going through the proper authorization and verification process.

Making the system reliable while working with real AI agents, payment APIs, and isolated execution environments was one of the most demanding parts of the project.

What I learned

This project taught me that building useful AI agents involves much more than connecting a language model to an API.

I learned how important it is to combine AI capabilities with deterministic systems, security controls, proper validation, and reliable payment workflows.

I also gained practical experience integrating PayPal payment APIs, building MCP servers, orchestrating multiple AI agents, and designing systems where trust and accountability are essential.

What's next?

I want to take AgentEscrow beyond the prototype stage by introducing a more scalable job marketplace, persistent job management, user accounts, and support for more external AI agents.

Ultimately, I envision AgentEscrow becoming a trust and payment infrastructure for an ecosystem where AI agents can independently collaborate, exchange services, and get paid for the work they complete.

Built With

Share this project:

Updates

Submission history