import{A as e,d as t,m as n,t as r}from"./plugin-vue_export-helper-DazhzKqf.js";var i=JSON.parse(`{"path":"/guide/basic-concepts.html","title":"Basic Concepts","lang":"en-US","frontmatter":{},"git":{},"filePathRelative":"guide/basic-concepts.md"}`),a={name:`basic-concepts.md`};function o(r,i,a,o,s,c){return e(),t(`div`,null,[...i[0]||=[n(`<h1 id="basic-concepts" tabindex="-1"><a class="header-anchor" href="#basic-concepts"><span>Basic Concepts</span></a></h1><p>HyperFlow is a self-improving agent framework. Instead of manually tuning an AI agent, you let another AI agent do it automatically.</p><p>The core idea comes from evolutionary computation and Quality-Diversity (QD) algorithms: maintain an <strong>archive</strong> of agent versions, evaluate each one, and use the best-performing versions as starting points for further improvement.</p><h2 id="the-two-agents" tabindex="-1"><a class="header-anchor" href="#the-two-agents"><span>The Two Agents</span></a></h2><h3 id="taskagent-?-the-worker" tabindex="-1"><a class="header-anchor" href="#taskagent-?-the-worker"><span>TaskAgent ? The Worker</span></a></h3><p>The TaskAgent serves as the problem solver for domain-specific tasks. It receives a formatted prompt, optionally uses tools, and returns a prediction.</p><ul><li><strong>Input</strong>: A task description.</li><li><strong>Output</strong>: A prediction.</li><li><strong>Tools</strong>: Domain-specific, optional.</li></ul><h3 id="metaagent-?-the-improver" tabindex="-1"><a class="header-anchor" href="#metaagent-?-the-improver"><span>MetaAgent ? The Improver</span></a></h3><p>The MetaAgent's job is to make the TaskAgent better. It acts as the "mutation operator". It reads past evaluation results, identifies failures, and edits source code (prompts, logic, tools) to fix them.</p><ul><li><strong>Input</strong>: Repo path + eval results path + parent score</li><li><strong>Output</strong>: Modified source code on disk (patches/diffs)</li><li><strong>Tools</strong>: <code>bash</code> (run shell commands) + <code>editor</code> (view/edit files) ? built-in</li></ul><h2 id="the-evolutionary-loop" tabindex="-1"><a class="header-anchor" href="#the-evolutionary-loop"><span>The Evolutionary Loop</span></a></h2><p>The evolutionary loop (<code>run_generate_loop</code>) is the heart of the system. It runs multiple generations, each improving on a previous one.</p><div class="mermaid"> graph TD A[Archive] -->|1. Select Parent| B(Setup Executor) B -->|2. Apply Lineage Patches| C{MetaAgent Runs} C -->|3. Reads failures & modifies code| D[TaskAgent Runs] D -->|4. Evaluated against harness| E{Harness Evaluation} E -->|5. Store score & diff| A style A fill:#2a9d8f,stroke:#fff,stroke-width:2px,color:#fff style C fill:#e76f51,stroke:#fff,stroke-width:2px,color:#fff style D fill:#e9c46a,stroke:#fff,stroke-width:2px,color:#333 </div><h2 id="the-archive" tabindex="-1"><a class="header-anchor" href="#the-archive"><span>The Archive</span></a></h2><p>The archive is the central data structure stored as a JSON Lines (JSONL) file that records the history of all generations. It serves as a <strong>versioned record of evolutionary improvement</strong>, acting as a family tree where different generations can branch from different original parent versions.</p>`,15)]])}var s=r(a,[[`render`,o]]);export{i as _pageData,s as default};
|