Dual-Agent Programmable Workflows

A two-agent architecture where a Workflow Architect programs custom scripts and automations while a Task Runner executes them on demand.

dual-agent
programmable
workflows
1924

The Dual-Agent Programmable Workflows blueprint introduces a powerful separation-of-concerns pattern where two specialized AI agents collaborate through a shared knowledge base. This architecture mirrors real-world software development teams where architects design systems and operators execute them, creating a robust and maintainable automation framework.

The Workflow Architect is the system's brain, responsible for designing, programming, and documenting custom automation scripts. Using a more capable model (Claude 4.5 Opus), this agent handles complex reasoning tasks: analyzing user requirements, creating sophisticated bash scripts, designing multi-step workflows, and maintaining comprehensive documentation. The architect writes to the Automation Playbook—a persistent file that serves as the single source of truth for all programmed automations.

The Task Runner is the system's executor, designed for rapid, reliable task execution. Using an efficient model (Claude 4.5 Sonnet), this agent reads the Automation Playbook to understand available tools and follows the documented instructions precisely. It has shell execution capabilities in a dedicated runtime workspace where it can run the scripts and workflows programmed by the architect. A trigger integration enables automated execution on schedule.

The Automation Playbook file is the critical shared resource that bridges both agents. It contains: a catalog of all available scripts with their purposes and usage instructions, detailed execution guides for complex workflows, parameter documentation and expected outputs, and troubleshooting guidance for common issues. The architect maintains this living document, ensuring the runner always has current, accurate information.

This asymmetric access pattern—architect writes, runner reads—creates natural guardrails. The runner cannot accidentally modify the playbook or create new scripts, ensuring the architect's carefully designed workflows remain intact. Meanwhile, the architect focuses on design without being distracted by execution concerns.

Both agents share a single Script Workspace where the Architect creates and stores scripts, and the Runner executes them. This shared environment ensures the Runner has direct access to the scripts programmed by the Architect, eliminating any deployment step between development and execution.

Practical applications include: DevOps automation where architects create deployment scripts and operators execute them, data pipeline management with reusable ETL workflows, customer support automation with pre-built response templates and action sequences, and scheduled reporting systems with configurable report generators.

The pattern scales elegantly. Multiple Task Runner agents could share the same Automation Playbook, each with different trigger schedules or access permissions. The architect could manage playbooks for different domains, creating specialized automation libraries that runners consume based on their responsibilities.

To extend this blueprint, consider adding version control for playbook changes, implementing approval workflows for new scripts, creating monitoring dashboards for execution metrics, or building feedback loops where the runner reports issues back to the architect for resolution.

Backstory

Common information about the bot's experience, skills and personality. For more information, see the Backstory documentation.

You are the Workflow Architect, a specialized AI agent responsible for designing, programming, and documenting automation workflows. Your role is to create powerful, reusable scripts and maintain comprehensive documentation that enables seamless execution by the Task Runner. YOUR RESPONSIBILITIES: 1. SCRIPT DEVELOPMENT - Create bash scripts for automation tasks - Design multi-step workflows with clear dependencies - Test scripts in your architect workspace before publishing - Optimize scripts for reliability and efficiency 2. PLAYBOOK MAINTENANCE - Document every script with clear usage instructions - Include parameter descriptions and expected outputs - Provide troubleshooting guidance for common issues - Organize the playbook with clear sections and navigation 3. QUALITY ASSURANCE - Ensure all scripts have error handling - Document prerequisites and dependencies - Include example invocations for each script - Version your scripts with dates and change notes PLAYBOOK FORMAT: When writing to the Automation Playbook, use this structure: # Automation Playbook Last updated: [date] ## Available Scripts ### [Script Name] **Purpose**: What this script does **Usage**: How to run it **Parameters**: Input requirements **Output**: What to expect **Example**: Sample invocation **Troubleshooting**: Common issues and solutions --- Always write complete, production-ready scripts. The Task Runner depends entirely on your documentation—be thorough and precise. Never assume the runner knows anything beyond what's in the playbook. The current date is ${EARTH_DATE}. Include timestamps in all updates.

Skillset

This example uses a dedicated Skillset. Skillsets are collections of abilities that can be used to create a bot with a specific set of functions and features it can perform.

  • 👴

    Read/Write Playbook

    Read or update the Automation Playbook with scripts and documentation
  • 🏢

    Bash

    Execute bash commands in the script workspace
  • 🏢

    Read/Write Script

    Read or write script files in the shared workspace
  • 👾

    Read Playbook

    Read the Automation Playbook to find scripts and execution instructions
  • 🏢

    Bash

    Execute bash commands in the shared workspace to run scripts

A dedicated team of experts is available to help you create your perfect chatbot. Reach out via or chat for more information.