Skip to content
AgentMesh

AgentMesh

AI-Powered Negotiations, Settled on Chain

Created on 28th February 2026

•

AgentMesh

AgentMesh

AI-Powered Negotiations, Settled on Chain

The problem AgentMesh solves

Every day, billions of people get stuck in the same exhausting loop — endless back-and-forth just to reach a simple agreement.

"Where should we eat?" → 12 messages, no decision.
"How do we split this bill?" → awkward silence.
"What's your rate for this project?" → three days of negotiation anxiety.

These aren't rare edge cases. Coordination and negotiation are things every person does, every single day — and there's no tool that actually handles it for you. Until now.


What People Use It For

🍽️ Group Plans & Social Decisions

Deciding on a restaurant, a movie, a weekend trip — with 3+ people, it becomes a nightmare of conflicting preferences. AgentMesh lets everyone state what they want privately, and the agents work it out, recommending real places with real reviews and prices.

💸 Splitting Bills & Expenses

Roommates splitting rent, friends dividing a dinner bill, colleagues sharing a cab — AgentMesh calculates fair splits and generates a one-tap UPI payment link so the money actually moves, not just the conversation.

🤝 Freelance & Rate Negotiations

A freelancer and a client both tell their agents their budget limits. The agents negotiate autonomously and reach a rate, timeline, and scope — without the awkwardness of humans haggling directly. The final deal is hashed on-chain, so there's no "I never agreed to that" later.

🛒 Marketplace & Secondhand Haggling

Buying or selling something used? Instead of the classic "₹5000" → "₹2000" → ghosted routine, both parties' agents negotiate to a mutually satisfying price, fast and without ego.

📅 Scheduling & Availability

Coordinating a meeting time across 4 people's calendars is a full-time job. AgentMesh agents cross-reference everyone's constraints and return one confirmed time — no 20-message thread required.

🏠 Shared Living Decisions

Flatmates deciding on chores, house rules, shared expenses, or even "should we get a cat?" — structured, fair, and recorded so no one can claim they weren't consulted.


How It Makes Existing Tasks Safer

Beyond convenience, AgentMesh adds a layer of trust and proof that informal agreements completely lack:

  • 📝 No more "he said, she said" — every resolved agreement is cryptographically hashed and stored on the Polygon blockchain. It's permanent, tamper-proof, and independently verifiable by anyone.
  • 🔗 A shareable proof link — after any agreement, both parties get a PolygonScan link that proves what was agreed and when, down to the minute.
  • 🤖 Neutral ground — your agent advocates for you, the other person's agent advocates for them, and neither agent has an ego, a bad mood, or a history with the other person. The outcome is based purely on preferences, not pressure.
  • 💬 Private preferences — you tell your agent your real budget or constraints privately. The other party never sees your ceiling — only the outcome the agents agreed on.

The Simplest Way to Put It

AgentMesh turns the most friction-heavy, awkward, and forgettable moments of daily life — "let's figure out the details later" — into fast, fair, and provable agreements.

You just say what you want. Your agent does the rest.

Challenges we ran into

Building AgentMesh in 24 hours meant every hour counted — and the bugs didn't care about our deadline. Here are the real walls we hit, and how we broke through them.


🤖 1. Getting Two AI Agents to Actually Disagree (Without Breaking)

The problem: When we first set up agent-to-agent negotiation, both agents would immediately agree on the very first round — every single time. Gemini, by default, is cooperative and polite. Agent A would propose something, and Agent B would just... accept it. No negotiation. No back-and-forth. Just instant agreement, which made the entire product pointless.

What we tried: We tweaked the system prompt to make agents "more assertive." That went too far the other way — agents would refuse to concede at all and negotiations never resolved.

How we fixed it: We built a structured negotiation protocol with explicit round tracking, concession thresholds, and a JSON schema that forced agents to return not just a counter-proposal, but a concession_percentage and satisfaction_score with every response. Once agents had to quantify how much they were giving up, the negotiation dynamics became realistic — they'd hold firm early, then gradually concede as rounds progressed, just like real humans do.


🔗 2. The Webhook Timing Problem — Agents Talking Over Each Other

The problem: In a multi-party negotiation, Agent A sends a proposal to Agent B via webhook. Agent B processes it and responds. Simple in theory. In practice, Telegram's message delivery, our Flask server, and Gemini's inference time created a race condition — Agent B would sometimes receive two messages before it had responded to the first, causing it to generate a response to the wrong proposal entirely.

How we fixed it: We implemented a simple but effective message queue with a negotiation_state lock in SQLite. Before any agent could send a message, it had to check that the negotiation was in AWAITING_RESPONSE state and flip it to PROCESSING. If the state wasn't right, the message was held. It wasn't elegant, but it made agent turns strictly sequential and the race condition disappeared completely.


🎙️ 3. ElevenLabs Voice Notes — The File That Wouldn't Send

The problem: ElevenLabs returns audio as a binary stream. Telegram's send_voice API requires an .ogg file encoded in Opus format. We were getting the audio, saving it as .mp3, and trying to send it — and Telegram was silently rejecting it every time. No error. Just no voice note appearing in the chat.

How we fixed it: Two-part fix. First, we used ffmpeg to convert the ElevenLabs MP3 output to OGG Opus format on the fly before sending. Second, we discovered Telegram also requires the file to be under a certain size — long summaries were being clipped. We added a character limit to the voice summary prompt so the generated audio always stays within Telegram's voice note size constraints.


⛓️ 4. Blockchain Proof Timing — The Transaction That "Never Happened"

The problem: After a negotiation resolved, we'd hash the agreement, submit it to Polygon Amoy, and immediately try to generate a PolygonScan link to send to the user. Half the time, the link would 404 — because the transaction was submitted but hadn't been confirmed in a block yet. Users were getting a "proof" link that showed nothing.

How we fixed it: We separated proof submission from proof delivery. The resolution message is sent to users instantly. The blockchain submission happens asynchronously in a background thread. Once we receive a confirmed transaction hash from the RPC endpoint (with a simple polling loop checking eth_getTransactionReceipt), then we send a follow-up message with the verified PolygonScan link. The user now gets two messages — an instant resolution, and a "✅ Your agreement has been verified on-chain" a few seconds later — which actually felt more trustworthy than getting both at once.


💸 5. UPI Deep Links — The Rupee Symbol That Broke Everything

The problem: UPI deep links follow a specific URI format: upi://pay?pa=...&pn=...&am=...&cu=INR. Straightforward. Except when the agent calculated a split and the amount contained a decimal (like ₹ 412.50), the deep link would silently fail to open in GPay. No error, just nothing happening when tapped.

How we fixed it: The ₹ symbol and certain special characters in the UPI string were not being URL-encoded before being embedded in the deep link. A single urllib.parse.urlencode() call fixed the payment link. We also capped amounts to 2 decimal places to match UPI's expected format. Embarrassingly simple fix for something that took 45 minutes to debug.


🧠 6. Gemini Refusing to Stay in JSON Mode

The problem: We rely on Gemini returning structured JSON every round so our parser can extract proposals, scores, and concession data cleanly. About 1 in 8 responses, Gemini would return a perfectly g

Tracks Applied (3)

Ethereum Track

AgentMesh uses Polygon Amoy (Ethereum's EVM-compatible L2) as its trust and verification layer. Every time two agents re...Read More
ETHIndia

ETHIndia

Gemini API

AgentMesh is built entirely around the Gemini 3 Flash API as its core intelligence layer. Every negotiation in AgentMesh...Read More
Major League Hacking

Major League Hacking

ElevenLabs

AgentMesh uses ElevenLabs Text-to-Speech to deliver the final negotiation resolution as a voice note directly inside Tel...Read More
Major League Hacking

Major League Hacking

Cheer Project

Cheering for a project means supporting a project you like with as little as 0.0025 ETH. Right now, you can Cheer using ETH on Arbitrum, Optimism and Base.

Discussion

Builders also viewed

See more projects on Devfolio