Logo vun Workflows

Workflows

Organisatioun
rejot-dev
workflows

Orchestrate durable multi-step work with defineWorkflow and operate workflow instances. Use when a current task needs retries, sleeps, waiting for an external event, or the user asks to inspect, signal, or retry a workflow instance.

Iwwersiicht

Editeurrejot-dev
Repositoryfragno
Skill-Nummworkflows
Stären
62
Forks
6
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 rejot-dev op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Workflows 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/rejot-dev/fragno/tree/main/apps/backoffice/content/static/skills/workflows
  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/rejot-dev/fragno.git /tmp/fragno
mkdir -p .claude/skills
cp -r /tmp/fragno/apps/backoffice/content/static/skills/workflows .claude/skills/workflows
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Workflows 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 Workflows automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Workflows 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.

Workflows

Use defineWorkflow for work that must survive retries, time, or an external continuation.

Authoring a workflow

  1. Preflight. Apply the system guidance's closed-world preflight before calling defineWorkflow. The workflow authoring declarations are already present in the system reference; read the provider declarations selected by that gate.

    Complete when the closed-world preflight passes. When it cannot pass, complete this branch by reporting the blocking requirement.

  2. Author. Define the workflow directly at the top level. Inline definitions automatically start; retain the returned instanceId. Save a workflow file only when the user asks for persistent automation behavior; use the Building Automations skill for that branch.

    js
    defineWorkflow({ name: "approval-workflow" }, async (event, step) => {
      const request = await step.do("prepare-request", async () => {
        return { requestId: crypto.randomUUID() };
      });
    
      const approval = await step.waitForEvent("approval", {
        type: "approval",
        timeout: "15 minutes",
      });
    
      return { request, approval: approval.payload };
    });

    Put side effects, provider calls, and expensive work inside step.do. Keep pure deterministic calculations outside steps. Use stable, descriptive step names because history and retries address those names. Use step.sleep or step.sleepUntil for time and step.waitForEvent for external continuation.

    Complete when every non-deterministic operation has a durable step and every continuation has an exact event type.

  3. Observe. Copy the returned instanceId; code-mode calls do not share in-memory variables. Read the run with workflow.getInstance({ instanceId }). Inspect output for a completed run, confirm the authored event type for a waiting run, and read workflow.getHistory({ instanceId }) when diagnosing an errored run. If instance details are temporarily unavailable, call workflow.listInstances({}) once as a status fallback and report the backend failure beside the observed summary.

    Complete when the instance is complete with observed output, intentionally waiting with its exact continuation, or errored with the failed step and error identified.

Prompting an agent

When a workflow needs model work, use step.agent.prompt(name, input). One workflow instance owns one continuing agent session, so later prompts include the earlier prompt, tool-call, and tool-result history. Give every prompt a stable name.

Workflow agents inherit no tools from the authoring Pi session. Define each capability locally with defineTool and pass the complete tool set to that prompt. Prefer a tool result when the workflow needs structured data:

js
const classify = defineTool({
  name: "classify",
  description: "Return the harmfulness classification.",
  parameters: {
    type: "object",
    additionalProperties: false,
    required: ["classification", "confidence", "reason"],
    properties: {
      classification: { enum: ["harmful", "not harmful", "uncertain"] },
      confidence: { enum: ["low", "medium", "high"] },
      reason: { type: "string", maxLength: 1000 },
    },
  },
  execute: async (_toolCallId, result) => result,
});

const response = await step.agent.prompt("classify-text", {
  text: `Classify this text:\n\n${text}`,
  tools: [classify],
});
const classificationResults = response.toolResults.filter(
  ({ toolName }) => toolName === "classify",
);
if (classificationResults.length !== 1) {
  throw new Error("Expected exactly one classify tool result.");
}
const classification = classificationResults[0].result;

Tool execution is part of the prompt step and can repeat when an attempt fails before commit. Keep tools pure and replay-safe. Put external effects in separate step.do calls with stable idempotency keys. Before branching, confirm that the expected tool ran. When execute returns the validated tool arguments, use the result properties directly instead of repeating the JSON Schema validation.

Operating an existing workflow

Read "/static/codemode/providers/workflow.d.ts" for exact inputs:

  • workflow.createInstance({ path, instanceId, payload }) starts a saved .workflow.js file. Supply a stable instanceId and copy it for later calls. Inline defineWorkflow runs do not need this call.
  • workflow.listInstances({ status, pageSize, cursor }) lists codemode workflow instances.
  • workflow.getInstance({ instanceId }) reads status, output, error, and source path.
  • workflow.getHistory({ instanceId }) exposes steps, events, and emissions for diagnosis.
  • workflow.sendEvent({ instanceId, type, payload }) resumes a waiting instance.
  • workflow.retryFailedStep({ instanceId, delayMs }) retries the latest failed top-level step.

For a waiting instance, send the exact event type expected by step.waitForEvent. Failed-step retry requires the latest top-level step to be the only failed top-level step. Retrying a do step reruns all of its nested steps, including completed steps, so their effects and mutations must be repeatable. Retrying a failed event wait starts a fresh timeout window and considers pending events before the new deadline.

Heefeg gestallte Froen

Wat mécht de KI-Skill Workflows?

Orchestrate durable multi-step work with defineWorkflow and operate workflow instances. Use when a current task needs retries, sleeps, waiting for an external event, or the user asks to inspect, signal, or retry a workflow instance.

Firwat Workflows op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Workflows 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 Workflows an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/rejot-dev/fragno/tree/main/apps/backoffice/content/static/skills/workflows 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 Workflows 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 Workflows benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Workflows 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 Workflows gratis?

Jo. De Skill gëtt vum rejot-dev ë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 👇