Skip to main content

prismer-adapter-hermes

Prismer PARA (Prismer Agent Runtime ABI) adapter for Hermes agents by NousResearch.

This is the first Python adapter in the Prismer SDK family.

What It Does

Translates all 14 Hermes hook events to PARA v0.1 event format and writes them to ~/.prismer/para/events.jsonl. The Prismer PARA runtime daemon reads this file to power the Evolution engine, mobile dashboards, and cross-agent memory.

Install

pip install prismer-adapter-hermes

Zero runtime dependencies — the wire types are vendored as pure dataclasses.

Basic Usage

In your Hermes plugin configuration, set the plugin module to prismer_adapter_hermes.register. Hermes calls register(ctx) automatically on plugin load.

# hermes_plugin.py — your Hermes plugin file
from prismer_adapter_hermes import register

# Hermes calls this at startup
def setup(ctx):
    register(ctx)

Or call it directly with a custom sink:

from prismer_adapter_hermes import register, default_jsonl_sink

def setup(ctx):
    adapter = register(ctx, sink=default_jsonl_sink)
    # adapter is a HermesParaAdapter instance

14 Hook Mappings (§4.6.2)

Hermes Hook PARA Event Notes
gateway:startup agent.register L1 Discovery — emits AgentDescriptor
session:start agent.session.started Deduped with on_session_start
session:end agent.session.ended Deduped with on_session_end
session:reset agent.session.reset
agent:start agent.prompt.submit source mapped from platform context
agent:step agent.turn.step Per tool-loop iteration
agent:end agent.turn.end
command:* agent.command Wildcard; commandKind normalized
pre_tool_call agent.tool.pre
post_tool_call agent.tool.post or agent.tool.failure Split on result.success
pre_llm_call agent.llm.pre Cache-safe inject — see below
post_llm_call agent.llm.post
on_session_start agent.session.started Alias — deduped, only one emit per session
on_session_end agent.session.ended Alias — deduped

pre_llm_call — Cache-Safe Context Injection (P11 Pattern)

pre_llm_call is Hermes's standout capability and PARA's P11 Pattern. The adapter's on_pre_llm_call method accepts an additional_context parameter and returns {"context": additional_context}.

Hermes injects this context string into the tail of the current user message — not into the system prompt. This preserves the prompt cache across turns because the system prompt block never changes.

# Hermes calls your handler like:
#   result = handler(ctx)
# If result["context"] is non-empty, Hermes appends it to the current user message.

# The adapter does this automatically when additional_context is provided:
adapter.on_pre_llm_call(ctx, additional_context="[prismer memory hint: ...]")
# → emits agent.llm.pre PARA event
# → returns {"context": "[prismer memory hint: ...]"}

Observability

Events are appended to ~/.prismer/para/events.jsonl (one JSON object per line). Set PRISMER_PARA_STDOUT=1 to also print events to stdout (useful in dev).

PRISMER_PARA_STDOUT=1 python -m hermes_agent run

Metadata

Release files for prismer-adapter-hermes 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prismer-adapter-hermes 0.2.0
File Size Uploaded
prismer_adapter_hermes-0.2.0.tar.gz 48.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prismer-adapter-hermes 0.2.0
File Interpreter ABI Platform
prismer_adapter_hermes-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 83.1 kB

Release files / prismer_adapter_hermes-0.2.0.tar.gz

Download URL prismer_adapter_hermes-0.2.0.tar.gz
Size 48.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cffa302c8197226128b4b5c846e8b4073e793a7af675609fa6e90f140fda3fa3
BLAKE2b-256 checksum
How to use checksums
906d069ffb50142bf9624cefadf0f477281faae18e26355db35905bc62d997d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / prismer_adapter_hermes-0.2.0-py3-none-any.whl

Download URL prismer_adapter_hermes-0.2.0-py3-none-any.whl
Size 35.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
598ca85a5c4367fadbcf17cf1b04a6b1534b5d2b8651ca81ae855911b19aa2e1
BLAKE2b-256 checksum
How to use checksums
592a6f8934dda6f114971ffd6215e561f6494b739ea9484db410fbcd589bd126
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page