Xpersona
H

hierarchical-agent-memory

CLAWHUB · Unverified

Scalable memory architecture with hybrid topic-based working memory and optional time-based episodic recall. Provides structured MEMORY.md routing table, topic files for active projects, contact files, and configurable daily/weekly/monthly/yearly distillation layers. Use when the agent needs durable, organized long-term memory that survives compaction and scales across projects, contacts, and time horizons. For per-channel session isolation, install the companion skill agent-session-state. Upgrading from v2.x? Existing files are preserved — the agent will guide you through adding topic-based working memory alongside your current structure.

62
Rank
84
Safety
1.0k
Downloads

About

What it does, and when to use it.

Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.

Avoid when

  • Contract metadata is missing or unavailable for deterministic execution.

Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing

Install and run

Setup complexity: low.

clawhub skill install s17dvvvq4exbbc1mdmybaxzaen8475gj:hierarchical-agent-memory
  1. Install using `clawhub skill install s17dvvvq4exbbc1mdmybaxzaen8475gj:hierarchical-agent-memory` in an isolated environment before connecting it to live workloads.
  2. No published capability contract is available yet, so validate auth and request/response behavior manually.
  3. Review the upstream CLAWHUB listing at https://clawhub.ai/richgoodson/hierarchical-agent-memory before using production credentials.

Contract: missing

curl -s "https://www.xpersona.co/api/v1/agents/clawhub-richgoodson-hierarchical-agent-memory/snapshot"

Run-check

$0.02 USD

1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.

Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.

Documentation

CLAWHUB

144,843 characters of source documentation, loaded on request.

Extracted files

5 files captured from the source.

SKILL.md

---
name: hierarchical-agent-memory
description: >-
  Scalable memory architecture with hybrid topic-based working memory and
  optional time-based episodic recall. Provides structured MEMORY.md routing
  table, topic files for active projects, contact files, and configurable
  daily/weekly/monthly/yearly distillation layers. Use when the agent needs
  durable, organized long-term memory that survives compaction and scales
  across projects, contacts, and time horizons. For per-channel session
  isolation, install the companion skill agent-session-state. Upgrading from
  v2.x? Existing files are preserved — the agent will guide you through
  adding topic-based working memory alongside your current structure.
license: MIT-0
compatibility: "OpenClaw 2026.4.x or later. Requires memory-core plugin."
metadata:
  openclaw: {"requires": {"bins": ["openclaw"]}}
  version: "3.1.1"
  clawhub: {"category": "memory", "tags": ["memory", "hierarchy", "topics", "distillation"]}
---

# Hierarchical Agent Memory v3.1.1

Agents that run across multiple projects, contacts, and time horizons need memory that scales. Without structure, memory files grow into a single bloated document that triggers lost-in-the-middle degradation. This skill organizes agent memory into a hybrid architecture: topic-based working memory for active projects, and optional time-based archival layers for episodic recall.

## Onboarding

When this skill is installed or updated, initiate a setup conversation with the user before applying any memory structure changes. Do not silently create directories or files.

**Step 1 — Greet and explain.** Tell the user this skill organizes agent memory into a hybrid structure with topic-based working memory and optional time-based archival layers. Keep it to 2-3 sentences.

**Step 2 — Ask about preset preference.** Present three presets:

- **minimal** — MEMORY.md routing table plus daily notes. Best for simple setups and single-project agents.
- **standard** (default) — Adds topic files and contact files. Best for multi-project agents and teams.
- **full** — Adds weekly, monthly, and yearly auto-distillation layers. Best for long-running agents needing historical recall. If the bundled `memory-wiki` plugin is enabled, prefer **standard** — `memory-wiki`'s `syntheses/` pages and `reports/` dashboards already cover the same ground.

If the user says "just use defaults," apply standard and move on.

Companion skills and plugins: For per-channel session isolation, install `agent-session-state`. For governance and provenance tracking, install `agent-provenance`. If the bundled `memory-wiki` plugin is enabled, it sits beside this skill and is complementary — this skill owns the always-loaded MEMORY.md routing table and `memory/topics/` active-project working memory; `memory-wiki` owns the compiled durable knowledge vault (structured claims, provenance, dashboards). All are independent.

**Step 3 — Ask targeted follow-up questions based on preset.**

For standa

_meta.json

{
  "ownerId": "kn7cr61r4a1hjpj4xcay7876sd846am2",
  "slug": "hierarchical-agent-memory",
  "version": "3.1.1",
  "publishedAt": 1791040239470
}

references/configuration.md

# Configuration Reference

## Quick Start

The skill works with zero configuration using the `standard` preset. To
customize, add a `memory_structure` block to your workspace configuration.

## Presets

### minimal

Best for: single-project agents, simple setups, users who want structure
without complexity.

Creates: `MEMORY.md` (routing table) + `memory/daily/` (platform default)

```json
{ "memory_structure": { "preset": "minimal" } }
```

### standard (default)

Best for: multi-project agents, users who work across several topics or
with multiple contacts.

Creates: `MEMORY.md` + `memory/daily/` + `memory/topics/` + `memory/contacts/`

```json
{ "memory_structure": { "preset": "standard" } }
```

### full

Best for: long-running agents that need historical recall ("what happened
in February?"), users who value complete archival records.

Creates: everything in `standard` + `memory/weekly/` + `memory/monthly/`
+ `memory/yearly/` with automated distillation cron jobs.

```json
{ "memory_structure": { "preset": "full" } }
```

## Overriding Preset Defaults

Start with a preset, then override individual settings:

```json
{
  "memory_structure": {
    "preset": "standard",
    "time_layers": true,
    "distillation": {
      "weekly": { "enabled": true },
      "monthly": { "enabled": false },
      "yearly": { "enabled": false },
      "timezone": "America/New_York"
    }
  }
}
```

This gives you `standard` plus weekly summaries, but skips monthly and yearly.

## Full Schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "hierarchical-agent-memory configuration",
  "type": "object",
  "properties": {
    "memory_structure": {
      "type": "object",
      "properties": {
        "preset": {
          "type": "string",
          "enum": ["minimal", "standard", "full"],
          "default": "standard",
          "description": "Base configuration preset"
        },
        "routing_table": {
          "type": "boolean",
          "default": true,
          "description": "Maintain MEMORY.md as a lean routing table"
        },
        "routing_table_max_kb": {
          "type": "number",
          "default": 3,
          "minimum": 1,
          "maximum": 10,
          "description": "Maximum MEMORY.md size in KB before warning"
        },
        "topics": {
          "type": "boolean",
          "default": true,
          "description": "Enable topic-based working memory"
        },
        "topics_path": {
          "type": "string",
          "default": "topics/",
          "description": "Directory for topic files relative to memory/"
        },
        "contacts": {
          "type": "boolean",
          "default": true,
          "description": "Enable contact files"
        },
        "contacts_path": {
          "type": "string",
          "default": "contacts/",
          "description": "Directory for contact files relative to memory/"
        },
        "time_layers": {
          "type": "boolean",
   

references/migration-v2-to-v3.md

# Migration Guide: v2.x to v3.0

## What Changed

v3.0 adds **topic-based working memory** as the primary organizational layer.
The time-based hierarchy (daily/weekly/monthly/yearly) is preserved as an
optional archival layer.

| v2.x | v3.0 |
|------|------|
| MEMORY.md as lean index | MEMORY.md as routing table (same concept, clearer rules) |
| daily/ as primary intake | daily/ as intake (unchanged) |
| weekly/monthly/yearly as main distillation path | weekly/monthly/yearly as optional archival layer |
| No topic files | topics/ as primary working memory |
| No contact files | contacts/ for people information |

## What's Preserved

- All existing `memory/daily/` files — untouched
- All existing `memory/weekly/` files — untouched
- All existing `memory/monthly/` files — untouched
- All existing `memory/yearly/` files — untouched
- Existing `memory/sessions/` files — untouched
- Existing MEMORY.md — preserved, but may be refactored with user approval

## Migration Steps

### Automatic (agent-performed with user approval)

1. **Scan MEMORY.md** for project entries, contact references, and
   infrastructure details
2. **Propose topic files** for each active project or workstream found
3. **Propose contact files** for each person referenced
4. **Show migration plan** to user before executing
5. **Refactor MEMORY.md** into a routing table with pointers to new files
6. **Create topic and contact files** with content extracted from MEMORY.md

### Manual

If the user prefers to handle migration themselves:

1. Create `memory/topics/` directory
2. For each active project, create `memory/topics/<project-name>.md`
3. Move project-specific content from MEMORY.md to the topic file
4. Replace MEMORY.md content with one-line pointers to topic files
5. Repeat for contacts if desired

## Rollback

If the migration doesn't work out:

- Topic and contact files can be deleted without affecting anything
- MEMORY.md can be restored from git history
- The time-based layers are completely independent and unaffected
- To revert to v2.x behavior, set `preset: "minimal"` and `time_layers: true`

## Configuration for v2.x Parity

To get the exact same behavior as v2.x with no new features:

```json
{
  "memory_structure": {
    "preset": "minimal",
    "time_layers": true,
    "distillation": {
      "weekly": { "enabled": true },
      "monthly": { "enabled": true },
      "yearly": { "enabled": true }
    }
  }
}
```

This gives you daily/weekly/monthly/yearly without topics or contacts.

references/onboarding-guide.md

# Onboarding Guide

This document provides the full onboarding conversation script for the agent
to follow when this skill is first installed or updated.

## Detection

The agent should initiate onboarding when:

1. **First install** — no `memory/topics/` directory exists and no
   `memory_structure` configuration is found in the workspace config.
2. **Update from v2.x** — `memory/daily/` or `memory/weekly/` exists but
   `memory/topics/` does not.
3. **User explicitly requests** — user says "set up memory", "configure
   memory skill", or similar.

## Conversation Script

### Opening (First Install)

> I just installed the hierarchical-agent-memory skill. It organizes memory
> into topic-based working files with optional time-based archival layers.
>
> There are three presets:
> - **minimal** — just a lean MEMORY.md index and daily notes
> - **standard** — adds topic files and contact files
> - **full** — adds weekly/monthly/yearly archival summaries on top of standard
>
> Which fits your workflow? Or I can walk through the options in more detail.

### Opening (Update from v2.x)

> The hierarchical-agent-memory skill has been updated to v3. The main change
> is adding topic-based working memory alongside the existing time-based
> structure.
>
> Your existing daily/weekly/monthly/yearly files are untouched. The new
> feature is `memory/topics/` — dedicated files per project or workstream
> that serve as the authoritative source for each subject.
>
> Want me to scan your current MEMORY.md and suggest topic files to create?
> I won't change anything without your approval.

### Follow-up Questions

After preset selection, ask only the questions relevant to their choice:

**For standard or full:**
- "Want me to look at your current MEMORY.md and create starter topic files
  for projects I find there?"
- "Do you also use the companion skills agent-session-state or
  agent-provenance? They work alongside this skill for session isolation
  and governance."

**For full only:**
- "What timezone are you in? I'll set distillation cron jobs accordingly."
  (Default: system timezone)
- "Weekly synthesis defaults to Sunday 2:00 AM. Does that work?"

**If user says "just use defaults" at any point:**
- Apply `standard` preset
- Create directory structure
- Confirm what was created
- Stop asking questions

### Migration Offer

If MEMORY.md contains more than ~3KB of content:

> Your MEMORY.md is currently [X]KB. For best results, it should be under 3KB
> — just pointers and active constraints. Want me to suggest how to split it
> into topic files? I'll show you the plan before making changes.

### Closing

> Setup complete. Here's what was created:
> [list directories and files]
>
> From now on, I'll maintain MEMORY.md as a lean routing table and distill
> daily note content into topic files when projects are active.
> [If full preset: Weekly/monthly/yearly summaries will generate automatically.]

## Important Rules for Onboarding

- NEVER create directories or 

Sponsored

Ads related to hierarchical-agent-memory and adjacent AI workflows.