Skip to main content

DRIXL - Compressed Inter-Agent Communication Language for Multi-Agent AI Systems

Project description

DRIXL
Compressed Inter-Agent Communication Language — Built for Speed, Cost, and Scale

Tests PyPI version Supported Python versions License
Sponsor
Visitors GitHub Stars GitHub Forks

Key Concepts · Verb Vocabulary · Message Format · Context Store · Getting Started · Benchmarks

DRIXL is a compressed inter-agent communication language designed to minimize token usage and maximize value when running multiple AI agents together. Instead of agents exchanging verbose natural language, DRIXL provides a structured, minimal signal format — cutting communication overhead by up to 80%.

One standard. All agents. Zero waste.

from drixl import Message, ContextStore

# Build a compressed inter-agent message
msg = Message.build(
    to="AGT2",
    fr="AGT1",
    msg_type="REQ",
    priority="HIGH",
    actions=["ANLY", "XTRCT"],
    params=["firewall.json", "denied_ips", "out:json"],
    ctx_ref="ref#1"
)
print(msg)
# @to:AGT2 @fr:AGT1 @t:REQ @p:HIGH
# ANLY XTRCT [firewall.json] [denied_ips] [out:json] [ctx:ref#1]

Or parse an incoming DRIXL message:

from drixl import Message

raw = "@to:AGT3 @fr:AGT2 @t:RES @p:MED\nVALD [suspicious_ips:14] [src:threat_db] [out:json] [ctx:ref#1]"
parsed = Message.parse(raw)
print(parsed)
# {'envelope': {'to': 'AGT3', 'fr': 'AGT2', 'type': 'RES', 'priority': 'MED'},
#  'actions': ['VALD'], 'params': ['suspicious_ips:14', 'src:threat_db', 'out:json', 'ctx:ref#1']}

Key Concepts

Why DRIXL?

When multiple AI agents communicate using natural language, tokens are wasted on:

  • Politeness phrases and filler words
  • Redundant context repetition every message
  • Verbose JSON field names
  • Re-explaining roles each turn

DRIXL solves this with three layers:

  • 📦 Compressed Envelope — Minimal header with routing, type, and priority
  • 🗂️ Shared Context Store — Store context once, reference by ID forever
  • 🔤 Verb Shortcodes — Fixed vocabulary of 4–6 letter action codes

Token Savings

Scenario Saving
Per-message compression ~70% reduction
Shared context (no repetition) ~60% reduction
Verb vocabulary vs. prose ~40% reduction
Combined at scale Up to 80% total

Message Format

Every DRIXL message has two parts — an envelope and a body:

@to:AGT2 @fr:AGT1 @t:REQ @p:HIGH
ANLY XTRCT [input_file] [output:json] [ctx:ref#3]

Envelope Fields

Field Values Description
@to Agent ID Recipient agent
@fr Agent ID Sender agent
@t REQ / RES / ERR / FIN Message type
@p HIGH / MED / LOW Priority

Message Types

Type Meaning
REQ Request — asking another agent to perform a task
RES Response — returning results to sender
ERR Error — reporting a failure with details
FIN Finalize — signaling pipeline completion

Verb Vocabulary

DRIXL uses a fixed set of action verbs. All agents share this vocabulary:

Verb Full Meaning Example
ANLY Analyze ANLY [logs.json]
XTRCT Extract XTRCT [denied_ips]
SUMM Summarize SUMM [report.txt] [out:json]
EXEC Execute action EXEC [throttle_ip] [192.168.1.45]
VALD Validate output VALD [result] [schema:strict]
ESCL Escalate to human ESCL [reason:low_confidence]
ROUT Route to agent ROUT [AGT3] [payload:ref#5]
STOR Save to memory STOR [key:last_result] [val:ref#4]
FETCH Retrieve data FETCH [url:https://...] [out:html]
CMPX Compare values CMPX [val_a] [val_b] [out:diff]

Context Store

Instead of repeating context in every message, DRIXL uses a shared Context Store — agents reference context by ID:

from drixl import ContextStore

store = ContextStore()  # Uses in-memory store by default (Redis supported)

# Store context once
store.set("ref#1", "Project: Network security monitoring pipeline")
store.set("ref#2", "Output format: {ip, action, timestamp, confidence}")
store.set("ref#3", "Constraints: no action if confidence < 0.85")

# Agents reference it — never repeat it
print(store.get("ref#1"))  # 'Project: Network security monitoring pipeline'

With Redis backend for multi-agent shared state:

from drixl import ContextStore

store = ContextStore(backend="redis", host="localhost", port=6379)
store.set("ref#1", "Project goal: MikroTik bandwidth monitor")

Getting Started

Installation

DRIXL requires Python 3.10 or higher:

pip install drixl

With Redis context store support:

pip install "drixl[redis]"

Install everything:

pip install "drixl[all]"

Quick Example — 3 Agent Pipeline

from drixl import Message, ContextStore

# Shared context — defined once
store = ContextStore()
store.set("ref#1", "Project: Firewall threat detection")
store.set("ref#2", "Output: JSON array [{ip, count, risk_level}]")

# Agent 1 → Agent 2: Analyze logs
msg_1 = Message.build(
    to="AGT2", fr="AGT1", msg_type="REQ", priority="HIGH",
    actions=["ANLY"], params=["firewall.log", "out:json"],
    ctx_ref="ref#1"
)

# Agent 2 → Agent 3: Validate findings
msg_2 = Message.build(
    to="AGT3", fr="AGT2", msg_type="RES", priority="HIGH",
    actions=["VALD", "ROUT"], params=["findings:14_ips", "AGT3"],
    ctx_ref="ref#2"
)

# Agent 3 → Orchestrator: Done
msg_3 = Message.build(
    to="ORCH", fr="AGT3", msg_type="FIN", priority="MED",
    actions=["STOR"], params=["key:threat_report", "val:ref#7"]
)

print(msg_1)
print(msg_2)
print(msg_3)

Benchmarks

Token count comparison: DRIXL vs Natural Language vs JSON vs XML for the same instruction:

# Method Tokens vs DRIXL
1 DRIXL message ~25 1.0x
2 Structured JSON ~60 ~2.4x
3 Natural language ~120 ~4.8x
4 XML (verbose) ~140 ~5.6x

Benchmarks measured using OpenAI tiktoken on 100+ real agent message samples. See benchmarks.py for methodology.


Project Structure

DRIXL/
├── drixl/
│   ├── __init__.py          # Public API
│   ├── message.py           # Message builder & parser
│   ├── context_store.py     # Shared context store (memory + Redis)
│   ├── verbs.py             # Standard verb vocabulary
│   └── exceptions.py        # Custom exceptions
├── examples/
│   ├── basic_pipeline.py    # 3-agent pipeline example
│   ├── network_monitor.py   # Network agent example
│   └── web_pipeline.py      # Web scraping agent example
├── tests/
│   ├── test_message.py
│   ├── test_context_store.py
│   └── test_verbs.py
├── .github/
│   └── workflows/
│       └── tests.yml
├── benchmarks.py
├── CONTRIBUTING.md
├── ROADMAP.md
├── LICENSE
├── pyproject.toml
└── README.md

Supporting DRIXL

If DRIXL saves you tokens and costs, consider supporting its development:

  • Star the repo — helps others discover DRIXL
  • 💖 Sponsor on GitHub — fund ongoing development
  • 🐛 Open an issue — report bugs or propose new verbs

Contributing

We welcome contributions! Please read our contributing guidelines before getting started.

[!NOTE] DRIXL is in active early development. The verb vocabulary and message format are open for community input — open an issue to propose new verbs or format extensions.

[!CAUTION] DRIXL is a communication protocol standard. Implementations using DRIXL are responsible for validating inputs and outputs. Never pass unvalidated agent outputs directly to execution functions.

License

This project is licensed under the MIT License — see LICENSE for details.


Designed & crafted with ❤️ by Ossama Hashim — SamoTech.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

drixl-0.1.1.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

drixl-0.1.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file drixl-0.1.1.tar.gz.

File metadata

  • Download URL: drixl-0.1.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for drixl-0.1.1.tar.gz
Algorithm Hash digest
SHA256 0ef8d80fdf69328ab4aeed1199999cdfe9d410f7be06cf0d642b014d8ba7252c
MD5 dc2811fa907042112e2234394b63135a
BLAKE2b-256 3e582f0d5fb1f296c77ea78fb96bf9330737a5815f433b279327f383f38697b0

See more details on using hashes here.

File details

Details for the file drixl-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: drixl-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.8

File hashes

Hashes for drixl-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f3494e1cfb52eb17b00ac9b787af575d4217425dc9cb48ead586eab28ea31b31
MD5 eb4e4f3e6530cb15981ef47b46f65711
BLAKE2b-256 2114c64da219e291092d83298d1c4580cb5771af5d11a33796a4a352c1636780

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page