Skip to main content

Prismer PARA adapter for Hermes (NousResearch) agents

Project description

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

Links

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

prismer_adapter_hermes-0.2.0.tar.gz (48.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prismer_adapter_hermes-0.2.0-py3-none-any.whl (35.1 kB view details)

Uploaded Python 3

File details

Details for the file prismer_adapter_hermes-0.2.0.tar.gz.

File metadata

  • Download URL: prismer_adapter_hermes-0.2.0.tar.gz
  • Upload date:
  • Size: 48.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for prismer_adapter_hermes-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cffa302c8197226128b4b5c846e8b4073e793a7af675609fa6e90f140fda3fa3
MD5 26e6ef5ea0579b2ea75ed3cd4cfb7084
BLAKE2b-256 906d069ffb50142bf9624cefadf0f477281faae18e26355db35905bc62d997d4

See more details on using hashes here.

File details

Details for the file prismer_adapter_hermes-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for prismer_adapter_hermes-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 598ca85a5c4367fadbcf17cf1b04a6b1534b5d2b8651ca81ae855911b19aa2e1
MD5 c715ca4681ee4b584ea654d033f71383
BLAKE2b-256 592a6f8934dda6f114971ffd6215e561f6494b739ea9484db410fbcd589bd126

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page