DEV Community

Sutr-dev999
Sutr-dev999

Posted on

Binary Encoding for Google A2A (Agent-to-Agent) Protocol

Binary Encoding for Google A2A Protocol

Google's A2A protocol lets agents discover and communicate with each other via agent cards at /.well-known/agent.json.

But A2A messages are verbose JSON. What if you could compress them by 20x?

The Agent Card

A public A2A-compatible binary encoding agent is available at:

https://sutr.lol/.well-known/agent.json
Enter fullscreen mode Exit fullscreen mode

Any A2A client can discover it and use it to encode/decode structured data into fixed-size 2,556-byte binary.

Skills

  • encode — Convert any structured data to 2,556-byte binary
  • decode — Convert binary back to structured data

Why Binary?

JSON Binary
Size 5K-50K bytes 2,556 bytes
Fixed? No Yes
Transport Text Any
Noise tolerance 0% 25%

Use It

pip install bytepack
Enter fullscreen mode Exit fullscreen mode
from bytepack import encode
result = encode({"action": "observe", "domain": "market"})
# Always 2,556 bytes
Enter fullscreen mode Exit fullscreen mode

Also available as:

Top comments (0)