durable-execution
Convert mcp-agent workflows into durable Temporal-backed workers with pause/resume, signals, retries, activity registration, and operational guardrails.
- License 许可
- Apache-2.0
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- durable-execution
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Convert mcp-agent workflows into durable Temporal-backed workers with pause/resume, signals, retries, activity registration, and operational guardrails.
- disable-model-invocation
- true
02 资源文件 3
- 参考文档references/pause-resume-and-signals.md7.8 KB
- 参考文档references/temporal-workflows.md9.5 KB
- 参考文档references/troubleshooting.md7.9 KB
03 SKILL.md 正文
durable-execution
Use this sub-skill when an mcp-agent app must run workflows durably with the Temporal executor: production workers, long-running tools, pause/resume, human approval signals, activity/task retries, task registration, workflow handles, and Temporal service constraints.
Route First
- Use
../workflow-patterns/SKILL.mdfirst when the task is choosing between router, orchestrator, parallel, evaluator, swarm, or other workflow shapes. - Use
../core-sdk/SKILL.mdfirst when the task is basicMCPApp,Agent, provider, secrets, or local asyncio setup. - Use
../cli-cloud-operations/SKILL.mdwhen the user specifically asks for hosted cloud deployment or cloud workflow CLI commands. - Stay here when the workflow shape already exists and the work is making it durable, observable, retry-safe, signalable, or worker-backed.
Durable Conversion Checklist
- Confirm the Temporal extra is available before importing Temporal-specific modules: install with
mcp-agent[temporal], which brings intemporalio[opentelemetry]. - Set
execution_engine: temporaland configuretemporal.host,temporal.namespace, andtemporal.task_queue; in current settings,hostincludes the port such aslocalhost:7233. - Keep the same
@app.workflow,@app.workflow_run,@app.workflow_task,@app.async_tool, andAgentAPIs where possible. The decorators adapt to asyncio or Temporal based on configuration. - Create a worker process that imports the app and any modules that register workflows/tasks, then runs
create_temporal_worker_for_app(app). - Put custom reusable activities in importable modules and list them under
workflow_task_moduleswhen they are registered with the staticworkflow_taskdecorator or otherwise need preloading. - Configure task retry behavior with local
@app.workflow_task(retry_policy=...)metadata or top-levelworkflow_task_retry_policiesfor exact, suffix, prefix wildcard, and*matching. - Design pause/resume with
executor.wait_for_signal(...)inside the workflow andexecutor.signal(...), workflow registry resume, or MCP server resume tools outside it. - Keep workflow code deterministic. Move external API calls, file I/O, MCP tool calls, database writes, and provider calls into workflow tasks/activities or existing mcp-agent abstractions.
- Validate static config with
scripts/check_temporal_config.py; generate a safe starter worker/app skeleton withscripts/worker_skeleton.py.
Reference Map
- Temporal worker and activity design:
references/temporal-workflows.md - Pause/resume, signals, and human approvals:
references/pause-resume-and-signals.md - Operational troubleshooting:
references/troubleshooting.md - Static config validator:
scripts/check_temporal_config.py - Worker/app skeleton generator:
scripts/worker_skeleton.py
Safety Notes
- A Temporal worker is a long-running service process. The bundled scripts do not start a Temporal worker, connect to a cluster, or call providers unless the user edits and runs the generated application code.
- Temporal is optional. Base mcp-agent installs may import core SDK APIs but fail on
mcp_agent.executor.temporaluntil the Temporal extra is installed. - Temporal server examples are skip-service unless the user already has a local or remote Temporal cluster and explicitly wants to run them.
- Do not put secrets in config examples. Use environment placeholders, secrets files, or a deployment secret manager.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.