Examples

Normative test vectors. Encoders and decoders MUST be able to round-trip these.

Wire format primer

Size & token comparison

PayloadBytes (JSON)Bytes (AXF)Tokens (JSON)Tokens (AXF)AXF savings
tool-call414164~135~58~57%
chat-message~340200~95~52~45%

tool-call — JSON vs AXF

tool-call.json414 bytes

{
  "formatica_version": "1.0",
  "schema": "tc:weather.v1",
  "request_id": "8a3f",
  "header": {
    "role": "assistant",
    "timestamp": 1745515200,
    "conversation_id": "c_9b2e"
  },
  "tool_call": {
    "name": "get_weather",
    "arguments": {
      "location": "Austin, TX",
      "units": "imperial",
      "when": "now"
    }
  },
  "metadata": {
    "priority": "normal",
    "timeout_ms": 5000
  }
}

tool-call.axf164 bytes

FX*1.0*tc:weather.v1*req:8a3f~
H*role:assistant*ts:1745515200*conv:c_9b2e~
TC*get_weather*loc:Austin,TX*units:imperial*when:now~
M*priority:normal*timeout:5000~
E~

chat-message.axf

FX*1.0*cm:chat.v1*msg:m_4421~
H*role:user*ts:1745515260*conv:c_9b2e~
T*Hey, can you check the weather in Austin and book me a table at Franklin BBQ for tomorrow at 7?~
A*intent:multi_tool*lang:en~
E~

A user-authored chat message with annotation segment.

Segment tags used

Download raw files: downloads →