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
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
tiktokenon 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.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file drixl-0.1.0.tar.gz.
File metadata
- Download URL: drixl-0.1.0.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5aaafaff44687519d7236b83e9675da5e666a9f61bc3bec442ccaf91195d209b
|
|
| MD5 |
51a320ec14adb5b726671f94b562cf12
|
|
| BLAKE2b-256 |
7664fe408b11a66818cd4d2d3347431d4a95d82da77bc1daf4236a27187fbfda
|
File details
Details for the file drixl-0.1.0-py3-none-any.whl.
File metadata
- Download URL: drixl-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c4df97aa465636d5e6688afebbefc6fd939d4203a789567561001723ebc3d2a
|
|
| MD5 |
f58f5dfeb85db0df406fc951ccdc33ad
|
|
| BLAKE2b-256 |
51a2734774cec0fe4db17bbfb0dd4776ec5546eda3149138a7c66d4bf6d7b614
|