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%.
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.
- Joint Code + Prompt + Config Search: Evolves retrieval logic, indexing schemas, and LLM prompts together rather than tweaking prompts in isolation.
- Session-Level Failure Localization: Diagnoser and Case Study agents trace shared errors back to exact memory construction or retrieval sessions.
- 44.1% Lower Optimization Cost: Consumes 185.2M search tokens vs. 331.2M for MemPro by gating broken edits with smoke tests and adaptive sampling.
- 59% Query-Token Reduction: Drops LongMemEval-S query tokens from 43.9K to 17.9K while raising answer accuracy from 0.888 to 0.916.
- Zero-Shot Cross-Benchmark Transfer: A BEAM-100K-tuned harness transfers to LongMemEval-S at 0.908 score and 26.6K tokens—beating unoptimized ReMe.
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);
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 / Optimizer | LME Score ↑ | LME Query Tokens ↓ | LME LLM Calls | BEAM-1M Score ↑ | BEAM-1M Tokens ↓ | BEAM Calls |
|---|---|---|---|---|---|---|
| HoMe (BEAM / LME tuned) | 0.916 | 17.9K | 3.0 | 0.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.888 | 43.9K | 4.7 | 0.650 | 101.8K | 4.5 |
| MemPro (Prompt/Param Opt) | 0.812 | 96.9K | 5.5 | 0.693 | 65.4K | 6.x |
| A-MEM | 0.740 | 19.8K | 2.0 | 0.642 | 30.3K | 2.0 |
| SimpleMem | 0.728 | 37.7K | 8.1 | 0.440 | 34.8K | 6.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:
# 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 indexingIn 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.
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
LlamaIndex Agent Alternative: Lightweight Code Engineering & Tool Sandbox
LangChain TypeScript Alternative: Zero Dependencies & Deterministic Loops
LangGraph Alternative: Simple 6-Phase State Machine Without Graph Complexity
Related Architecture Guides
View all guidesBest Open Source Coding Agents in 2026: Free, Local & Fully Hackable Harnesses
MCP Server Security Best Practices: Hardening Model Context Protocol Agents in 2026
Open Source Coding Agent Harness: Build a Forkable, Local AI Engineering Runtime
Build with Smoke Monkey Harness
Zero dependencies. 24 built-in tools. Human-in-the-loop safety. 100% open source under the MIT License.