Memory & RAG
~9 min readUpdated: November 2026

HoMe: Automated Harness Optimization for AI Memory Systems

HoMe Diagnosable Harness Optimization for AI Assistant Memory Systems in Smoke Monkey

HoMe (arXiv:2611.34624) is an evaluation-driven optimization framework for file-native AI assistant memory harnesses—jointly evolving code, prompts, and retrieval configs via git-branched candidates, session-level failure diagnosis, and smoke-test gating. On LongMemEval-S and BEAM-1M, HoMe raises accuracy to 0.916 and 0.704 while cutting query tokens by up to 59%.

Technical Review: Smoke Monkey Core Architecture Team
Tested on Node.js 18+ & BunTypeScript 5.x
Quick Answer & Executive Definition

HoMe: Automated Harness Optimization for AI Memory Systems: HoMe (arXiv:2611.34624) is an evaluation-driven optimization framework for file-native AI assistant memory harnesses—jointly evolving code, prompts, and retrieval configs via git-branched candidates, session-level failure diagnosis, and smoke-test gating. On LongMemEval-S and BEAM-1M, HoMe raises accuracy to 0.916 and 0.704 while cutting query tokens by up to 59%. Designed as a zero-dependency, open-source TypeScript architecture under the MIT License with native Model Context Protocol (MCP) support and deterministic phase state machines.

Key Architectural Takeaways
Quick Implementation Examplehome-memory-harness-agent.ts
home-memory-harness-agent.tstypescript
import { createAgent } from "@smoke-monkey/harness";
const memoryOptimizerAgent = createAgent({
agentId: "home-harness-optimizer",
provider: "anthropic",
model: "claude-sonnet-4-5",
workspacePath: process.cwd(),
permissions: {
read_file: "allow",
write_file: "allow",
run_command: "ask",
},
});
async function runMemoryHarnessIteration() {
const result = await memoryOptimizerAgent.run(
"Diagnose failed LongMemEval-S traces in eval_logs/, isolate defective memory " +
"construction vs retrieval sessions, edit plugins/memory_retriever.py on a new git " +
"branch, pass the smoke test gate, and verify token reduction against baseline."
);
console.log("[HoMe Optimizer] Completed:", result.summary);
}
runMemoryHarnessIteration().catch(console.error);
Video Guides

Watch: Related Video Guides

Using LongMemEval to Improve Agent Memory

Agent Memory EXPLAINED - Complete Architecture

What Is HoMe? Treating Agent Memory as a Git-Versioned Harness

HoMe (arXiv:2611.34624) is an evaluation-driven optimization framework for file-native AI assistant memory systems such as AgentScope ReMe. Rather than treating agent memory as a static vector store or tuning prompts alone, HoMe defines the memory harness as the coupled triad of code (construction, maintenance, retrieval, recovery), prompts, and configurations (schemas, index thresholds).

HoMe coordinates three roles around a Git-backed harness repository: an Optimizer Agent that branches from any previously evaluated candidate commit h_j (or merges complementary branches), a Diagnoser Agent backed by Case Study subagents that attribute failures to specific conversational sessions and harness modules, and an Experiment Manager that enforces permission boundaries, runs fast smoke tests before spending formal evaluation tokens, and reuses pre-built memory snapshots (rho = 0.6).

LongMemEval-S & BEAM-1M Benchmarks vs. ReMe, MemPro, A-MEM, and SimpleMem

Evaluated with qwen3.6-flash for memory construction, qwen3.7-max for reasoning, and Qwen3-Embedding-0.6B across LongMemEval-S (500 cases, avg 115K tokens) and BEAM-1M (35 cases, avg 1.04M tokens, up to 1.52M tokens) with a budget of just B = 6 formal candidate evaluations, HoMe sets the Pareto frontier on both accuracy and token cost:

Memory System / OptimizerLME Score ↑LME Query Tokens ↓LME LLM CallsBEAM-1M Score ↑BEAM-1M Tokens ↓BEAM Calls
HoMe (BEAM / LME tuned)0.91617.9K3.00.704 (0.720 run 2)60.4K (68.3K)6.7
HoMe (Zero-Shot Transfer)0.908 (from BEAM-100K)26.6K—0.639 (from LME)39.0K—
ReMe (Manual Baseline)0.88843.9K4.70.650101.8K4.5
MemPro (Prompt/Param Opt)0.81296.9K5.50.69365.4K6.x
A-MEM0.74019.8K2.00.64230.3K2.0
SimpleMem0.72837.7K8.10.44034.8K6.8

On LongMemEval-S, HoMe outperforms prompt-only MemPro by +10.4 percentage points while slashing query tokens by 81.5% (17.9K vs 96.9K). During optimization on BEAM, HoMe consumes 185.2M search tokens in 10.4 hours versus 331.2M tokens in 11h 23m for MemPro—a 44.1% search cost reduction via adaptive sampling (100 queries on 10 cases vs MemPro's full training set).

Setting Up ReMe & Running Diagnosable Harness Optimization Locally

HoMe builds directly on top of the open-source agentscope-ai/ReMe memory runtime and cleaned ReMe_longmemeval_clean_s_v2 evaluation split:

bash
# 1. Clone the open-source ReMe memory framework used by HoMe
git clone https://github.com/agentscope-ai/ReMe.git && cd ReMe
pip install -e .

# 2. Fetch the cleaned LongMemEval-S ground truth benchmark
hf download --repo-type dataset agentscope-ai/ReMe_longmemeval_clean_s_v2 --local-dir ./data/lme_clean

# 3. Inspect plugin surface area evolved during optimization
ls -la reme/plugins/  # source allocation, evidence selection, cross-session indexing

In HoMe's optimization trace on LongMemEval-S and BEAM, candidate edits totaled 1,379 and 1,242 lines respectively—spanning code changes (adding query-time verification audits and tightening auditor authority when overly strict filters dropped recall) alongside prompt and index adjustments.

Applying HoMe Principles to Smoke Monkey Harness Subcontext Memory

HoMe highlights a key lesson for engineers building memory layers in Smoke Monkey Harness: prompt engineering alone often overfits (as MemPro dropped from 0.888 to 0.812 on LongMemEval-S), whereas joint code + retrieval + prompt diagnostics yield transferable gains.

When tuning Smoke Monkey's file-native memory or RAG plugins, enforce HoMe's three guardrails: (1) gate every candidate edit behind a deterministic smoke test before running full evaluations, (2) version memory snapshots per session so retrieval fixes do not force expensive re-ingestion (rho = 0.6), and (3) separate the Diagnoser from the Optimizer so root-cause traces guide surgical code edits.

Watch Out for Over-Aggressive Retrieval Auditors

HoMe's execution traces show that adding an unconstrained LLM verification filter can inadvertently reject valid evidence; always bound auditor veto rules and re-benchmark on historically hard cases.

Google Search Questions & Answers

Frequently Asked Questions

Q:What does HoMe optimize in an AI assistant memory system?

HoMe jointly optimizes the memory harness across three surfaces: Python/runtime code (construction, indexing, retrieval, auditing), LLM stage prompts, and schema/threshold configurations.

Q:How much does HoMe improve LongMemEval-S and BEAM-1M performance?

Starting from a strong ReMe harness, HoMe raises LongMemEval-S accuracy from 0.888 to 0.916 while cutting query tokens from 43.9K to 17.9K, and lifts BEAM-1M from 0.650 to 0.704 while reducing tokens from 101.8K to 60.4K.

Q:Why does HoMe beat prompt-only optimizers like MemPro?

MemPro only modifies prompts or scalar parameters and regressed to 0.812 on LongMemEval-S. HoMe uses session-level failure diagnosis to rewrite retrieval code, evidence selection, and cross-session indexing—beating MemPro by 10.4 points.

Q:How does HoMe keep harness optimization affordable across 1M-token histories?

HoMe uses smoke-test gating to reject broken edits cheaply, adaptive sampling prioritizing hard units (44-75% smaller eval subsets), and session-level memory versioning to reuse constructed memories with probability 0.6.

Q:Where is the HoMe codebase hosted?

HoMe's implementation and the ReMe memory framework are available in the open-source agentscope-ai/ReMe repository on GitHub alongside the cleaned ReMe_longmemeval_clean_s_v2 Hugging Face dataset.

Related Alternatives & Comparisons

Related Architecture Guides

View all guides

Build with Smoke Monkey Harness

Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.

npm install smoke-monkey-harness