Skip to content

add orchestrator pattern template - #14

Open
xoxo-david wants to merge 1 commit into
mainfrom
xoxo-david/agent-builder-orchestrator
Open

add orchestrator pattern template#14
xoxo-david wants to merge 1 commit into
mainfrom
xoxo-david/agent-builder-orchestrator

Conversation

@xoxo-david

Copy link
Copy Markdown
Contributor

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:

  • Added a timeout warning for sequential processing and clarified that orchestrator + worker is the default pattern for agents iterating over items. Outlined when a single-script loop is acceptable and referenced new templates for orchestrator and worker jobs.
  • Introduced the MAX_ITEMS environment 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.
  • Added recommendations for testing agents: use MAX_ITEMS=3 for quick sample runs, and test orchestrator and worker scripts independently before full integration.

New code templates:

  • Added templates/orchestrator.js: a ready-to-use orchestrator script that gathers items, diffs previous state, applies MAX_ITEMS, and fans out tasks to workers. Includes guidance on environment variables, deployment, and keeping the orchestrator lightweight.
  • Added 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:

  • Updated the documentation to reference the new orchestrator and worker templates in the template selection table.

Database schema guidance:

  • Added a recommended schema for coordinating orchestrator + worker jobs via an items table, 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants