durable-agents
Build autonomous multi-agent pipelines with Mastra (agents only) and Trigger.dev (all workflows and tasks). Use when creating AI agents, designing multi-stage pipelines, defining permissioned tools, structuring agent handoffs, storing agentic outputs to a database, or building durable task chains with retries and fan-out.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/ainakwalamonk/durable-agentsWhat This Skill Does
The durable-agents skill provides a robust architectural framework for building resilient, multi-stage AI pipelines. By integrating Mastra (for agent orchestration) with Trigger.dev (for persistent background task execution), it allows developers to create systems where autonomous agents can reliably process complex workflows across extended timeframes. The core philosophy centers on state persistence, granular role-based agent design, and fault-tolerant communication between pipeline stages.
Installation
- Ensure you have a project initialized with Mastra and Trigger.dev.
- Run the command:
clawhub install openclaw/skills/skills/ainakwalamonk/durable-agents. - Follow the instructions in
setupSKILL.mdto configure your database connection and environment variables. - Verify your installation by running the provided health check script and the smoke test pipeline.
Use Cases
- Automated Research Pipelines: Deploying a web-scraper agent to gather data, followed by an analysis agent to synthesize insights, and a database-writing agent to persist results.
- Multi-stage Content Production: Creating systems that generate, review, and finally publish technical documentation, where each step is a retryable task.
- Complex Task Orchestration: Managing long-running background operations like processing batch files or performing multi-step API integrations that require automatic retries and state tracking.
Example Prompts
- "Create a three-stage agent pipeline for summarizing technical GitHub issues: the first agent fetches issues, the second categorizes them by complexity, and the third writes a draft response to the database."
- "Set up a durable task chain that watches for new user signups, triggers a research agent to analyze their company profile, and stores the output in my Postgres instance."
- "Refactor my existing monolithic assistant into a durable agent pipeline where separate agents handle data retrieval, reasoning, and system tool execution with built-in retry logic."
Tips & Limitations
- Principle of Separation: Resist the urge to include all logic in the
.tsboilerplate; keep the reasoning insideAGENT.md. - Tool Safety: Always implement permission-gating for tools that interact with real-world systems to prevent unauthorized executions.
- Data Integrity: Since agents do not hold long-term state, treat the database as your only reliable source of truth. Always design your output schemas with Zod to maintain strict typing across pipeline boundaries.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-ainakwalamonk-durable-agents": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api, code-execution