aphrodite-hermes 1.2.8

aphrodite-hermes: Hermes Agent-specific integration for Aphrodite compression engine - tool schemas, hook dispatch, skill registration
Documentation

aphrodite-hermesβ€πŸ”Œβ€Hermes Bridge

Hermes Agent integration layer - tool schemas, hook dispatch, skill registration.

This crate is the bridge between the core aphrodite engine and the Hermes Agent plugin system. It produces libaphrodite_hermes.dylib - loaded by the Python plugin to register tools, hooks, and skills with Hermes.

crates.io Β· docs


Install

# From source (monorepo)
cargo build --release -p aphrodite-hermes

# From crates.io
cargo install aphrodite-hermes

What it does

Hermes Agent
    β”‚
    β”‚  plugin load
    β–Ό
Python __init__.py (145 lines)
    β”‚
    β”‚  ctypes FFI
    β–Ό
libaphrodite_hermes.dylib  ← THIS CRATE
    β”‚
    β”‚  C ABI calls
    β–Ό
libaphrodite.dylib         ← Core engine

The bridge provides:

  1. Tool schemas - 12 JSON Schema definitions for aphrodite_* tools
  2. Tool dispatch - Routes Hermes tool calls to core engine functions
  3. Skill registration - Bundled skills exposed to Hermes agents
  4. Hook dispatch - Forwards hook calls (pre_llm, post_tool, etc.) to engine

Architecture

src/
β”œβ”€β”€ lib.rs          ← Universal dispatch: 14 hooks β†’ Rust functions
β”œβ”€β”€ tools.rs        ← 12 tool handler implementations
β”œβ”€β”€ schemas.rs      ← JSON Schema for all tools
β”œβ”€β”€ skills.rs       ← Bundled skill registration

Tools

All 12 tools are registered as closures in one tool_registry() HashMap in src/tools.rs (not separate per-tool modules) - full schemas and handler behavior in Tool Relay: Tools:

Tool
aphrodite_compress
aphrodite_retrieve
aphrodite_stats
aphrodite_catalog
aphrodite_search
aphrodite_diff
aphrodite_files
aphrodite_test
aphrodite_rebuild
aphrodite_reclassify
aphrodite_prefetch
aphrodite_prefetch_status

tool_registry() also holds a 13th, internal-only entry - context_engine_pre_llm - the context engine's pre-LLM hook, not a Hermes-callable tool (it isn't in plugin.yaml's provides_tools).

aphrodite_diff returns each turn's last-archived marker (conv_index), populated by hooks::post_llm_call calling session::archive_turn at the end of every turn (report 06 F11/T13 - previously archive_turn was dead code with zero call sites, so this always returned {"total": 0}).


Dependencies

  • aphrodite - Core engine crate (path + version)
  • serde / serde_json - JSON Schema + serialization

See Also

License

CC0-1.0 - public domain.