Durable Agent Execution Expertのロゴ

Durable Agent Execution Expert

コミュニティ
roedyrustam
durable-agent-execution-expert

Durable agent execution, Temporal AI workflows, and state replay / Eksekusi agen AI tahan-gagal, workflow Temporal, dan replay state.

概要

公開者roedyrustam
リポジトリvibes-plug
スキル名durable-agent-execution-expert
スター
117
フォーク
27
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    roedyrustamがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Durable Agent Execution Expert」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/roedyrustam/vibes-plug/tree/main/skills/durable-agent-execution-expert
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/roedyrustam/vibes-plug.git /tmp/vibes-plug
mkdir -p .claude/skills
cp -r /tmp/vibes-plug/skills/durable-agent-execution-expert .claude/skills/durable-agent-execution-expert
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでDurable Agent Execution Expertを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にDurable Agent Execution Expertを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Durable Agent Execution Expertは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Durable Agent Execution & Crash-Resilient Workflow Expert (2026 Edition)

English | Bahasa Indonesia


English

Orchestration & Integration

  • Async Queues & Distributed Sagas: async-queue-temporal-expert, event-driven-architect, error-resilience-expert
  • AI Agents & Orchestration: multi-agent-orchestration, ai-llm-integration-expert, a2a-agent-protocol-expert, agentic-memory-architect
  • Edge & Serverless Runtimes: cloudflare-workers-expert, js-backend-expert
  • Lifecycle & Governance: brainstorming, zero-to-prod-orchestrator, session-memory-manager

Description

Production engineering guide for building crash-proof, long-running AI Agents using Durable Execution Engines (Temporal.io, Restate, Cloudflare Workflows, and LangGraph Durable Checkpointers). Standard HTTP handlers fail when an LLM loop takes 5 minutes, hits a rate-limit, or waits 48 hours for human approval. Durable execution journals every LLM call and tool result so if a worker container crashes at step 9 of 10, it resumes immediately at step 9 without re-billing tokens or re-executing side effects.

Trigger Conditions

  • Building autonomous coding, research, or FinTech reconciliation agents that run for minutes, hours, or days.
  • Implementing Human-in-the-Loop (HITL) approval gates where an agent pauses execution without holding open a server thread.
  • Preventing duplicate LLM token charges or duplicate external API calls when a worker restarts mid-loop.
  • Deploying stateful multi-step workflows on Cloudflare Workflows or Restate.

Durable Engine Selection Matrix

EngineRuntime ModelState StorageBest For
Temporal.ioLong-polling workers (Node/Go/Python/Rust)Postgres / CassandraComplex enterprise sagas, multi-day agent loops
RestatePush/RPC Durable Invocations (TS/Rust/Go)Built-in RocksDB / Raft logLow-latency microservices, durable idempotency & virtual objects
Cloudflare WorkflowsServerless Edge (WorkflowEntrypoint)Cloudflare Durable StorageZero-infra edge agents, step.do() & step.sleep()
LangGraph CheckpointerGraph State SnapshotsPostgres (PostgresSaver)Conversational time-travel, state branching, thread resume

Core Implementation Patterns

1. Cloudflare Workflows Durable Agent Loop (step.do & step.waitForEvent)

Every non-deterministic operation (LLM generation, external tool fetch, Date.now()) MUST be wrapped inside a durable step.do() block so its return value is persisted in the execution journal:

typescript
// src/workflows/durable-research-agent.ts
export interface ResearchJobParams {
  jobId: string;
  tenantId: string;
  topic: string;
  requireHumanSignoff: boolean;
}

export interface WorkflowStep {
  do<T>(name: string, config: { retries?: { limit: number; delay: string; backoff: 'exponential' } }, fn: () => Promise<T>): Promise<T>;
  sleep(name: string, duration: string): Promise<void>;
  waitForEvent<T>(name: string, options: { type: string; timeout: string }): Promise<{ payload: T }>;
}

export async function runDurableAgentWorkflow(
  params: ResearchJobParams,
  step: WorkflowStep
) {
  // Step 1: Journaled LLM planning call (never re-runs on downstream retry)
  const plan = await step.do(
    'generate-research-plan',
    { retries: { limit: 3, delay: '2 seconds', backoff: 'exponential' } },
    async () => {
      return {
        queries: [`${params.topic} architecture 2026`, `${params.topic} security invariants`],
        estimatedTokens: 4096,
      };
    }
  );

  // Step 2: Journaled parallel evidence gathering
  const synthesis = await step.do(
    'synthesize-findings',
    { retries: { limit: 3, delay: '5 seconds', backoff: 'exponential' } },
    async () => {
      return {
        summary: `Verified findings for ${params.topic}`,
        sourcesCount: plan.queries.length,
      };
    }
  );

  // Step 3: Zero-compute durable pause for Human-in-the-Loop approval (up to 72 hours)
  if (params.requireHumanSignoff) {
    const approval = await step.waitForEvent<{ approved: boolean; reviewerId: string }>(
      'await-human-approval',
      { type: 'human.approval.submitted', timeout: '72 hours' }
    );

    if (!approval.payload.approved) {
      return { status: 'REJECTED_BY_REVIEWER' as const, reviewerId: approval.payload.reviewerId };
    }
  }

  // Step 4: Commit final output
  return await step.do('publish-artifact', {}, async () => {
    return {
      status: 'COMPLETED' as const,
      jobId: params.jobId,
      synthesis,
    };
  });
}

Verification Checklist

  • All non-deterministic calls (fetch, LLM inference, crypto.randomUUID(), Date.now()) are executed inside journaled step.do() / Activity boundaries.
  • External side-effect tools pass deterministic idempotency keys (${workflowId}:${stepName}) to downstream APIs.
  • Human-in-the-Loop pauses use durable signals/events (waitForEvent / Temporal defineSignal) with explicit timeout fallbacks rather than setInterval polling.
  • Workflow state payloads remain compact (< 512 KB); large binary artifacts are stored in S3/R2 and referenced by URI.

Idempotent Step Checkpoint Executor (TypeScript)
typescript
export interface StepJournalStore {
  getStepOutput<T>(workflowId: string, stepKey: string): Promise<T | undefined>;
  saveStepOutput<T>(workflowId: string, stepKey: string, output: T): Promise<void>;
}

export async function runDurableStep<T>(
  store: StepJournalStore,
  workflowId: string,
  stepKey: string,
  operation: () => Promise<T>
): Promise<T> {
  const cached = await store.getStepOutput<T>(workflowId, stepKey);
  if (cached !== undefined) {
    return cached;
  }
  const freshOutput = await operation();
  await store.saveStepOutput(workflowId, stepKey, freshOutput);
  return freshOutput;
}

3. Temporal.io AI Agent Saga Workflow with Signal Handlers (TypeScript)

Enterprise sagas with multi-day durability and real-time operator overrides:

typescript
// src/workflows/temporal-agent-saga.ts
export interface AgentSagaInput {
  workflowId: string;
  tenantId: string;
  maxIterations: number;
  initialPrompt: string;
}

export interface AgentSignalPayload {
  action: 'PAUSE' | 'RESUME' | 'INJECT_CORRECTION' | 'ABORT';
  message?: string;
}

export class TemporalAgentWorkflowSaga {
  private isPaused = false;
  private isAborted = false;
  private pendingCorrection: string | null = null;
  private currentIteration = 0;

  public handleSignal(payload: AgentSignalPayload): void {
    if (payload.action === 'PAUSE') {
      this.isPaused = true;
    } else if (payload.action === 'RESUME') {
      this.isPaused = false;
    } else if (payload.action === 'ABORT') {
      this.isAborted = true;
    } else if (payload.action === 'INJECT_CORRECTION' && payload.message) {
      this.pendingCorrection = payload.message;
    }
  }

  public async execute(
    input: AgentSagaInput,
    activities: {
      invokeLlmStep: (prompt: string, iteration: number) => Promise<{ nextAction: string; isComplete: boolean }>;
      executeToolCall: (action: string) => Promise<{ result: string }>;
      publishResult: (workflowId: string, output: string) => Promise<void>;
    }
  ): Promise<{ status: 'COMPLETED' | 'ABORTED'; iterations: number }> {
    let currentContext = input.initialPrompt;

    while (this.currentIteration < input.maxIterations) {
      if (this.isAborted) {
        return { status: 'ABORTED', iterations: this.currentIteration };
      }

      if (this.isPaused) {
        // Yield execution without burning CPU or memory
        await new Promise((resolve) => setTimeout(resolve, 1000));
        continue;
      }

      if (this.pendingCorrection) {
        currentContext += `\n[Operator Correction]: ${this.pendingCorrection}`;
        this.pendingCorrection = null;
      }

      this.currentIteration += 1;
      const stepResult = await activities.invokeLlmStep(currentContext, this.currentIteration);

      if (stepResult.isComplete) {
        await activities.publishResult(input.workflowId, stepResult.nextAction);
        return { status: 'COMPLETED', iterations: this.currentIteration };
      }

      const toolResult = await activities.executeToolCall(stepResult.nextAction);
      currentContext += `\n[Tool Output]: ${toolResult.result}`;
    }

    await activities.publishResult(input.workflowId, currentContext);
    return { status: 'COMPLETED', iterations: this.currentIteration };
  }
}

Sovereign Execution, Token Efficiency & Invariants

DimensionSovereign Mandate & Deterministic Contract
Frontier Model CascadeMedium / High (GPT-5.6 Sol Medium, Gemini 4 Argon, Claude Sonnet 5.5 High, Grok 4.7 High Fast)
Availability FallbackGemini 4 Argon/Pro -> Gemini 3.8 Flash; Claude Opus 5.5 -> Claude Opus 4.6 (Zero unhandled missing-model errors)
KV-Cache & Token ProtocolPin static instructions & schemas at prompt prefix (kv-cache-prefix-optimizer); pass surgical CONTEXT_MAP.md slices (<250 tokens/call) during Swarm Fan-Out
SaaT CLI & MCP DispatchCLI: vibes skill exec durable-agent-execution-expert <audit|eval|verify|generate|blueprint> / MCP: vibes_skill_dispatch, vibes_ast_query, vibes_compile_cache, vibes_optimize_budget, vibes_verify_gate
NFR & Anti-Slop InvariantsP99 API Gateway Latency < 85ms, OpenAPI 3.1 / TypeSpec strict schema parity, RFC 9457 Problem Details error contracts, Idempotency-Key enforcement; 100% complete zero-placeholder output verified via node scripts/check-anti-slop.js --strict


Bahasa Indonesia

Integrasi Orkestrasi

  • Antrean Asinkron & Saga Terdistribusi: async-queue-temporal-expert, event-driven-architect, error-resilience-expert
  • Agen AI & Orkestrasi: multi-agent-orchestration, ai-llm-integration-expert, a2a-agent-protocol-expert, agentic-memory-architect
  • Runtime Edge & Serverless: cloudflare-workers-expert, js-backend-expert
  • Siklus Hidup & Tata Kelola: brainstorming, zero-to-prod-orchestrator, session-memory-manager

Deskripsi

Panduan rekayasa produksi untuk membangun Agen AI berdurasi panjang yang tahan kegagalan (crash-resilient) menggunakan Temporal.io, Restate, Cloudflare Workflows, dan LangGraph Durable Checkpointers. Setiap pemanggilan LLM dan tool dicatat dalam jurnal (execution log), sehingga jika container restart di tengah jalan, agen melanjutkan tepat dari langkah terakhir tanpa menagih ulang token LLM.

Panduan Arsitektur Inti

  1. Determinisme Workflow: Bungkus setiap pemanggilan LLM, I/O jaringan, dan waktu sistem di dalam blok step.do() atau Activity agar hasilnya disimpan di jurnal.
  2. Human-in-the-Loop Tanpa Biaya Compute: Gunakan step.waitForEvent() atau Temporal Signal untuk menjeda agen selama berjam-jam menunggu persetujuan manusia tanpa menahan koneksi memori server.
  3. Kunci Idempotensi Langkah: Sertakan ${workflowId}:${stepName} sebagai kunci idempotensi saat memanggil tool eksternal.

Daftar Periksa Verifikasi (Checklist)

  • Seluruh pemanggilan LLM dan I/O dibungkus dalam durable step/activity.
  • Tool dengan efek samping menggunakan kunci idempotensi deterministik.
  • Jeda human-in-the-loop memiliki batas waktu (timeout) eksplisit.

Matriks Eksekusi Berdaulat, Efisiensi Token & Invarian

DimensiMandat Berdaulat & Kontrak Deterministik
Kaskade Model FrontierMedium / High (GPT-5.6 Sol Medium, Gemini 4 Argon, Claude Sonnet 5.5 High, Grok 4.7 High Fast)
Invarian Fallback KetersediaanGemini 4 Argon/Pro -> Gemini 3.8 Flash; Claude Opus 5.5 -> Claude Opus 4.6 (Bebas gagal saat model belum tersedia/kuota penuh)
Protokol Hemat Token & KV-CacheKunci instruksi & skema statis di prefix awal (kv-cache-prefix-optimizer); kirim potongan CONTEXT_MAP.md (<250 token/panggilan) saat Fan-Out
Eksekusi SaaT CLI & MCPCLI: vibes skill exec durable-agent-execution-expert <audit|eval|verify|generate|blueprint> / MCP: vibes_skill_dispatch, vibes_ast_query, vibes_compile_cache, vibes_optimize_budget, vibes_verify_gate
Invarian NFR & Anti-SlopLatensi P99 API < 85ms, paritas skema ketat OpenAPI 3.1 / TypeSpec, kontrak error RFC 9457 Problem Details, penegakan Idempotency-Key; kode 100% tuntas tanpa placeholder diverifikasi melalui node scripts/check-anti-slop.js --strict

よくある質問

AIスキル「Durable Agent Execution Expert」では何ができますか?

Durable agent execution, Temporal AI workflows, and state replay / Eksekusi agen AI tahan-gagal, workflow Temporal, dan replay state.

TypingMindでDurable Agent Execution Expertを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Durable Agent Execution Expertはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにDurable Agent Execution Expertをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/roedyrustam/vibes-plug/tree/main/skills/durable-agent-execution-expertを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Durable Agent Execution Expertを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Durable Agent Execution Expertで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもDurable Agent Execution Expertを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Durable Agent Execution Expert」は無料ですか?

はい。roedyrustamがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇