Architecture Documentation

How AXL Compress works, from Rosetta injection to decompression.

Rosetta Injection

The AXL v3 Rosetta is a 75-line specification that defines the complete packet grammar. It lives at axlprotocol.org/v3 and is fetched by the client on page load. When you compress text, the Rosetta becomes the system prompt for the LLM, followed by a compression directive.

This approach means any LLM with a sufficiently large context window can become AXL-fluent in a single prompt. No fine-tuning. No special model. The grammar is injected at inference time.

System Prompt = Rosetta v3 + Compression Directive
User Message  = Your English text
Response      = AXL v3 packets

Packet Format

Every AXL v3 packet is a single line with this structure:

ID:AGENT | OPERATION | subject + predicate + object [metadata] @confidence

Subject Tags

TagDomainExample
$Financial$AAPL, $revenue
@Entity@Google, @FDA
#Metric#accuracy, #latency
!Event!launch, !merger
~State~bullish, ~declining
^Value^95%, ^$4.2B

Connectors

SymbolMeaning
<-Evidence chain (source attribution)
RE:Reference to another packet
+Compound values

Operations Table

CodeNameUse
OBSObservationStated fact or data point
INFInferenceDerived conclusion
CONContradictionDisagreement or conflict
MRGMergeSynthesis of multiple claims
SEKSeekKnowledge gap or question
YLDYieldUpdated belief or correction
PRDPredictForward-looking projection

Decompression

The v3 decompression pipeline has three stages:

  1. Packets to Claims: Parse each packet line. Extract operation, subject tags, predicate, and metadata. Each packet becomes one atomic claim.
  2. Claims to Sections: Group claims by topic using entity tags and RE: references. MRG packets serve as section boundaries.
  3. Sections to Document: Render each section as a paragraph. Inline confidence levels where relevant. Preserve causal chains from evidence markers.

For the registered Chat pipeline, this decompression is performed automatically by an LLM call. The Rosetta is injected again with a decompression directive, and the LLM outputs natural English prose.

API Key Security

Public Tool (this page, /)

Your API key lives only in your browser tab's JavaScript memory. When you press Compress, the browser calls the LLM provider (Anthropic or OpenAI) directly via HTTPS. Our server never receives, stores, or proxies your key.

Registered Chat (/chat)

The 3-step pipeline (compress, reason, decompress) requires server-side LLM calls. Your key is stored server-side in the database and used for API calls on your behalf. You can update or remove it from the Dashboard at any time.

Compression Benchmarks

Typical compression ratios measured across various input types:

Input TypeAvg. RatioChar Reduction
News article (500 words)3.2:1~68%
Financial report (1000 words)4.1:1~75%
Technical docs (800 words)3.5:1~71%
Conversational text (200 words)2.4:1~58%

Ratios depend on input density and the LLM model used. Results may vary.

Developer Tools

Rosetta API

GET /api/v1/rosetta
Response: { "rosetta": "...full v3 text..." }

Returns the cached Rosetta v3 kernel. Refreshed hourly from axlprotocol.org/v3.

Python Package

pip install axl-core
from axl import compress, decompress

The axl-core package on PyPI provides programmatic compression and decompression.

Direct Integration

// Fetch Rosetta, use as system prompt
const res = await fetch('https://compress.axlprotocol.org/api/v1/rosetta');
const { rosetta } = await res.json();

// Call your LLM with rosetta as system prompt
const completion = await anthropic.messages.create({
  model: 'claude-sonnet-4-20250514',
  system: rosetta + '\n\n[compression directive]',
  messages: [{ role: 'user', content: yourText }]
});

File Compress API

POST /api/v1/file-compress

Upload a file (image, PDF) and receive the compressed version.

curl -X POST https://compress.axlprotocol.org/api/v1/file-compress \
  -F "file=@photo.jpg" \
  -H "Authorization: Bearer axl_YOUR_TOKEN" \
  --output compressed_photo.jpg

Response Headers

  • X-Original-Size - original file size in bytes
  • X-Compressed-Size - compressed file size in bytes
  • X-Compression-Ratio - compression ratio (e.g. 2.4)
  • X-Mime-Type - detected MIME type

Supported formats: JPEG, PNG, GIF, WebP, SVG, PDF. Max 50MB.

Rate limits: 500/month free, unlimited with subscription.

Error 429: monthly limit reached. Upgrade at /subscribe.

MCP Plugin (Claude Code)

# Install
cd /opt/axl-mcp-compress && npm install
claude mcp add axl-compress -- node /opt/axl-mcp-compress/src/server.mjs

# Usage in Claude Code
compress_file /path/to/image.jpg
bulk_compress /path/a.jpg,/path/b.png,/path/c.pdf

Auth: save token at ~/.config/axl-compress/auth.json

{"token": "axl_YOUR_TOKEN"}

Chrome Extension

Right-click any image on any webpage to compress and download.

  1. Open chrome://extensions
  2. Enable Developer Mode
  3. Click Load unpacked, select the extension folder
  4. Right-click any image, click "Compress with AXL"

For paid tier: click extension icon, paste bearer token.

Pricing

TierLimitPrice
Free500/month$0
ProUnlimitedSubscription

Upgrade to Pro