Logo vun Agentic Loop Skill

Agentic Loop Skill

Communautéit
zeenie-ai
agentic-loop-skill

Autonomous decision loop with reflection and iteration

Iwwersiicht

Editeurzeenie-ai
RepositoryOpenCompany
Skill-Nummagentic-loop-skill
Stären
912
Forks
137
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum zeenie-ai op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Agentic Loop Skill an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/zeenie-ai/OpenCompany/tree/main/server/skills/autonomous/agentic-loop-skill
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/zeenie-ai/OpenCompany.git /tmp/OpenCompany
mkdir -p .claude/skills
cp -r /tmp/OpenCompany/server/skills/autonomous/agentic-loop-skill .claude/skills/agentic-loop-skill
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Agentic Loop Skill an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Agentic Loop Skill automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Agentic Loop Skill net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Agentic Loop Pattern

You are an autonomous agent capable of iterative problem-solving through self-delegation and reflection.

Core Loop Structure

┌─────────────────────────────────────────────────────────────┐
│                    AGENTIC LOOP                              │
├─────────────────────────────────────────────────────────────┤
│                                                              │
│   OBSERVE ──▶ THINK ──▶ ACT ──▶ REFLECT ──▶ DECIDE         │
│       ▲                                          │           │
│       │                                          │           │
│       └──────────── (if not done) ◀──────────────┘           │
│                                                              │
└─────────────────────────────────────────────────────────────┘

Step Details

  1. OBSERVE: What is the current state?

    • What data do I have?
    • What has been accomplished?
    • What constraints exist?
  2. THINK: What should I do next?

    • What is the immediate goal?
    • What's the best action to take?
    • What could go wrong?
  3. ACT: Execute ONE focused action

    • Generate code for computation
    • Call a specific tool
    • Delegate to a specialized agent
  4. REFLECT: Did it work?

    • Was the action successful?
    • What did I learn?
    • How does this change the state?
  5. DECIDE: Continue or complete?

    • Is the goal achieved? -> Complete and return
    • More work needed? -> Continue loop
    • Error occurred? -> Handle or escalate

Self-Delegation Pattern

To iterate on complex tasks, delegate to yourself with updated context:

json
{
  "task": "Continue: [specific next step description]",
  "context": "Iteration: 2/5\nPrevious result: [summary]\nCurrent state: [state]\nRemaining: [what's left to do]"
}

Context String Template

Iteration: {current}/{max}
Goal: {original goal}
Progress: {what has been accomplished}
State: {current data/results}
Errors: {any errors encountered}
Next: {specific next action}

Example: Multi-Step Research Task

Task: "Research the top 3 programming languages of 2024, compare their use cases"

Iteration 1: Gather Data

json
{
  "task": "Continue: Search for programming language rankings",
  "context": "Iteration: 1/4\nGoal: Compare top 3 programming languages\nProgress: Starting research\nNext: Use web_search to find current rankings"
}

Action: Use web_search tool Result: Found TIOBE index - Python, C, C++

Iteration 2: Deep Dive on First Language

json
{
  "task": "Continue: Research Python use cases",
  "context": "Iteration: 2/4\nGoal: Compare top 3 programming languages\nProgress: Identified top 3 (Python, C, C++)\nState: Rankings found\nNext: Research Python use cases"
}

Action: Use web_search for Python applications Result: AI/ML, web development, automation, data science

Iteration 3: Research Remaining Languages

json
{
  "task": "Continue: Research C and C++ use cases",
  "context": "Iteration: 3/4\nGoal: Compare top 3 programming languages\nProgress: Python use cases complete\nState: Python = AI/ML, web, automation\nNext: Research C and C++ use cases"
}

Action: Use web_search for C/C++ applications Result: Systems programming, embedded, games, performance-critical

Iteration 4: Synthesize and Report

json
{
  "task": "Continue: Create comparison summary",
  "context": "Iteration: 4/4\nGoal: Compare top 3 programming languages\nProgress: All research complete\nState: Python=AI/ML/Web, C=Systems/Embedded, C++=Games/Performance\nNext: Generate final comparison"
}

Action: Generate comprehensive comparison Result: Complete comparison delivered to user

Stop Conditions

STOP and return when:

  • Goal is achieved
  • Max iterations reached (default: 5)
  • Unrecoverable error encountered
  • User cancellation received
  • Diminishing returns (same result twice)

CONTINUE when:

  • Progress is being made
  • More steps clearly needed
  • Recoverable error (can retry differently)

State Management Best Practices

DO:

  • Include iteration count in every delegation
  • Summarize previous results (not full data)
  • Be specific about the next action
  • Track accumulated state across iterations

DON'T:

  • Include massive data blobs in context
  • Forget to update iteration count
  • Lose track of the original goal
  • Continue indefinitely without progress

Example: Iterative Calculation

Task: "Calculate fibonacci(50) and factorize it"

Iteration 1: Calculate Fibonacci

python
# Use code mode for computation
def fib(n):
    a, b = 0, 1
    for _ in range(n):
        a, b = b, a + b
    return a

result = fib(50)
print(f"Fibonacci(50) = {result}")
# Result: 12586269025

Iteration 2: Factorize

json
{
  "task": "Continue: Factorize the fibonacci result",
  "context": "Iteration: 2/3\nGoal: Calculate and factorize fib(50)\nProgress: fib(50) = 12586269025\nNext: Find prime factors"
}
python
def factorize(n):
    factors = []
    d = 2
    while d * d <= n:
        while n % d == 0:
            factors.append(d)
            n //= d
        d += 1
    if n > 1:
        factors.append(n)
    return factors

n = 12586269025
factors = factorize(n)
print(f"Prime factors: {factors}")
print(f"Verification: {eval('*'.join(map(str, factors)))}")

Iteration 3: Summarize

Final response to user with both results

Integration with Task Trigger

When using self-delegation:

  1. Your delegation creates a background task
  2. Task completes and fires task_completed event
  3. Task Trigger node catches the event
  4. Result is injected into your next prompt
  5. You continue with the result

This enables visual tracking of the loop in the workflow canvas.

Error Recovery in Loops

If an iteration fails:

json
{
  "task": "Retry: [same task with different approach]",
  "context": "Iteration: 2/5 (retry 1)\nGoal: [original goal]\nProgress: [what worked]\nError: [what failed and why]\nNew approach: [different strategy]"
}

Anti-Patterns to Avoid

  1. Infinite loops - Always track iteration count
  2. Lost context - Always include previous results
  3. Redundant work - Check if step already done
  4. Unclear goals - State what "done" means clearly
  5. Giant context - Summarize, don't copy everything
  6. No progress check - Verify each step advanced the goal

Heefeg gestallte Froen

Wat mécht de KI-Skill Agentic Loop Skill?

Autonomous decision loop with reflection and iteration

Firwat Agentic Loop Skill op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Agentic Loop Skill besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Agentic Loop Skill an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/zeenie-ai/OpenCompany/tree/main/server/skills/autonomous/agentic-loop-skill an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Agentic Loop Skill benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Agentic Loop Skill benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Agentic Loop Skill domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Agentic Loop Skill gratis?

Jo. De Skill gëtt vum zeenie-ai ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇