Templates
Templates are pre-built workflow patterns that generate DAGs for common tasks. Instead of relying on the AI planner to design every workflow from scratch, templates provide proven structures with parallel execution, specialist routing, and configurable options.
How Templates Work
Section titled “How Templates Work”- Choose a template by ID (e.g.,
research_swarm) - Provide a goal description
- Optionally configure template-specific options
- The template generates a complete DAG of steps
const chain = await client.summon({ goal: 'Research CRISPR delivery mechanisms', room: 'bio-lab', template: 'research_swarm', options: { domains: 4 }, // 4 parallel research tracks});Template Categories
Section titled “Template Categories”Software (2 templates)
Section titled “Software (2 templates)”software_feature— Full SDLC: Design → Implement → Review → Test → Deploybug_fix— Investigate → Reproduce → Fix → Verify → Deploy
Research (5 templates)
Section titled “Research (5 templates)”research_swarm— Parallel research across sub-domains with synthesisliterature_review— Academic search → screen → extract → synthesizeliterature_review_continuous— Ongoing literature monitoring with dual reviewhypothesis_swarm— Generate, attack, and validate competing hypothesesresearch_monitor— Watch for new papers and evidence deltas
Medical (5 templates)
Section titled “Medical (5 templates)”second_opinion— Medical case review with expert validationrare_disease_diagnosis— Multi-specialist parallel diagnosisclinical_trial_monitor— Multi-site trial surveillance and DSMB reviewdrug_interaction_analysis— PK/PD analysis with interaction matrixepidemiological_investigation— Outbreak investigation pipeline
Business (1 template)
Section titled “Business (1 template)”strategic_analysis— Market → Competition → Strategy → Plan
Creative (1 template)
Section titled “Creative (1 template)”content_creation— Outline → Draft → Review → Edit → Publish
Generic (2 templates)
Section titled “Generic (2 templates)”simple_task— Execute → Review → Finalizeparallel_execution— Split → Execute in parallel → Merge
Configurable Options
Section titled “Configurable Options”Some templates accept options to customize the generated DAG:
| Template | Option | Default | Description |
|---|---|---|---|
research_swarm | domains | 3 | Number of parallel research tracks |
literature_review_continuous | domains | 4 | Number of parallel search domains |
hypothesis_swarm | domains | 4 | Number of competing hypotheses |
parallel_execution | subtasks | 3 | Number of parallel tasks |
rare_disease_diagnosis | specialists | 4 default specialties | Custom specialist list |
clinical_trial_monitor | sites | 3 | Number of trial sites |
Listing Templates
Section titled “Listing Templates”// List all templatesconst all = client.listTemplates();
// Filter by categoryconst medical = client.listTemplates('medical');
// Search by keywordimport { searchTemplates } from 'society-core';const results = searchTemplates('pharmacology');See the Templates Reference for the complete specification of every template.