惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
V
Visual Studio Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
量子位
月光博客
月光博客
阮一峰的网络日志
阮一峰的网络日志
T
Tailwind CSS Blog
GbyAI
GbyAI
爱范儿
爱范儿
Y
Y Combinator Blog
宝玉的分享
宝玉的分享
有赞技术团队
有赞技术团队
罗磊的独立博客
Recent Announcements
Recent Announcements
博客园 - 司徒正美
M
MIT News - Artificial intelligence
小众软件
小众软件
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
B
Blog RSS Feed
A
About on SuperTechFans
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
雷峰网
雷峰网

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
One Soul, Any Model: Portable Memory for Open-Source Agen...
Davincc77 · 2026-05-23 · via DEV Community

A diagram showing Hermes Agent as the workflow runner and .klickd as the portable state layer. It illustrates how Hermes runs tasks, tools, reports, and artifacts, while .klickd carries project memory, verification gates, human veto rules, claim sources, and benchmark context across models and agent sessions.

This is a submission for the Hermes Agent Challenge: 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. .klickd carries the state.

The prototype focuses on a benchmark called Context Cost Benchmark, which compares two modes:

  1. Baseline cold start

    The full context is pasted into the prompt every time.

  2. .klickd-loaded mode

    Structured context is loaded from a .klickd fixture 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.

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.

Enter fullscreen mode Exit fullscreen mode

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

Enter fullscreen mode Exit fullscreen mode

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.

Enter fullscreen mode Exit fullscreen mode

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

Enter fullscreen mode Exit fullscreen mode

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

Enter fullscreen mode Exit fullscreen mode

Instead of rerunning the test suite to find a failure, the agent can inspect the persisted artifact:

grep -n FAIL .test-output/full.log

Enter fullscreen mode Exit fullscreen mode

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"
}

Enter fullscreen mode Exit fullscreen mode

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:

https://github.com/Davincc77/klickdskill

Hermes POC integration path:

integrations/hermes/
├── README.md
├── skill/
│   └── SKILL.md
├── plugin/
│   ├── plugin.yaml
│   └── __init__.py
├── scripts/
│   └── run_context_cost_benchmark.py
└── tests/

Enter fullscreen mode Exit fullscreen mode

Context Cost Benchmark path:

benchmarks/context_cost/
├── RFC.md
├── runner.py
├── fixtures/
│   ├── baseline/
│   ├── klickd/
│   ├── prompts/
│   ├── validation/
│   ├── verification_artifacts/
│   └── edge_cases/
├── results/
└── tests/

Enter fullscreen mode Exit fullscreen mode

Current benchmark pieces:

  • RFC-003: Context Cost Benchmark
  • local dry-run runner
  • fixture validation
  • deterministic token proxy
  • CSV / JSONL / Markdown reports
  • edge-case fixtures for:
    • migration/version break;
    • tool-call failure recovery;
    • multi-session handoff.

The Hermes integration currently includes:

  • a Hermes-facing skill;
  • an experimental plugin scaffold;
  • a wrapper script that runs the local benchmark;
  • tests for the wrapper;
  • explicit safety constraints:
    • no provider calls from the wrapper;
    • no paid resources;
    • no publishing;
    • no production deployment;
    • no secrets.

My Tech Stack

  • Python SDK — local .klickd loading / saving

Current development install, until PyPI is updated:

pip install "git+https://github.com/Davincc77/klickdskill.git@main#subdirectory=packages/pypi/klickd"

Enter fullscreen mode Exit fullscreen mode

Current Python import:

from klickd import load_klickd, save_klickd

Enter fullscreen mode Exit fullscreen mode

  • GitHub Actions — test vectors and package integrity checks
  • CSV / JSONL / Markdown — benchmark reports
  • Local verification artifacts — persisted logs for agent inspection
  • OpenRouter free model route — used only to run the Hermes agent session for the demo

How I Used Hermes Agent

Hermes Agent is used as the workflow runner for the benchmark.

The .klickd file is not meant to replace Hermes memory or Hermes skills. Instead, it gives Hermes a portable external state artifact it can load before work starts.

Hermes is responsible for:

  • running the benchmark task;
  • reading fixture context;
  • executing local dry-run commands;
  • inspecting generated artifacts;
  • summarizing benchmark results;
  • respecting approval and verification boundaries.

.klickd is responsible for carrying:

  • project state;
  • locked decisions;
  • tool permissions;
  • handoff notes;
  • verification gates;
  • human veto rules;
  • claim sources;
  • verification artifacts.

This is useful because multi-agent systems need more than agent-to-agent communication.

If A2A defines how agents talk, .klickd explores what portable state they carry between tasks, tools, models, and sessions.

The Hermes integration is therefore not about making a chatbot remember more. It is about testing whether an open-source agent runtime can operate with structured, portable context instead of repeatedly reconstructing the same state.

The goal is to reduce:

  • repeated prompt context;
  • hallucinated continuations;
  • forgotten decisions;
  • unsafe actions;
  • unnecessary reruns;
  • handoff failures.

The larger idea is that agent memory should become infrastructure:

Portable state, explicit constraints, verification artifacts, and human approval boundaries.

In short:

Hermes runs the workflow. .klickd carries the state.

What I Learned

The first useful result was not a performance number. It was a workflow result.

Hermes correctly used the existing benchmark artifacts instead of rerunning the dry-run unnecessarily.

That matters because a lot of agent waste is not only token waste. It is also repeated execution waste.

Agents often:

  • rerun tests to rediscover failures;
  • reread long logs from context;
  • rebuild state from previous messages;
  • regenerate summaries that already exist;
  • ask the model to infer what a file could have told it deterministically.

The benchmark and Hermes POC make that waste visible.

This also clarified the role of .klickd:

.klickd should not only remember preferences. It should help agents know:

  • what state exists;
  • what evidence exists;
  • what claims were executed, inspected, or assumed;
  • what actions require human approval;
  • what artifacts should be read before rerunning work.

That is why .klickd v4 is moving beyond portable memory toward a more operational layer:

portable encrypted context
+ project memory
+ verification gates
+ human veto
+ claim sources
+ verification artifacts
+ migration safety

Enter fullscreen mode Exit fullscreen mode

Sources

Hermes Agent Challenge:

https://dev.to/challenges/hermes-agent-2026-05-15

Hermes Agent repository:

https://github.com/NousResearch/hermes-agent

Hermes Agent documentation:

https://hermes-agent.app/en/docs

.klickd / klickdskill repository:

https://github.com/Davincc77/klickdskill

.klickd official page:

https://klickd.app/klickdskill

Related article on preserving command output for agents:

https://dev.to/tacoda/dont-make-the-agent-re-run-the-test-suite-to-find-the-failure-427

Final Note

This is still early.

The benchmark does not yet claim provider-token savings. The current numbers are a deterministic local proxy. The next step is to run the same structure against real provider usage and compare actual input/output tokens, latency, and continuity failures.

But the architecture is now testable:

  • Hermes can act as the workflow runner.
  • .klickd can act as the portable state layer.
  • The benchmark can produce raw evidence.
  • Verification artifacts can prevent unnecessary reruns.
  • The system can evolve without breaking older .klickd files.

That is the direction I want to keep exploring.

One soul. Any model. Any agent.

A diagram showing Hermes Agent as the workflow runner and .klickd as the portable state layer. It illustrates how Hermes runs tasks, tools, reports, and artifacts, while .klickd carries project memory, verification gates, human veto rules, claim sources, and benchmark context across models and agent sessions.