Logo von Hor Agent Loop

Hor Agent Loop

Organisation
openreachtech
hor-agent-loop

Build an LLM agent loop (iterative agent) in a backend repository with the three @openreachtech/mentsu-agent-loop packages — core (the transport-agnostic iteration engine), renchan-job (run a loop as a BullMQ/Redis job with progress publishing), and graphql (a mutation that launches the loop plus a subscription that streams its progress). Use whenever the user asks to add or edit an agent loop, an agent action, a composite agent, or to stream agent progress.

Übersicht

Herausgeberopenreachtech
Repositoryhora-skills-ort-renchan
Skill-Namehor-agent-loop
Sterne
32
Forks
0
Mitgelieferte Dateien
4
LizenzApache-2.0
Links
  • Anweisungen in Markdown

    Eine SKILL.md-Datei, die das Modell bei Bedarf lädt. So werden nur dann Token verbraucht, wenn eine Anfrage tatsächlich dazu passt.

  • Funktioniert mit jedem LLM

    KI-Skills bestehen aus reinem Markdown, nicht aus anbieterspezifischem Code. Daher funktionieren sie mit GPT, Claude, Gemini, Grok oder einem lokalen Modell.

  • 4 mitgelieferte Dateien

    Skripte, Vorlagen und Referenzmaterial, die das Modell bei der Arbeit lesen kann. Die Dateien sind schreibgeschützt und werden niemals ausgeführt.

  • Open Source

    Von openreachtech auf GitHub veröffentlicht. Prüfen Sie den Quellinhalt vor der Installation.

Installation

Installieren Sie den KI-Skill Hor Agent Loop in TypingMind, um ihn mit jedem LLM zu nutzen, oder fügen Sie ihn einem anderen Agenten hinzu, der SKILL.md lesen kann.

1

In TypingMind installieren

TypingMind installiert einen Skill direkt aus seinem GitHub-Ordner — liest SKILL.md, bündelt die Ressourcendateien und speichert das Ergebnis lokal.

  1. Öffnen Sie die App und gehen Sie zu Plugins → Skills.
  2. Wählen Sie „Von GitHub installieren“.
  3. Fügen Sie die unten angegebene URL des Skill-Ordners ein und bestätigen Sie.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-agent-loop
  4. Aktivieren Sie den Skill in jedem Chat, in dem er verfügbar sein soll.
Plugins → Skills → Skill anlegen → Über GitHub-URL. Fügen Sie dann die Ordner-URL ein und klicken Sie auf „Weiter“.
2

In einem anderen Agenten installieren

Jeder Agent, der das Agent-Skills-Format lesen kann, kann diesen Skill nutzen — kopieren Sie den Ordner in das Skill-Verzeichnis des jeweiligen Agenten.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/openreachtech/hora-skills-ort-renchan.git /tmp/hora-skills-ort-renchan
mkdir -p .claude/skills
cp -r /tmp/hora-skills-ort-renchan/kit/skills/hor-agent-loop .claude/skills/hor-agent-loop
Starten Sie Claude Code nach dem Kopieren neu, damit der neue Skill erkannt wird.

In TypingMind verwenden

Aktivieren Sie Hor Agent Loop in einem beliebigen Chat in TypingMind. Den Rest übernimmt das Modell. Name und Beschreibung des Skills stehen im System-Prompt. Sobald eine Anfrage passt, lädt das Modell selbstständig die vollständigen Anweisungen — Sie müssen den Skill nie manuell aufrufen, und er verbraucht erst Token, wenn er tatsächlich genutzt wird.

Das Modell lädt Hor Agent Loop automatisch, sobald eine passende Anfrage gestellt wird.

Funktioniert mit jedem KI-Modell

KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher ist Hor Agent Loop nicht an das Modell gebunden, für das der Skill geschrieben wurde. Installieren Sie ihn einmal in TypingMind und nutzen Sie ihn mit GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder einem selbst betriebenen lokalen Modell — alles mit Ihren eigenen API-Keys.

  • Wird nur bei Bedarf geladen

    Der System-Prompt enthält nur den Namen und die Beschreibung. Die Anweisungen werden bei der ersten passenden Anfrage geladen. Ein ungenutzter Skill verursacht daher keine Kosten.

  • Modell im laufenden Chat wechseln

    Da der Skill aus Anweisungen statt aus Code besteht, funktioniert er auch nach einem Modellwechsel — das nächste Modell liest dieselbe SKILL.md-Datei.

Skill-Anweisungen

Dies ist der Inhalt von SKILL.md, den das Modell lädt. Lesen Sie ihn vor der Installation — ein Skill besteht aus Anweisungen, denen Ihr Modell folgt.

Agent Loop (building agent loops with mentsu-agent-loop)

A skill for implementing an LLM agent's iteration ("loop") in a backend. The iteration engine, progress delivery, composition, job execution, and GraphQL integration are all provided by the three @openreachtech/mentsu-agent-loop-* packages. The app writes only the domain-specific actions and loops; iteration, stopping, compression, parallelism, and transport ride on the ready-made base classes.

This skill covers the libraries' specs and use cases, plus the integration patterns for renchan's GraphQL and renchan-job-bullmq. Always use these three packages (never hand-roll your own iteration engine, queue bridge, or progress channel). The details are split into the detail files at the end.

Grand principle: write actions and loops without knowing about AI, DB, queues, or GraphQL (one-way dependency)

The center of this package family's design is a one-way dependency direction (outer → core). The iteration logic the app writes (actions / loops) imports no business dependency and no transport; everything is reached through the context (an opaque DI seam) and through thin adapters.

LayerPackageResponsibilityDepends on
core@openreachtech/mentsu-agent-loop-coreIteration engine (Action / Loop / composition / Runner / Topic). Zero dependenciesimports nothing
job execution@openreachtech/mentsu-agent-loop-renchan-jobRun a loop as a renchan-job / BullMQ Redis job and publish progress→ core, renchan-job-bullmq
GraphQL@openreachtech/mentsu-agent-loop-graphqlLaunch mutation + progress-subscription→ core, renchan
app(this repository)Actions / loops / wiring→ all of the above
  • Why keep the dependency one-way: the moment core imports AI/DB/queue/transport, the iteration logic is bound to a specific backend and can no longer be tested in-process or switched between execution modes. Keeping core dependency-free and receiving dependencies from context means the same loop runs in-process or as a job, and tests just swap context for a stub.
  • Why write only actions and loops: the iteration body (the tail-recursive iterate), the progress seam (emitProgress), composition (parallel / sequential), the queue bridge, and channel naming are all shared machinery; writing them per app guarantees drift. Push them into the base classes and implement only the abstract hooks.
  • Why "always these three packages": hand-rolling an iteration engine or progress channel reintroduces known failures — publish/subscribe channel mismatch, no retry, untestable code. The packages prevent these by design (e.g. AgentTopic structurally matches the publish and subscribe channels).
  • Everything is an instance method, overridable via extends. No pure functions or static-only classes. Why: even if the library has a bug or a gap, the app can always work around it by extending and overriding the relevant method (there is no true final). Write the app's overrides in the same style.

Cross-cutting rules

  • Business dependencies and transport are always received through context. Do not directly import AI clients, DB, HTTP, or queues inside an action or loop (core.md). Why: a direct import breaks in-process execution and stub injection, collapsing the one-way dependency of the grand principle.
  • Return null / an empty array for missing values, not undefined. One property per line in object literals (applies to sample code too). Avoid single-character variables and for / forEach / switch / else if; write with map / filter / reduce and early return. Why: match the existing codebase style so review attention goes to the logic.
  • One class per file, one export default. The constructor only assigns; defaults live in the factory (static create); getters just return the field.
  • Comments in produced artifacts (.js) are English, and this skill is written entirely in English (prose, tables, and example-code comments).

Choosing modules (what to install)

Stack adapters onto core per the requirement. Core is always required; add an adapter only when that integration is needed.

What you wantPackages needed
Run a loop in-process (CLI / tests / synchronous work / Lambda)core only
Turn a long loop into a Redis job (horizontal scale, retry, rate limiting)core + renchan-job
Launch over GraphQL and subscribe to progress in realtimecore + renchan-job + graphql
  • Why stack incrementally: actions and loops written with core alone can be turned into a job or a GraphQL endpoint without any change (the adapter swaps only the transport step). Do not install everything up front; layer on only what you need.

End-to-end progress (the backbone of the realtime log)

"Launch with a mutation → return accepted immediately → stream progress over a subscription" is the typical shape for an agent on the web. Progress follows this single path. Because the publish side (the Worker) and the subscribe side (the Subscription) use the same AgentTopic, the channel names match structurally.

[core]        loop.run({ input, onProgress })
                └ iterate emits emitProgress → onProgress(event) each iteration
[renchan-job] BaseAgentJobWorker: onProgress → job.updateProgress(event)
                → onJobProgress → publish to the channel AgentTopic.create({ channel, scope }).value
[graphql]     BaseAgentProgressSubscriptionResolver: subscribes to the same channel + scope
[frontend]    receives it in realtime over a GraphQL Subscription
  • Why use AgentTopic on both sides: if the publish and subscribe channel names drift apart, you get a silent "progress never arrives" failure. Concentrating the naming in one core class, with both sides composing from the same channel + scope, makes drift impossible by design. To change the naming rule, extend AgentTopic and override get value() in one place.

Detail files

  • core.md — the core (@openreachtech/mentsu-agent-loop-core) spec and use cases: actions / registry, the two loop types (AI-driven / procedural), composition (parallel Composite / sequential Pipeline / ActionStage), Runners, AgentTopic / AgentProgressEvent, the state model (state / context / compression).
  • graphql-integration.md — the pattern for integrating with renchan's GraphQL: the launch mutation (BaseRequestAgentMutationResolver) and the progress subscription (BaseAgentProgressSubscriptionResolver), channel matching via AgentTopic.
  • renchan-job-integration.md — the pattern for integrating with renchan-job-bullmq: the Worker (BaseAgentJobWorker) / Dispatcher (BaseAgentJobDispatcher) / JobAgentRunner, Engine / Share / Context wiring, concurrency / limiter, and the full progress-publish flow.
  • testing.md — testing guidelines: the contract test kit (LoopContractAssertion / ActionContractAssertion) and the unit-test approach for actions / loops / composition / Worker / Dispatcher / Resolver (stub context, assert onProgress, assert abstract throws).

Mitgelieferte Dateien

Das Modell liest diese Dateien bei Bedarf, während der Skill geladen ist. Sie werden als lesbare Dateien bereitgestellt und niemals ausgeführt.

Häufig gestellte Fragen

Was macht der KI-Skill Hor Agent Loop?

Build an LLM agent loop (iterative agent) in a backend repository with the three @openreachtech/mentsu-agent-loop packages — core (the transport-agnostic iteration engine), renchan-job (run a loop as a BullMQ/Redis job with progress publishing), and graphql (a mutation that launches the loop plus a subscription that streams its progress). Use whenever the user asks to add or edit an agent loop, an agent action, a composite agent, or to stream agent progress.

Warum Hor Agent Loop in TypingMind nutzen?

Weil Sie den Skill einmal installieren und mit jedem Modell verwenden können. Hor Agent Loop besteht aus reinem Markdown statt aus anbieterspezifischem Code. So funktioniert derselbe Skill mit GPT-5, Claude, Gemini, Grok oder einem lokalen Modell – und Sie können das Modell mitten im Chat wechseln, ohne dass der Skill seine Funktion verliert. TypingMind verwendet Ihre eigenen API-Schlüssel. Sie bezahlen die Anbieter daher direkt statt über ein Abonnement pro Nutzerplatz, und Ihre Skills und Chats bleiben in Ihrem eigenen Speicher.

Wie installiere ich Hor Agent Loop in TypingMind?

Öffnen Sie in TypingMind Plugins → Skills → Von GitHub installieren und fügen Sie https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-agent-loop ein. TypingMind liest die Datei SKILL.md, bündelt die zugehörigen Dateien und installiert alles als Skill, den Sie für jeden Chat einzeln aktivieren können.

Welche KI-Modelle können Hor Agent Loop nutzen?

Jedes Modell, das Sie in TypingMind verbinden. KI-Skills bestehen aus reinen Markdown-Anweisungen statt aus anbieterspezifischem Code. Daher können GPT, Claude, Gemini, Grok und lokale Modelle diesen Skill laden, wenn eine Anfrage dazu passt.

Wie viele KI-Modelle kann ich mit Hor Agent Loop verwenden?

So viele Sie möchten. Solange ein Modell Skills unterstützt, können Sie Hor Agent Loop damit verwenden – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama und weitere – alles in TypingMind mit Ihren eigenen API-Schlüsseln.

Ist der KI-Skill Hor Agent Loop kostenlos?

Ja. Der Skill wird von openreachtech auf GitHub unter der Lizenz Apache-2.0 veröffentlicht. Sie bezahlen nur Ihren eigenen KI-Anbieter für die verwendeten Token.

Was sind KI-Skills?

Ein KI-Skill ist ein wiederverwendbares Anweisungspaket, das einem KI-Modell vermittelt, wie es eine bestimmte Aufgabe erledigt. Es folgt dem offenen Format Agent Skills: eine Datei namens SKILL.md mit einem Namen und einer Beschreibung sowie allen Skripten, Vorlagen oder Referenzdateien, die das Modell möglicherweise benötigt. Das Modell liest die Anweisungen nur, wenn Ihre Anfrage zum Skill passt. Ein installierter Skill verursacht daher erst Kosten, wenn er verwendet wird.

Wie unterscheiden sich KI-Skills von Plugins oder MCP-Servern?

Ein Plugin oder MCP-Server stellt einem Modell neue aufrufbare Tools bereit – Code, der auf einem System ausgeführt wird und ein Ergebnis zurückgibt. Ein KI-Skill vermittelt dem Modell stattdessen Wissen und Vorgehensweisen: wie es eine Aufgabe angeht, welche Schritte es befolgt und wie eine gute Ausgabe aussieht. Skills bestehen aus reinem Markdown und benötigen daher weder Server noch API-Schlüssel oder Laufzeitumgebung. Sie funktionieren mit jedem Modell.

Alle

Jetzt eigenen KI-Arbeitsbereich einrichten

Abonnieren Sie unseren Newsletter und erfahren Sie mehr über neue Funktionen und kommende Gewinnspiele 👇