Λογότυπο Hor Agent Loop

Hor Agent Loop

Οργανισμός
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.

Επισκόπηση

Εκδότηςopenreachtech
Αποθετήριοhora-skills-ort-renchan
Όνομα δεξιότηταςhor-agent-loop
Αστέρια
32
Forks
0
Συνοδευτικά αρχεία
4
Άδεια χρήσηςApache-2.0
Σύνδεσμοι
  • Οδηγίες σε Markdown

    Ένα αρχείο SKILL.md που το μοντέλο φορτώνει όταν χρειάζεται, ώστε να καταναλώνει token μόνο όταν ένα αίτημα είναι πράγματι σχετικό.

  • Λειτουργεί με οποιοδήποτε LLM

    Οι δεξιότητες AI είναι απλό Markdown, όχι κώδικας για συγκεκριμένο πάροχο, επομένως αυτή η δεξιότητα λειτουργεί με GPT, Claude, Gemini, Grok ή ένα τοπικό μοντέλο.

  • 4 συνοδευτικά αρχεία

    Σενάρια, πρότυπα και υλικό αναφοράς που μπορεί να διαβάζει το μοντέλο καθώς εργάζεται. Τα αρχεία είναι μόνο για ανάγνωση και δεν εκτελούνται ποτέ.

  • Ανοιχτού κώδικα

    Δημοσιεύτηκε από openreachtech στο GitHub. Διαβάστε το πηγαίο περιεχόμενο πριν εγκαταστήσετε τη δεξιότητα.

Εγκατάσταση

Εγκαταστήστε τη δεξιότητα AI Hor Agent Loop στο TypingMind για να τη χρησιμοποιείτε με οποιοδήποτε LLM ή προσθέστε τη σε άλλον πράκτορα AI που διαβάζει αρχεία SKILL.md.

1

Εγκατάσταση στο TypingMind

Το TypingMind εγκαθιστά μια δεξιότητα απευθείας από τον φάκελό της στο GitHub — διαβάζει το SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία σε πακέτο και αποθηκεύει το αποτέλεσμα τοπικά.

  1. Ανοίξτε την εφαρμογή και μεταβείτε στα Πρόσθετα → Δεξιότητες.
  2. Επιλέξτε «Εγκατάσταση από GitHub».
  3. Επικολλήστε το παρακάτω URL του φακέλου της δεξιότητας και επιβεβαιώστε.
    https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-agent-loop
  4. Ενεργοποιήστε τη δεξιότητα σε κάθε συνομιλία όπου θέλετε να είναι διαθέσιμη.
Πρόσθετα → Δεξιότητες → Νέα δεξιότητα → Από URL του GitHub, έπειτα επικολλήστε το URL του φακέλου και πατήστε «Συνέχεια».
2

Εγκατάσταση σε άλλον πράκτορα AI

Κάθε πράκτορας AI που διαβάζει τη μορφή Agent Skills μπορεί να χρησιμοποιήσει αυτή τη δεξιότητα — αντιγράψτε τον φάκελο στον κατάλογο δεξιοτήτων του.

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
Επανεκκινήστε το Claude Code μετά την αντιγραφή, ώστε να εντοπίσει τη νέα δεξιότητα.

Χρησιμοποιήστε τη στο TypingMind

Ενεργοποιήστε τη δεξιότητα Hor Agent Loop σε οποιαδήποτε συνομιλία στο TypingMind και το μοντέλο αναλαμβάνει τα υπόλοιπα. Το όνομα και η περιγραφή της περιλαμβάνονται στην προτροπή συστήματος και, μόλις προκύψει ένα σχετικό αίτημα, το μοντέλο φορτώνει μόνο του τις πλήρεις οδηγίες — δεν χρειάζεται ποτέ να την καλείτε χειροκίνητα και δεν καταναλώνει token μέχρι να χρησιμοποιηθεί πραγματικά.

Το μοντέλο φορτώνει αυτόματα τη δεξιότητα Hor Agent Loop μόλις λάβει ένα σχετικό αίτημα.

Λειτουργεί με οποιοδήποτε μοντέλο AI

Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας για συγκεκριμένο πάροχο, οπότε η δεξιότητα Hor Agent Loop δεν περιορίζεται στο μοντέλο για το οποίο γράφτηκε. Εγκαταστήστε τη μία φορά στο TypingMind και χρησιμοποιήστε τη με GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ή ένα τοπικό μοντέλο που εκτελείτε εσείς — πάντα με τα δικά σας κλειδιά API.

  • Φόρτωση μόνο όταν χρειάζεται

    Η προτροπή συστήματος περιλαμβάνει μόνο το όνομα και την περιγραφή. Οι οδηγίες ανακτώνται με το πρώτο σχετικό αίτημα, οπότε μια δεξιότητα που δεν χρησιμοποιείται δεν έχει κόστος.

  • Αλλάξτε μοντέλα κατά τη συνομιλία

    Επειδή η δεξιότητα αποτελείται από οδηγίες και όχι από κώδικα, η αλλαγή μοντέλου δεν επηρεάζει τη λειτουργία της — το επόμενο μοντέλο διαβάζει το ίδιο αρχείο SKILL.md.

Οδηγίες δεξιότητας

Αυτό είναι το περιεχόμενο του αρχείου SKILL.md που φορτώνει το μοντέλο. Διαβάστε το πριν από την εγκατάσταση — μια δεξιότητα αποτελείται από οδηγίες που θα ακολουθήσει το μοντέλο σας.

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).

Συνοδευτικά αρχεία

Το μοντέλο τα διαβάζει όποτε χρειάζεται, όσο η δεξιότητα είναι φορτωμένη. Διατίθενται ως αρχεία για ανάγνωση και δεν εκτελούνται ποτέ.

Συχνές ερωτήσεις

Τι κάνει η δεξιότητα AI 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.

Γιατί να χρησιμοποιήσετε τη δεξιότητα Hor Agent Loop στο TypingMind;

Επειδή την εγκαθιστάτε μία φορά και τη χρησιμοποιείτε με οποιοδήποτε μοντέλο. Η Hor Agent Loop είναι απλό Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως η ίδια δεξιότητα λειτουργεί με GPT-5, Claude, Gemini, Grok ή ένα τοπικό μοντέλο — και μπορείτε να αλλάξετε μοντέλο κατά τη διάρκεια της συνομιλίας χωρίς να διακοπεί η λειτουργία της. Το TypingMind λειτουργεί με τα δικά σας κλειδιά API, οπότε πληρώνετε απευθείας τους παρόχους αντί για συνδρομή ανά θέση χρήστη, ενώ οι δεξιότητες και οι συνομιλίες σας παραμένουν στον δικό σας χώρο αποθήκευσης.

Πώς εγκαθιστώ τη Hor Agent Loop στο TypingMind;

Στο TypingMind, ανοίξτε Πρόσθετα → Δεξιότητες → Εγκατάσταση από το GitHub και επικολλήστε το https://github.com/openreachtech/hora-skills-ort-renchan/tree/main/kit/skills/hor-agent-loop. Το TypingMind διαβάζει το αρχείο SKILL.md, συγκεντρώνει τα συνοδευτικά αρχεία και εγκαθιστά τη δεξιότητα, την οποία μπορείτε να ενεργοποιείτε ανά συνομιλία.

Ποια μοντέλα AI μπορούν να χρησιμοποιήσουν τη δεξιότητα Hor Agent Loop;

Οποιοδήποτε μοντέλο συνδέετε στο TypingMind. Οι δεξιότητες AI είναι απλές οδηγίες Markdown και όχι κώδικας ειδικά για κάποιον πάροχο, επομένως τα GPT, Claude, Gemini, Grok και τα τοπικά μοντέλα μπορούν όλα να φορτώσουν αυτή τη δεξιότητα όταν ένα αίτημα αντιστοιχεί σε αυτή.

Με πόσα μοντέλα AI μπορώ να χρησιμοποιήσω τη Hor Agent Loop;

Με όσα θέλετε. Εφόσον ένα μοντέλο υποστηρίζει δεξιότητες, μπορείτε να χρησιμοποιήσετε τη Hor Agent Loop με αυτό — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama και άλλα — όλα στο TypingMind με τα δικά σας κλειδιά API.

Είναι δωρεάν η δεξιότητα AI Hor Agent Loop;

Ναι. Δημοσιεύεται στο GitHub από τον χρήστη openreachtech με την άδεια χρήσης Apache-2.0. Πληρώνετε μόνο τον δικό σας πάροχο AI για τα token που χρησιμοποιείτε.

Τι είναι οι δεξιότητες AI;

Μια δεξιότητα AI είναι ένα επαναχρησιμοποιήσιμο πακέτο οδηγιών που διδάσκει σε ένα μοντέλο AI πώς να εκτελεί μια συγκεκριμένη εργασία. Ακολουθεί την ανοιχτή μορφή Agent Skills: ένα αρχείο SKILL.md με όνομα και περιγραφή, μαζί με τυχόν σενάρια κώδικα, πρότυπα ή αρχεία αναφοράς που μπορεί να χρειαστεί το μοντέλο. Το μοντέλο διαβάζει τις οδηγίες μόνο όταν το αίτημά σας αντιστοιχεί στη δεξιότητα, οπότε μια εγκατεστημένη δεξιότητα δεν κοστίζει τίποτα μέχρι να χρησιμοποιηθεί.

Σε τι διαφέρουν οι δεξιότητες AI από τα πρόσθετα ή τους συνδέσμους MCP;

Ένα πρόσθετο ή ένας σύνδεσμος MCP παρέχει στο μοντέλο νέα εργαλεία που μπορεί να καλέσει — κώδικα που εκτελείται κάπου και επιστρέφει ένα αποτέλεσμα. Μια δεξιότητα AI παρέχει αντί γι’ αυτό γνώσεις και διαδικασίες στο μοντέλο: πώς να προσεγγίσει μια εργασία, ποια βήματα να ακολουθήσει και ποια χαρακτηριστικά έχει ένα καλό αποτέλεσμα. Οι δεξιότητες είναι απλό Markdown, επομένως δεν χρειάζονται διακομιστή, κλειδί API ή περιβάλλον εκτέλεσης και λειτουργούν με οποιοδήποτε μοντέλο.

Προβολή όλων

Στήστε δικό σας χώρο εργασίας AI τώρα

Εγγραφείτε στο ενημερωτικό μας δελτίο για να ενημερώνεστε για νέες λειτουργίες και μελλοντικές κληρώσεις δώρων 👇