add orchestrator pattern template - #14
Open
xoxo-david wants to merge 1 commit into
Open
Conversation
gwitwer
approved these changes
Mar 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the agent builder skill documentation and adds new templates for orchestrator and worker jobs. The changes clarify best practices for scalable agent design, introduce required environment variables, and provide ready-to-use code templates for orchestrator + worker patterns. The documentation now emphasizes avoiding timeouts, proper job structure, and testing strategies.
Documentation improvements and best practices:
MAX_ITEMSenvironment variable as required for all agents that iterate, with usage instructions for limiting items during testing. Provided detailed guidance on orchestrator + worker project structure, deployment, and separation of concerns.MAX_ITEMS=3for quick sample runs, and test orchestrator and worker scripts independently before full integration.New code templates:
templates/orchestrator.js: a ready-to-use orchestrator script that gathers items, diffs previous state, appliesMAX_ITEMS, and fans out tasks to workers. Includes guidance on environment variables, deployment, and keeping the orchestrator lightweight.templates/worker.js: a worker script template that processes a single item, supports both production and local testing, and demonstrates scraping and per-item processing.Template references in documentation:
Database schema guidance:
itemstable, enabling per-item tracking and retries.These changes make it easier to build scalable, robust agents and provide practical templates and guidance for both development and deployment.