---
title: "Memory"
description: "How Aeon persists agent state, daily logs, topic notes, failure issues, and run metrics as git-committed files."
canonical: "https://www.aeon.fun/docs/memory"
---

# Memory (https://www.aeon.fun/docs/memory)

> How Aeon persists agent state, daily logs, topic notes, failure issues, and run metrics as git-committed files.
>
> Full docs: https://www.aeon.fun/docs.md | Whole-site summary: https://www.aeon.fun/llms.txt

Aeon stores all state as plain Markdown and JSON files inside [`memory/`](https://github.com/aeonfun/aeon/tree/main/memory), read at the start of a run and committed back to git on exit.

## Five Memory Layers

| Path | Purpose | Retention |
| --- | --- | --- |
| `memory/MEMORY.md` | Curated index of goals, active topics, and file pointers | Long-lived, kept under 8 KB |
| `memory/topics/*.md` | Deep notes split out by topic | Long-lived |
| `memory/logs/YYYY-MM-DD.md` | Append-only daily activity log across all skills | Permanent |
| `memory/issues/ISS-NNN.md` | Structured failure reports opened by health skills | Until `resolved` |
| `memory/skill-health/*.json` | Rolling 30-run quality scores and error flags per skill | Rolling 30 runs |

## Operating Rules

- **Read on entry:** Every skill reads `memory/MEMORY.md` first to align with current goals and active topics.
- **Log on exit:** Skills append a summary entry to `memory/logs/$(date +%F).md`.
- **Promote details:** Once a topic outgrows a few lines in `MEMORY.md`, details move into `memory/topics/<name>.md`.
- **Automatic compaction:** [`memory-flush`](https://www.aeon.fun/skills/memory-flush) promotes durable facts from daily logs into `MEMORY.md` with `[source: ...]` citations, prunes stale entries, and skips execution when no logs have changed.

## `cron-state.json`

The state reducer orders events by their parsed timestamp instant, including UTC offsets, and breaks equal-time ties deterministically. Event input order therefore cannot change the latest status or consecutive failure count.

`memory/cron-state.json` tracks per-skill run counts, consecutive failures, success rates, and the latest quality score. [`heartbeat`](https://www.aeon.fun/skills/heartbeat), [`skill-health`](https://www.aeon.fun/skills/skill-health), and [reactive triggers](https://www.aeon.fun/docs/reactive) read this file to detect regressions:

```json
{
  "digest": {
    "last_status": "success",
    "last_success": "2026-05-28T07:00:21Z",
    "total_runs": 30,
    "total_successes": 29,
    "consecutive_failures": 0,
    "success_rate": 0.97,
    "last_quality_score": 4
  },
  "monitor-polymarket": {
    "last_status": "failed",
    "last_failed": "2026-05-28T06:45:08Z",
    "total_runs": 9,
    "total_failures": 2,
    "consecutive_failures": 2,
    "success_rate": 0.78,
    "last_quality_score": 1,
    "last_error": "api_error: 429 rate_limited"
  }
}
```
