360 Secure SkillHub
360 安全技能中心

Loop Engineering

核心功能:讲解Loop Engineering这一AI编程范式,指导从单提示调用转向多Agent自主循环系统,涵盖核心概念、关键组件、/loop和/goal原语、设计原则,提供常见模式、配置示例、反模式及平台集成参考。典型使用场景:用户学习Loop Engineering、AI循环系统、自主Agent设计等相关主题时,输入相关查询即可获取专业讲解与实践指引。

openlark
openlark
热度 70.10
最近更新 2026-06-25 22:12:15
分类:开发依赖:纯提示词应用场景:概念解释 / 自动化脚本 / 研究

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add loop-engineering
Metadata
name
loop-engineering
description
Loop Engineering AI programming paradigm guide. Covers the core concepts of transitioning from single prompt calls to autonomous loop systems, key components, loop patterns, configuration examples, and anti-patterns.

Loop Engineering

Loop Engineering is a new AI programming paradigm -- designing autonomous loop systems that allow Agents to continuously execute tasks in an environment with goals, feedback, and self-verification, eliminating the need for manual prompting.

Use Cases

Use when users need to learn about "Loop Engineering", "AI loop systems", "autonomous Agent design", "/loop", "/goal", "AI programming paradigms", or "system architect".

Core Concepts

Transition from single prompt calls to continuous loop systems:

Paradigm How It Works Developer Role
Prompt Engineering Manually enter prompts, model executes once, human judges results Prompt Engineer
Harness Engineering Build a constrained environment for a single Agent with pre-checks/fixes/hooks, still requires human triggering Harness Engineer
Loop Engineering Manage multi-Agent sequencing, decision-making, and autonomous loops, self-driven over long periods across many rounds System Architect / Loop Engineer

Key Components

Component Purpose Reference
Automations Trigger tasks by time/event, support periodic execution and archiving See config-examples
Worktrees Manage task state and context, maintain memory and state persistence across rounds See config-examples
Skills Encapsulate reusable task capabilities as skill modules for the loop system to invoke See patterns
Plugins/Connectors Extend system capabilities, interact with external tools or services See integration
Sub-agents Small specialized Agents for division of labor, supporting parallel multi-Agent task execution See patterns / config-examples
External Memory & Feedback Loops Achieve self-assessment and correction through mechanisms like logs, tests, and type checking See anti-patterns

/loop and /goal Primitives

Primitive Behavior Use Case Usage Tip
/loop Execute tasks repeatedly on a cycle Scheduled checks, periodic maintenance Must set maxRounds; no termination condition = infinite loop
/goal Run continuously until verifiable conditions are met Goal-oriented autonomous tasks, with an independent model checking completion each round Completion conditions must be objectively verifiable (file exists, tests pass, metrics met)

Quick Start

  1. Define the goal: Do you want scheduled patrols, or are you pursuing a verifiable objective? Use /loop for the former, /goal for the latter.
  2. Choose a pattern: Browse common loop patterns to find a design that matches your scenario.
  3. Configure components: Refer to configuration examples to build the loop skeleton.
  4. Avoid pitfalls: Read anti-patterns to prevent issues in your design early on.
  5. Platform integration: Refer to platform integration to connect with your actual toolchain.

Design Principles

  • Goal definition: Specify verifiable completion conditions to prevent Agents from falling into meaningless loops
  • Feedback mechanisms: Enable Agents to self-assess through tests, validation, logs, and other mechanisms
  • State management: Use Worktrees to maintain cross-round context and memory
  • Modularity: Encapsulate reusable capabilities as Skills and Plugins
  • Division of labor: Reasonably partition Sub-agent responsibilities, parallelize to improve efficiency
  • Graceful termination: Set timeouts, max rounds, and abnormal exit conditions

File Navigation

File Content Who It's For
patterns.md 8 common loop patterns + selection guide Need to quickly find a matching pattern
config-examples.md Automation / Worktree / Sub-agent configuration examples Starting to build a loop system
anti-patterns.md Common mistakes + correction strategies Troubleshooting or preventing issues
integration.md OpenClaw / TaskFlow and other platform integration Connecting to actual toolchains