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-09-03
- Stars
- ★ 351
- Forks
- 27
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 资源文件 5
- 参考文档references/pause-resume-and-signals.md7.8 KB
- 参考文档references/temporal-workflows.md9.5 KB
- 参考文档references/troubleshooting.md7.9 KB
- 脚本scripts/check_temporal_config.py17.7 KB
- 脚本scripts/worker_skeleton.py8.8 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
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).