: Build With Hermes Agent
What I Built
I built a prototype integration between Hermes Agent and .klickd, an open portable memory format for AI agents.
The problem I wanted to explore is simple:
Every new agent session often pays again to rediscover context that already exists.
That repeated context cost shows up as:
- re-explaining project state;
- reloading constraints;
- rediscovering previous decisions;
- rebuilding handoff notes;
- rerunning tests just to find the same failure;
- losing track of which actions require human approval.
.klickd is designed to turn that repeated context into a portable, encrypted, versioned file that an agent can load before work starts.
Hermes Agent is a good fit for testing this because it is an open-source, self-hosted agent runtime with skills, plugins, hooks, approvals, local execution, and agentic workflow orchestration.
In this project:
Hermes runs the workflow.
.klickdcarries the state.
The prototype focuses on a benchmark called Context Cost Benchmark, which compares two modes:
Baseline cold start
The full context is pasted into the prompt every time..klickd-loadedmode
Structured context is loaded from a.klickdfixture and injected into the agent workflow.
The benchmark is designed to measure:
- repeated input tokens;
- output tokens;
- estimated cost;
- latency;
- continuity errors;
- violations of locked decisions;
- violations of tool permissions;
- handoff quality;
- unnecessary reruns of expensive commands.
The goal is not to claim a magic percentage improvement. The goal is to measure, reproducibly:
How many tokens and errors are we paying for simply because the agent has to rediscover state we already produced?
Demo
For the Hermes Agent Challenge, I created an experimental Hermes integration inside the klickdskill repository.
The demo uses Hermes Agent to drive the local .klickd Context Cost Benchmark.
hermes_klickd_agent_session_messages_json
If the embedded agent session does not render correctly, here is the relevant Hermes output:
session_id: 20260523_004058_85115c
Existing artifacts from 2026-05-23 were used. No rerun was needed.
Token-proxy totals:
- Cold: 310
- Paste: 6570
- Klickd: 5270
Verified artifacts:
- report.md
- summary.csv
- raw_runs.jsonl
- artifacts/sample_test.log
No publishes, git pushes, or external tool calls were performed.
The live Hermes run used:
- Hermes Agent v0.14.0
- OpenRouter free model route
- capped API key with no paid budget
- local dry-run benchmark
- no production deployment
- no package publishing
- no external posting
Hermes session:
20260523_004058_85115c
Hermes was asked to use the klickd-context-cost skill, inspect the benchmark outputs, and avoid rerunning work if durable artifacts already existed.
The key result:
Existing artifacts from 2026-05-23 were used. No rerun was needed.
That matters because one of the core ideas in .klickd v4 is that agents should not spend tokens or compute rediscovering output that already exists.
The dry-run produced these local artifacts:
benchmarks/context_cost/results/2026-05-23/
├── report.md
├── summary.csv
├── raw_runs.jsonl
└── artifacts/
└── sample_test.log
The benchmark output was explicitly marked as a whitespace token proxy, not a provider-token measurement. This is important: these are not OpenAI, Anthropic, or OpenRouter tokenizer counts. They are deterministic local proxy values for early validation.
Current dry-run totals:
| Condition | Token-proxy total |
|---|---|
| Cold start | 310 |
| Full context pasted | 6570 |
.klickd structured context | 5270 |
The useful result is not “.klickd reduces cost by X%.” That would be premature.
The useful result is:
The benchmark harness can now compare repeated context strategies, produce raw evidence, persist artifacts, and let Hermes inspect those artifacts instead of rerunning the same work.
Verification artifacts
One lesson from real agent workflows is that agents often rerun expensive commands just to recover output they already produced.
The benchmark therefore includes a verification_artifacts[] pattern inspired by this idea:
command 2>&1 | tee .test-output/<scope>.log
Instead of rerunning the test suite to find a failure, the agent can inspect the persisted artifact:
grep -n FAIL .test-output/full.log
In .klickd v4, that becomes structured state:
{
"command": "npm test",
"artifact_path": ".test-output/vitest.log",
"status": "failed",
"query_hint": "grep -n FAIL .test-output/vitest.log",
"checked_at": "2026-05-23T00:00:00Z",
"retention": "latest",
"scope": "project"
}
This turns agent memory into something more operational:
- what the agent knows;
- what the agent must verify;
- what the agent is not allowed to do without approval;
- where the evidence lives;
- what happened last time.
Code
Repository:
Hermes Agent docs
.klickd official page
Hermes Agent repository:
.klickd / klickdskill repository:
Related article on preserving command output for agents:
SOCIAL SHARE CARD GENERATOR