Overview

Aphrodite Documentation

00 // INDEX

THE SECTIONS

Aphrodite works on one thing: the output a tool call appends to the model's context. Every section documents a part of that work.

Install

  • Installing Aphrodite

    Four correct answers to "how do I install this", one per platform.

  • macOS / Linux: Install

    The macOS and Linux install path - and everything that also works on Windows under Git Bash or WSL.

  • Install Troubleshooting

    What to check when Hermes loads the plugin and the proxy binary does not come up.

  • Windows Install

    Native Windows through PowerShell - download.ps1 as the direct install path.

CCR

  • CCR Backends

    The CCR (Compress-Cache-Retrieve) store's two full backends, and which deployment mode selects each.

  • In-Memory CCR Backend

    The in-memory backend - a process-local, sharded concurrent store for cache-mode deployments.

  • Inline CCR

    Tiny entries bypass the CCR backend round-trip entirely; this is the inline path they take.

  • SQLite CCR Backend

    The SQLite backend - the production CCR store, persistent across worker restarts.

  • CCR Lifecycle

    CCR (Compress-Cache-Retrieve), the lossless end-to-end compression path, from compression to retrieval.

  • CCR Marker Format

    The compact marker strings that stand in for compressed content in an agent's context, and how to read each field.

Classification

  • Classification

    How the compression pipeline labels content before storage, and what each label decides.

  • Content Type Taxonomy

    The content types the classifier labels every payload with before it enters the compression pipeline.

Plugin

  • Context Engine

    The context engine - the dylib session's middle-turn archiver.

  • Conversational Directives

    Directives - short behavioural instruction files, one .md each - and what each one changes.

  • Plugin Hooks

    The six hooks the plugin registers with Hermes, and what each one is for.

Guides

  • Guides

    Walkthrough-style pages that connect the parts of Aphrodite the way you actually use them.

  • Hermes Integration

    Aphrodite connects to Hermes Agent as a native plugin, not as a proxy you point a client at.

  • Hermes Tool Output Schemas

    Every Hermes tool returns output with its own shape - diffs, JSON envelopes and the rest - and this is how each one is classified.

Tool Relay

  • Callbacks

    The two distinct callback surfaces around the tool relay.

  • Tool Relay Tools

    The 13 tools Aphrodite exposes to the Hermes agent for compression, retrieval and stats.

Proxy

  • Proxy Architecture

    The local reverse proxy that sits between any OpenAI-compatible client and the upstream API.

  • Compression Pipeline

    How the proxy decides whether to compress each piece of Chat Completions response content.

  • Proxy Handlers

    The HTTP handlers the proxy exposes for LLM requests, CCR entries and more.

  • Proxy Retry

    Transient upstream failures do not fail the request; this is how the retry path works.

Config

  • aphrodite.toml

    The single TOML file that configures Aphrodite's proxy listeners and compression engine.

  • Environment Variables

    The APHRODITE_ environment variables (plus a few non-prefixed ones) that override the TOML.

API

  • CCR Management Endpoints

    The loopback-only CCR endpoints that let external tools and scripts create, list and resolve stored entries.

  • Health Endpoint

    GET /health - the public liveness check for load balancers and monitoring systems.

  • Metrics Endpoint

    GET /metrics - the proxy's counters, gauges and latency histogram, as Prometheus metrics.

  • Retrieve Endpoint

    POST /retrieve resolves a CCR hash back to its original content, with optional line filtering.

Metrics

  • Prometheus Metrics

    Every proxy operation exposed as counters, gauges and histograms at GET /metrics.

  • Metrics Queries

    PromQL reference for monitoring and alerting on the Aphrodite proxy metrics.

Architecture

Examples

IN THIS DOCUMENT

Crimson marks the heading currently in view; every entry is one of the document's own headings.

Aphrodite compresses context before it hits the LLM.

It is the reason there are two integration paths: a reverse proxy for any OpenAI-compatible client, or a native Hermes plugin with hook-level interception.

CCR (Compress-Cache-Retrieve) storage, a 30-type classifier, context engine, and prefetch pipeline - all under 1ms.

This tree documents the current binary and plugin pairing.

The version numbers are not repeated here - they live in crates/aphrodite/Cargo.toml, plugins/aphrodite/plugin.yaml, and the newest CHANGELOG entry, so a release never leaves this page advertising an older one.

Getting Started

  • Installing Aphrodite - which artifact you need (proxy binary vs. Hermes plugin), with a decision tree
  • Windows Install - fast path with download.ps1 (native PowerShell, no bash needed)
  • macOS/Linux Install - download.sh, aphrodite setup, building from source
  • Troubleshooting - proxy not auto-launching, verifying the proxy without a full Hermes session, the two-config-files trap

Architecture

  • Architecture Index - all 11 flow traces: startup, chat compression, retrieve, hook/FFI, CCR lifecycle, SSE streaming, config resolution, dylib loading, release CI, components, data model

CCR (Compress-Cache-Retrieve)

  • Marker Format - <<<CCR:hash|type|size>>> schema with BLAKE3 hash, 30 content types, TOML-driven preview templates
  • Lifecycle - the 6-phase flow: compress, retrieve, expire (TTL+LRU+debounce), with threshold tables per type and mode
  • Backends
    • SQLite - schema, WAL mode, lazy TTL purge
    • In-Memory - DashMap + VecDeque, capacity 10,000, TOCTOU-safe eviction
    • Inline - LRU cache, 1024 entries, lock-safety pattern

Classification

Config & Install

  • aphrodite.toml - full schema: [[proxies]], [defaults], [compression], [previews], [templates.*], [flow], precedence rules, config reload
  • Environment Variables - the APHRODITE_* registry with the documented-but-inactive list

Proxy

  • Architecture - two-listener model (:9797 cache + :9798 token), routing table, management-route bearer auth, SSE pass-through
  • Handlers - all 8 handlers with their behaviors
  • Retry - connect-phase retry scope, backoff, counters
  • Compression - detect → threshold → hash → store → marker pipeline, budget curve, smart markers

API & Metrics

  • Health - GET /health liveness, X-Aphrodite-Fill-Pct
  • Metrics Endpoint - GET /metrics Prometheus text
  • Retrieve - POST /retrieve hash lookup, query, pagination
  • CCR Endpoints - create/list/delete/reload with the error table
  • Prometheus - all 28 metric names, types, labels
  • Queries - PromQL reference: CCR hit rate, latency

Plugin

  • Hooks - the SIX hooks with purpose and fire-time table
  • Directives - built-in set, injection order, materialization
  • Context Engine - the opt-in pass-through engine

Tool Relay

  • Tools - the 13 tools with schemas and behavior
  • Callbacks - transform-hook surface + HTTP relay

Examples & Guides

Roadmap

  • Centers - AI-conversation memory annotations; shipped vs. sketch items labeled

Style Guide

Every doc in this tree follows one style, the same one this page and the root README.md use:

RuleWhat it means
Explain, then detailOpen with one or two plain sentences on what the thing is and why it exists, then drop into tables/code
Tables over proseFields, flags, options, comparisons - anything with more than two rows of structured data - are a table, not a bulleted wall of text
No file/line citationsDocs describe behavior directly; they don’t cite exact source files or line numbers as proof - accuracy is a writing standard, not a footnote
No placeholder contentIf a documented setting or feature isn’t confirmed to do anything, the doc says so plainly instead of presenting it as working
Minimal external linksLink out only when the reader needs to click through to do something (download a release, read an upstream project’s own docs)
Roadmap ideas are labeledForward-looking or unimplemented designs (see Centers) say clearly which parts are shipped and which are sketches