Inspiration

AI agents are becoming capable of handling increasingly complex financial tasks, from reconciling invoices to managing business transactions. But there's a major challenge: what happens when AI agents representing different companies need to make a financial decision together?

Each company has its own financial interests, information, and approval limits. An AI agent might find a better way to settle payments, but that doesn't mean it has permission to commit its company to that arrangement.

We built ContraOS around one question: How can independent financial agents work together without exceeding the authority humans give them?

What it does

ContraOS is a multi-agent financial coordination platform that allows companies to evaluate and authorize shared settlement proposals while maintaining independent control over their financial decisions.

Our demonstration involves three companies with $47,000 in reciprocal financial obligations.

ContraOS calculates a settlement proposal requiring just $8,000 in net transfers, assuming the companies have agreed to the necessary clearing arrangement. Each company's autonomous agent evaluates the proposal against financial limits established by its own finance officer. All three agents accept, and the initial proposal is authorized.

Then something changes.

Our Gemini-powered evidence investigator identifies a potential $2,000 discrepancy between an invoice and delivery records. After Company C's authorized officer confirms and files the dispute, ContraOS automatically creates an updated settlement proposal.

The revised arrangement now requires Company A to pay $10,000 instead of $8,000.

This is where ContraOS becomes different from a traditional reconciliation tool:

Company B's agent: Automatically accepts the revised settlement.

Company C's agent: Automatically accepts the revised settlement.

Company A's agent: Refuses because its finance officer only authorized payments up to $9,000.

Even though two agents approve, ContraOS blocks the overall settlement from being authorized.

Only when Company A's finance officer explicitly increases its limit can its agent reevaluate the proposal and accept.

The result: autonomous financial coordination without sacrificing human authority.

ContraOS demonstrates settlement authorization, not actual money transfers.

How we built it

We built ContraOS using React, TypeScript, Vite, Convex, and Google Gemini, separating AI-powered investigation from the financial rules that must be enforced reliably.

Convex powers the coordination system. It stores financial obligations, company policies, settlement proposals, agent decisions, and audit records. Its real-time queries keep the interfaces synchronized, while backend mutations and scheduled functions coordinate changes and agent reevaluations.

Our financial engine handles the calculations. Written in TypeScript, it calculates net settlement positions, validates proposed transfers, and checks each company's independent financial policy. Financial amounts are represented in integer cents to avoid floating-point errors.

Gemini powers evidence investigation. It analyzes invoice and delivery information to identify potential discrepancies and provide supporting references. The backend independently validates financial amounts before a company officer can authorize a dispute.

We also implemented versioned proposals and policies. When new evidence changes an agreement, the original proposal is superseded, agents must evaluate the new version, and the backend verifies that every required authorization is current.

This architecture ensures that AI can help investigate and coordinate decisions without being allowed to override financial controls.

Challenges we ran into

The biggest challenge was designing a system where multiple autonomous agents could coordinate without any one agent controlling the entire agreement.

We needed to address three important problems:

Keeping agreements current: A previously approved settlement must become invalid when new evidence changes the underlying obligations.

Enforcing independent authority: An agent cannot approve a transaction beyond its company's financial limits, even when other companies have already accepted.

Making AI decisions trustworthy: An AI-generated discrepancy cannot automatically become an accepted financial fact. It must be checked against reliable records and confirmed through an authorized process.

We addressed these challenges through deterministic financial validation, versioned decisions, atomic backend updates, and human-controlled policy changes.

Accomplishments that we're proud of

Our biggest accomplishment is building a working demonstration of independent autonomous decisions with enforceable human oversight.

We're particularly proud that ContraOS can:

Calculate a coordinated settlement across three companies.

Independently evaluate each company's financial constraints.

Detect and validate a potential financial discrepancy with AI assistance.

Automatically replace an outdated settlement with a revised proposal.

Allow two agents to accept while correctly escalating the third.

Prevent authorization until the appropriate human grants additional authority.

Maintain an auditable record of proposals, decisions, and policy changes.

Our latest verification report recorded 54 passing automated tests and 45 successful live browser-and-backend checks.

Most importantly, the authorization controls are enforced by the backend rather than simply displayed as warnings in the interface.

What we learned

Building ContraOS helped us understand that making AI systems more autonomous also requires making their authority more precise.

An agent can make decisions automatically without having unlimited permission to act. The important distinction is between what an AI system can recommend, what its organization has authorized, and what the underlying financial evidence actually supports.

We also learned the value of separating AI reasoning from deterministic financial logic. AI is useful for interpreting complicated documents and identifying possible problems, but financial calculations and authorization rules need to remain independently verifiable.

What's next for ContraOS

Our current prototype demonstrates the core coordination and authorization workflow using synthetic financial records.

Next, we want to expand ContraOS with:

Integration with real accounting and enterprise financial systems.

More sophisticated financial evidence investigation and exception handling.

Support for larger networks of companies and more complex financial obligations.

Stronger production-grade identity, access controls, and organizational authorization.

Exploration of regulated settlement integrations with appropriate legal and compliance safeguards.

Our broader vision is a financial infrastructure layer where independently governed AI agents can collaborate across organizations while every consequential decision remains explainable, auditable, and within human-granted authority.

Agents coordinate. Humans govern. Every decision is verifiable.

Built With

Share this project:

Updates

Submission history