Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

hyperagent

БесплатноЗапускает вложенные скриптыНе проверен

Run a self-referential self-improving agent loop where a meta-agent iteratively modifies a task-agent's code to optimize for any measurable target. Based on…

ckorhonenот ckorhonen★ 35 звёзд на GitHub

Об этом скилле

Hyperagent

Quick Start — Simple Examples

New to Hyperagent? Try these beginner-friendly tasks before the full setup.

1. Optimize a simple Python script to run faster

Say: "Use hyperagent to optimize this script for speed" and paste something like:

# slow_sort.py
def sort_numbers(nums):
    result = []
    while nums:
        smallest = min(nums)
        result.append(smallest)
        nums.remove(smallest)
    return result

Hyperagent will benchmark it, propose a faster implementation, and validate the improvement.

2. Improve a prompt to get better answers

Say: "Run hyperagent on this prompt and improve accuracy" with a prompt like:

Summarize this article in one sentence.

The meta-agent iterates on the prompt, measures quality, and keeps improvements that score higher.

3. Make a sorting function more efficient

Say: "Evolve this function with hyperagent" and paste any function. Hyperagent creates a benchmark, runs generations of improvements, and shows you the performance gain per generation.

4. Self-improve any script

Say: "Self-improve this agent/script" and point to any Python file. Hyperagent wraps it in an evaluation loop, proposes modifications, and tracks what works.

The simplest possible setup: create task.sh that prints METRIC score=0.5, then run python3 scripts/init_session.py. From there the loop is fully automated.


Self-referential self-improvement: a meta-agent that modifies a task-agent (and itself) to optimize any measurable objective.

Inspired by Facebook Research's Hyperagents paper (arXiv:2603.19461), which demonstrated that agents combining a task-solver and a self-modifying meta-level into a single editable program can achieve open-ended, compounding improvements that transfer across domains.

How It Works

A hyperagent is a system with two components in a single editable codebase:

  1. Task Agent — solves the target task (benchmark, code generation, data processing, etc.)
  2. Meta Agent — analyzes task performance history and proposes modifications to the task agent's code (and optionally its own code)

The key insight from the paper: when the meta-level modification procedure is itself editable, the system can improve not just task performance but also the mechanism that generates future improvements — enabling compounding, transferable gains.

Core Principles

  1. Self-referential modification

    The meta-agent can modify the task-agent's code AND its own strategy. Both live in the same editable workspace. This enables metacognitive self-improvement: improving how you improve.

  2. Population-based exploration (archive)

    Don't just keep the best variant — maintain an archive of all successful variants as stepping stones. Parent selection favors high performers with unexplored potential.

  3. Empirical evaluation gates everything

    No change is accepted without measurement. Every candidate is evaluated against the task benchmark with repeated trials.

  4. Persistent memory and performance tracking

    The system maintains a structured history of all experiments, hypotheses, and outcomes. Later generations build on earlier insights — no rediscovering dead ends.

  5. Transfer across domains

    Meta-level improvements (performance tracking, evaluation strategies, hypothesis generation patterns) are domain-agnostic and can be transferred to new tasks.

Available Scripts

  • scripts/common.py — shared utilities (archive management, metrics, reporting)
  • scripts/init_session.py — initialize a hyperagent session, scaffold the workspace
  • scripts/run_task.py — evaluate a task-agent variant and record metrics
  • scripts/log_variant.py — log evaluated record, decide disposition, update archive and reports
  • scripts/render_report.py — generate HTML report of the full evolutionary history
  • scripts/select_parent.py — select a parent from the archive for the next generation

Note: There is no generate_variant.py script — the meta-agent role (hypothesis generation and code modification) is performed by the LLM agent itself, not by a script.

All scripts are non-interactive, expose --help, emit structured JSON on stdout, and keep diagnostics on stderr.

Default Workflow

  1. Initialize the session after defining the optimization target:

    python3 scripts/init_session.py \
      --goal "Improve prompt accuracy on math benchmark" \
      --metric-name accuracy \
      --unit pct \
      --direction higher \
      --task-command ./task.sh \
      --checks-command ./checks.sh \
      --scope src/agent.py \
      --max-generations 50
    
  2. Evaluate the baseline (generation 0):

    python3 scripts/run_task.py \
      --id gen-000 \
      --hypothesis "Control: unmodified task agent" \
      --change-summary "No modifications" \
      --baseline \
      --output .hyperagent/gen-000.json
    
    python3 scripts/log_variant.py --in
    
Полный SKILL.md на GitHub

Установить hyperagent в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

DOCS.mdscripts/common.pyscripts/init_session.pyscripts/log_variant.pyscripts/render_report.pyscripts/run_task.pyscripts/select_parent.py

FAQ

Что делает скилл hyperagent?

Run a self-referential self-improving agent loop where a meta-agent iteratively modifies a task-agent's code to optimize for any measurable target. Based on Facebook Research's Hyperagents paper (arXiv:2603.19461). Use when asked to "run hyperagent", "self-improve this", "optimize with self-modification", or "evolve this agent/script".

Как установить скилл hyperagent?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл hyperagent запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить hyperagent с