The Problem Developers who want an LLM‑driven agent that can create, modify and version its own “skills” currently need to glue together many disparate pieces: a Flask‑based API, a React GUI, IM adapters, and a custom skill‑dispatch runtime. The code base is split across fifteen sub‑projects, so any change touches many files and a handful of very‑central modules, raising the risk of regressions and making onboarding costly.

What This Does Memento‑Skills ships a self‑contained framework that lets an agent read existing skill definitions, write new ones after execution, and reflect on outcomes to improve future routing. Core logic lives in core/ (e.g., core/memento_s/skill_dispatch/dispatcher.py, core/skill/gateway.py), while infrastructure such as token‑counting and compacting lives in infra/. The GUI (gui/app.py) and CLI entry points (cli/main.py, 3rd/weixin_sdk/cli.py) provide two ways to launch the system. Shared types and schemas (shared/schema/__init__.py) are used throughout, and the logger (utils/logger.py) is the most‑imported hub (108 importers, 1 outgoing import).

How It Is Wired Execution typically starts at a concrete entry point:

  • cli/main.py::_bootstrap_config (line 67) parses the user config, creates a ConfigManager (in middleware/config/config_manager.py – 43 functions, file I/O), and then dispatches commands via the CLI parser.
  • The GUI entry gui/app.py:_generate_conversation_title (line 904) builds a conversation title, which eventually calls infra/compact/utils.py:estimate_tokens_fast (cryptographic hash) and middleware/llm/llm_client.py for LLM calls.

From the internal call graph, the function exists is invoked from 199 locations, making it a high‑impact utility. The dispatcher (core/memento_s/skill_dispatch/dispatcher.py:execute) reaches 227 functions but is not called elsewhere, indicating a possible dead‑path for external triggers. The utils/logger module sits at the hub of the import graph; any change there propagates to over a hundred modules, so it should remain stable and lightweight.

Circular imports are present in three modules (shared/schema/__init__.py, core/memento_s/skill_dispatch/__init__.py, middleware/llm/__init__.py). These cycles increase cognitive load and can cause import‑time failures; breaking them by extracting shared types or deferring imports is recommended.

Deeply nested functions (up to 8 levels) appear in core/skill/gateway.py, middleware/llm/llm_client.py, and core/skill/execution/state.py, making the flow hard to follow. Broad except Exception blocks are used in several utilities, swallowing errors that would be valuable during debugging.

How To Use It

# Clone the repo
git clone https://github.com/moses-y/Memento-Skills
cd Memento-Skills

# Install the Python package (pyproject.toml declares dependencies)
pip install -e .

Configuration – The default configuration is read by middleware/config/config_manager.py. Create a config.yaml in the project root (the manager looks for self.user_config_dir and creates it if missing).

Run the CLIpython -m cli.main --help shows the available commands; the main dispatch loop is in cli/main.py.

Run the GUIpython -m gui.app starts the React‑backed desktop client (the UI assets are under gui/).

No Dockerfile or Makefile is present, so containerisation must be added manually if required.

Real‑World Use A SaaS platform can embed Memento‑Skills as a “skill‑as‑a‑service” component. The platform launches the CLI (cli/main.py) in a background worker, registers custom IM adapters (e.g., im/feishu/cli.py), and stores generated skills in a shared DB directory managed by middleware/config/config_manager.py. When a user submits a task via the GUI, the dispatcher routes to an existing skill or triggers core/memento_s/skill_dispatch/dispatcher.py:execute, which writes back a success score to the skill metadata, enabling continual improvement without retraining the underlying LLM.

Code Health & Issues

  • High – License missing – No LICENSE file; reuse is legally blocked.
  • High – No lockfilepyproject.toml declares dependencies but no poetry.lock/uv.lock; builds are non‑reproducible.
  • High – No CI – Repository lacks any .github/workflows or other CI configuration; changes are not automatically built or tested.
  • Medium – Dependabot absent – No .github/dependabot.yml; security updates are manual.
  • High – Import hubutils/logger (108 importers) and middleware/config/__init__ (76 importers) have large blast radii; keep them small and stable.
  • High – Import cycles – Three modules form cycles, increasing maintenance risk.
  • High – Deep nesting & oversized files – Files such as middleware/llm/llm_client.py exceed 1 000 lines and contain 8‑level indentation, hindering readability.
  • Medium – Broad exception handling – Several utilities use bare except clauses, masking errors.

The Bottom Line Memento‑Skills provides a complete, open‑source stack for self‑evolving LLM agents, with a clear separation between core skill logic, infrastructure, and UI. However, the code base suffers from architectural hotspots (import hubs, cycles), deep nesting, and missing production scaffolding (license, lockfile, CI). It is suitable for teams that need a research‑grade platform and are prepared to refactor the identified hot spots before using it in a production environment.