About Commons
Inspiration
The rise of AI agents is changing how people interact with online businesses. Instead of manually browsing websites and completing purchases, people are increasingly able to delegate these activities to AI agents.
This creates an important challenge for merchants: How can a business determine whether an order placed by an AI agent is trustworthy?
Traditional fraud detection systems often rely on behavioral signals associated with human users. However, AI agents interact with checkout systems differently. Smaller merchants may face a difficult choice between accepting potentially risky agent transactions and rejecting legitimate ones.
We were inspired to explore a different approach: rather than treating trust as a simple accept-or-reject decision, could merchants collaboratively evaluate agent transactions while preserving accountability, privacy and the ability to challenge incorrect decisions?
That idea became Commons.
What We Built
Commons is an explainable, federated AI-powered trust and recovery layer designed for agentic commerce.
Its architecture brings together several complementary capabilities:
- Signed Agent Mandates: Uses Ed25519 digital signatures to verify agent authorization, with expiry, spending limits, transaction constraints, nonce-based replay protection and revocation.
- Explainable Risk Intelligence: Evaluates agent-driven transactions and produces risk scores, decisions and supporting explanations.
- Federated Learning: Simulates merchant-local model training and combines model updates through sample-weighted Federated Averaging (FedAvg), allowing collaboration without exchanging raw customer or order records.
- Governed Immune Learning: Evaluates candidate model updates using safety checks, human approval, model versioning and rollback.
- PayPal Sandbox Integration: Demonstrates a payment workflow involving authorization, risk evaluation and separately controlled capture or void operations.
- Recovery and Auditability: Provides evidence receipts, cryptographic evidence digests, appeals, reviewer decisions and a tamper-evident hash-chain audit trail.
Rather than making trust decisions invisible to merchants, Commons aims to make them explainable, reviewable and accountable.
How We Built It
We approached Commons as a complete system rather than building an isolated machine-learning model.
We first established the transaction trust foundation using cryptographically signed agent mandates. This allowed the system to verify whether an agent was authorized to perform a transaction and whether its mandate constraints were satisfied.
Next, we developed the AI risk engine to evaluate transaction characteristics and generate explainable risk decisions. We then implemented a federated learning workflow in which merchant-local model updates are authenticated and combined using sample-weighted FedAvg.
To address the possibility of new attack patterns, we added a governed model-adaptation process. Candidate updates must pass evaluation and safety checks before human approval, with version tracking and rollback available.
We integrated the workflow with PayPal Sandbox to demonstrate payment authorization and risk evaluation. Importantly, a HOLD decision does not automatically capture or void a payment; payment execution is a separate controlled operation.
Finally, we developed a React dashboard to bring the different components together. It includes Overview, Order Intelligence, Federation Network, Attack Replay Lab, and Recovery & Audit sections, allowing the complete system workflow to be demonstrated in one interface.
The backend uses Python and FastAPI, while the frontend uses React. Cryptographic operations, model artifacts, persistent transaction records and API-based communication connect the individual components.
Challenges We Faced
One of our biggest challenges was designing a trust mechanism for AI agents without depending entirely on traditional human-behavior signals. We addressed this by combining cryptographic authorization with explainable transaction-risk evaluation.
Another challenge was implementing federated learning as more than a visual demonstration. We needed a coordinator protocol that could authenticate merchant updates and validate merchant identity, feature-schema compatibility, model versions and duplicate submissions.
We also had to distinguish between an AI risk decision and an actual payment operation. A transaction being marked HOLD must not be confused with money being captured or refunded. Integrating this distinction into the PayPal Sandbox workflow helped us design a more responsible payment architecture.
Building a governed learning process was another challenge. Automatically accepting every model update could introduce unsafe changes. We therefore incorporated candidate evaluation, explicit human approval, integrity records and rollback.
Finally, connecting security, machine learning, payment processing, recovery workflows and the dashboard into one coherent application required careful integration and testing.
What We Learned
Building Commons taught us that trustworthy AI systems require more than accurate predictions. They also need verifiable authorization, understandable decisions, controlled execution, opportunities for review and reliable records.
We gained practical experience with digital signatures, federated learning, model evaluation, API integration, PayPal Sandbox workflows, cryptographic integrity, and full-stack application development.
Most importantly, we learned that collaboration and accountability can be designed into the architecture of an AI-powered commerce system rather than added as an afterthought.
What's Next
Commons is a working prototype that demonstrates the core trust and recovery architecture. Our next steps include testing with independently deployed merchant environments, strengthening privacy through secure aggregation and differential privacy, evaluating against more realistic agent-driven fraud scenarios, and expanding payment and recovery integrations.
Our vision is simple: agentic commerce should not require merchants to choose between blind trust and blanket rejection. Trust should be verifiable, explainable, collaborative and recoverable.
Commons — Trust. Trade. Thrive.
Built With
- ai
- api
- artificial
- cryptography
- cybersecurity
- digital
- ed25519
- explainable
- fastapi
- federated
- hmac-sha256
- intelligence
- javascript
- learning
- machine
- python
- react
- rest
- sandbox
- scikit-learn
- sha-256
- signatures
- sqlite