Challenges we ran into

Protocol design is an unsolved field. No standard for... has been found! How to negotiate amongst the LLM agents. We drew on Contract Could not implement Net Protocol (CNP) and ANAC's alternating-offers protocol but had to Create and type the majority of the message format.

Structured output reliability: Getting Gemini to reliably produce A strict Pydantic schema was used to match the data structure with valid JSON, while low temperature was required. Injection of schema into all system prompts and 3-retry fallback loop. If this doesn't happen, agent messages silently violate the protocol.

Two agents with fully incompatible constraints - Deadlock handling. would loop forever. Building the Mediator Agent to detect and break the game.Creating the Mediator Agent to detect and break the game. The most difficult thing to find was a way to deadlocks — without just overriding the other agents. A complex engineering challenge of the project.

Agents should not give out their full name or their full title. This would break the negotiation if they were connected to each other via a utility function. Transform a problem into a basic optimisation problem. Implementing to_agent_view() To remove private fields from broadcasts without removal Creating the audit log was tricky.

or letting up on the concession. too soon (all bad) or not at all (dead lock). Using a concession curve that increases over round: number generated natural negotiation dynamics.


We've achieved some great things, and here are a few of our proudest achievements.

A working typed A2A protocol - the NegotiationMessage schema is an independent technical contribution which can be incorporated into any multi-agent framework. could adopt.

No API keys required for schema tests – 42 unit tests! Agent tests with Pydantic. The entire test suite is executed offline.

  • Real negotiation dynamics — agents make concessions and visibly argue, and achieve results that would not have been achieved by any one agent alone. The Cost Agent and Quality Agent are really at odds and really at odds. resolve it.

Every concession, counter-concession, proposal, and reasoning trace stored in Redis and can be retrieved by API. Any negotiation session can be replayed and the reasons for the outcome clearly understood.

Live Dashboard — monitoring four agents in an actual negotiation The system is updated per round using the scores from screen. Easy to understand by non-technical judges.


What we learned

Early versions had agents negotiating forever. An additional walk away threshold was added to negotiations. They converge automatically — just as in the real world, as predicted by real world bargaining theory.

The message bus is as much important as the LLM Redis pub/sub with The architectural choice that proved to be the right one was an append-only audit log. replay, debugging, and the rest of it — was made possible by that.That made everything else possible. It is the foundation for dashboard., all.

In fact, the concepts of Game theory translate surprisingly well to LLM. Because developed for human, concession curves, pareto optimality, and BATNA should be used for human. When used for LLM agents, is used almost directly by negotiators. structured utility functions.

The structured output discipline compounds. Every hour we spent A lot of hours were saved in debugging the schema and the retry logic as they are hardened. Unpredicted failures of the agents downstream.


How to take the next steps with NegotiateAI.The future of NegotiateAI.

  • More domains — sprint planning, hospital resource scheduling, Optimization of the supply chain and participation in climate policy negotiations.

on their experiences.Agent learning — agents which change their utility weights according to their experiences. Reinforcement learning for negotiating on past negotiation outcomes.

  • Open protocol standard — share the NegotiationMessage schema It is an open specification that the community can build on as like for like. How OpenAPI has standardised REST APIs.How OpenAPI has standardised REST APIs.

Compare the protocol with adversarial agent testing when one agent attempts to cheat the system, or misrepresent its utility function

  • Human in the loop mode — provide human intervention as an alternative to one agent's negotiate directly with other AI agents, and sit on the seat during negotiation

Built With

Share this project:

Updates

Submission history