Memoria — Windows memory hygiene tray + headless cleanup CLI for agents. Concinno's user-facing memory module.
Project description
concinno-skills-memoria
Windows memory hygiene tray — RAM cleanup, scheduler, process whitelist, foreground-window exclusion, and headless CLI for agent integration.
Memoria is the user-facing application layer over Concinno's
memory_relief and process_guard Win32 primitives. This sub-package
ships Memoria as a standard pip-installable Python source package, plus
an opt-in installer that fetches the pre-built signed Memoria.exe
from a GitHub Release.
Install
Source mode (cross-platform, ~50 KB wheel)
pip install concinno-skills-memoria
python -m memoria # tray app on Windows; CLI on Linux/Mac
The source-mode entry works on every platform Python supports. On Windows it brings up the system-tray + GUI; on Linux/Mac the GUI features no-op gracefully and only the CLI subcommands are useful.
Standalone EXE (Windows-only, ~94 MB bundle)
After installing the pip package, fetch the signed binary:
memoria-install-exe
This downloads the GitHub Release zip, verifies SHA-256, extracts to
%LOCALAPPDATA%\Memoria\, and creates a Start Menu shortcut. Then
Memoria.exe is available system-wide.
Set MEMORIA_RELEASE_URL env var to override the upstream release
URL for forks / private deployments.
Headless CLI for agents
# Print one memory snapshot as JSON
memoria --snap --compact
# Run a SAFE-tier cleanup, agent-style (no history pollution, quiet)
memoria --tier=safe --json --no-history --compact --quiet
# Force-trim the foreground app too (useful for benchmarking)
memoria --tier=safe --no-exclude-foreground
# Standalone EXE works the same way
Memoria.exe --tier=safe --json
JSON schema_version 1.0 contract (top-level fields):
{
"schema_version": "1.0",
"when": "...",
"mode": "safe",
"before": {"used_pct": ..., "available_gb": ..., ...},
"after": {"used_pct": ..., ...},
"freed_mb": 512,
"process_guard_run": false,
"history_persisted": false,
"exit_status": "ok",
"report": {
"reclaimed_mb": 512, "elapsed_ms": 1234,
"is_admin": false, "foreground_excluded": "chrome.exe",
"stages": [...], "process_trims": [...], "notes": []
}
}
Exit codes: 0 success / 1 partial (≥1 stage errored) / 2 failure (engine raised) / 3 invalid args.
Foreground window exclusion
By default Memoria spares the foreground window's process from per- process trim. Reasoning: a working-set trim costs the trimmed process 1-3 s of page-fault refill on the next mouse move, which is invisible on backgrounded apps but jarring on whatever the user is actively typing in / playing.
Toggle via --exclude-foreground / --no-exclude-foreground on the
CLI, or set state.exclude_foreground_enabled (persisted in
~/.memoria/state.json).
Limitation: image-name granularity. If chrome.exe is foreground,
every Chrome process is spared, not just the visible PID. PID-tree
exclusion needs concinno.memory_relief.engine.run_cleanup to accept
an exclude_pids: frozenset[int] argument — staged for a future
concinno release.
Build the EXE locally
pip install concinno-skills-memoria[build]
# Then from a checkout that contains memoria.spec + memoria_launch.py:
pyinstaller --noconfirm memoria.spec
The bundled PyInstaller spec produces an onedir bundle (loader +
_internal/) that Surfshark / Avira no longer flag as suspicious
(historically --onefile triggered self-extract heuristics — see
project handoff for forensic details).
For signed distribution: the included build_signed_exe.ps1 (in the
parent scripts/ directory of the canonical workspace) handles
build + Authenticode self-sign + verify in one shot. Bring your own
cert with subject CN=AI King — Memoria (or pass -CertSubject to
the script).
Source-of-truth
The canonical Memoria source currently lives at
~/.claude/scripts/memoria/ in the AI King workspace. Files under
src/memoria/ in this package are a copy synced for distribution.
Sync direction: scripts/memoria/ → src/memoria/. To regenerate
from the canonical workspace::
# From the workspace root
Copy-Item -Force -Recurse `
"$env:USERPROFILE\.claude\scripts\memoria\*.py" `
"projects\concinno-skills-memoria\src\memoria\"
A future migration consolidates source canonically into
src/memoria/ and turns ~/.claude/scripts/memoria/ into a junction
or re-export shim. Tracked in the parent project handoff.
License
AGPL-3.0-or-later. See LICENSE — same license as Concinno.
Links
- Concinno (parent): https://pypi.org/project/concinno/
- Source: https://github.com/aiking931931/concinno
- Issues: https://github.com/aiking931931/concinno/issues
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file concinno_skills_memoria-0.3.1.tar.gz.
File metadata
- Download URL: concinno_skills_memoria-0.3.1.tar.gz
- Upload date:
- Size: 74.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
509c56a31b3081f491ae9a3aa5ec1987d7d8a01f6660971813dccb1d0bbebc1e
|
|
| MD5 |
bd9f6213fd7d5d8fe35512ff50ada8d1
|
|
| BLAKE2b-256 |
11b943ed6eb3dd61a90d73dbf499f68f812ba1a97fe4b8759a26d17b06fb8f7c
|
File details
Details for the file concinno_skills_memoria-0.3.1-py3-none-any.whl.
File metadata
- Download URL: concinno_skills_memoria-0.3.1-py3-none-any.whl
- Upload date:
- Size: 75.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d694b6fe4266e63294139f1b988cdb723b421a1335099dfbb9804a5595ebeedc
|
|
| MD5 |
a3196d387bfc2695621a1a4e7fa9ed42
|
|
| BLAKE2b-256 |
4a749a57c57712ad8ab6bc1c18cf7c2226d86beb7ce57f467848387fd2416235
|