Prerequisites
- A Spectral Memory API key (get one at spectralmemory.com)
curlor any HTTP client
1. Encode a fact
Write a fact to theUSER.gpu channel:
.mem file server-side.
2. Fetch the memory block
Retrieve the 512-token[MEM] block for system prompt injection:
fdm_block into your agent’s system prompt. The Hermes3 reader model can decode it. Other models see an opaque token sequence.
3. Decode a fact
Read a specific channel value:The default fast path reads from persistent state (~0ms). Pass
use_model=true to verify via model inference instead.4. Flush before compression
If your agent is about to compress its context, call/flush first:
[MEM] block is re-injected before compression fires. Facts survive into the next session intact.
Next steps
Install the Hermes plugin
Automate memory injection for every session.
Available channels
See all 40 labeled fact channels.