Inspiration
Traditional B2B procurement and contract settlements suffer from severe friction. Manual audits, delayed administrative reviews, and hesitation around escrow releases create cash flow bottlenecks for enterprise vendors. We wanted to build a system where trust is programmatic, leveraging AI to audit work and release funds instantly.
What it does
PayAgentic-AI is an autonomous B2B procurement and escrow engine that automates vendor settlements. When a vendor submits milestone deliverables, Meta Llama 3 evaluates the output against contractual requirements in real-time. Once verified, the platform safely releases escrow funds via PayPal REST APIs, while Redis distributed locks prevent duplicate transaction triggers under heavy concurrency.
How we built it
- Backend & API: FastAPI (Python 3.11+) providing robust, auto-generated OpenAPI documentation and high-performance routing.
- AI Compliance Engine: Meta Llama 3 (via Groq API) acting as a zero-shot auditing agent to parse deliverables and return structured JSON verification verdicts.
- Financial Settlements: PayPal REST APIs (Sandbox) to handle programmatic escrow holds and automated payouts.
- Concurrency & Safety: Redis distributed locks (
redis-py) safeguarding payout endpoints against race conditions and double-spending.
Challenges we ran into
Handling concurrency safely across payment gateways was tricky. Ensuring that duplicate webhook requests or simultaneous API triggers couldn't initiate double payouts required implementing strict Redis distributed locking mechanisms around the settlement route.
What we learned
We gained deep experience combining AI agent structured outputs with production-grade financial APIs, ensuring that automated logic has the necessary guardrails before touching real money flows.