Inspiration# Inspiration
Human language is a deeply inefficient interface for machines. When AI agents communicate using natural language, they waste tokens on redundancy, politeness, and ambiguity—things humans need, but agents don’t. We wanted to give developers a way to design and optimize agent communication itself, instead of endlessly hand-tuning prompts.
Sponsors
ElevenLabs Providing the text-to-speech API for the frontend demo.
Cline Coding backend and generating elevator pitchand devpost submission.
Macroscope Reviewing PRs
What it does
This project is a developer library for generating and optimizing AI agent communication protocols.
Developers define agents and tasks, and the library automatically discovers a compact, machine-efficient language specification that agents can use to collaborate with fewer tokens while preserving task quality.
Example of a communication protocol
Single msg; no greetings/Qs. Minimal tokens via fixed field order + optional defaults.
Format (3 lines max):
1) `M? d=<min> z=<tz> w=<Mon–Fri> p=<pref>`
2) `T: <D><hh-hh,hh-hh>;<D><...>` (Tom busy, only within w)
3) `J: <D><hh-hh,hh-hh>;<D><...>` (Jerry busy, only within w)
4) `=> <D><hh:mm-hh:mm> | A1 <...> | A2 <...>` (final + 2 alts; best overlap per p)
Conventions:
- Days: `Mo Tu We Th Fr Sa Su`.
- Time: 24h; omit `:00` (use `9-11`, `14-15`), keep minutes only when needed (`12:30-13`).
- Combine same-day blocks with commas; separate days with semicolons.
- If a party has no conflicts in w: `T: -` or `J: -`.
- Assume workday 09-17 local unless w specifies otherwise.
Example:
`M? d=30 z=ET w=Mo-Fr p=earliest`
`T: Mo9-11,14-15;Tu10-12;Th13-14;Fr15-16`
`J: Mo10-12,15-17;We9-10,14-16;Th11-12`
`=> Tu12:30-13 | A1 We10:30-11 | A2 Fr10-10:30`
How it can be used (example)
agent_a = Agent(
name="Scheduler A",
role="Manages Tom's calendar"
)
agent_b = Agent(
name="Scheduler B",
role="Manages Jerry's calendar"
)
protocol = CommunicationProtocol(
rules="Initial natural-language protocol",
agents=[agent_a, agent_b]
)
optimizer = Optimizer(protocol)
best_protocol = await optimizer.optimize(
input_prompts=[
"Schedule a meeting this week",
"Find the earliest available time"
]
)
print(best_protocol.rule)
The output is a machine-optimized communication protocol that developers can reuse across runs, agents, or production systems.
How evolution works
The optimizer evolves the language description that defines how agents communicate. Each round, we prompt the LLM to generate variations of the current language description. To evaluate each variant, the system has agents actually use that language to complete example tasks, then measures the total tokens exchanged during their communication. The language description that enables agents to complete tasks with the fewest tokens becomes the new baseline for the next round. In the next round, we generate new variations from the current best performing lagnuage and repeat the process.
Frontend demo
To make the system tangible, we also built a modern web frontend that wraps around the library.
Built With
- anthropic
- claude
- cline
- elevenlabs
- macroscope
Log in or sign up for Devpost to join the conversation.