Skip to content

Templates

Templates are pre-built workflow patterns. Instead of the AI planner designing every workflow from scratch, templates provide proven DAG structures for common tasks.

  1. Pick a template (e.g., research_swarm)
  2. Provide a goal
  3. The template generates a complete DAG with steps, dependencies, and requirements
const chain = await client.summon({
goal: 'Research CRISPR delivery mechanisms',
roomId: 'bio-lab',
template: 'research_swarm',
});

That single call generates a DAG like:

scope_research
├── investigate_domain_1 ─┐
├── investigate_domain_2 ─┤ parallel
├── investigate_domain_3 ─┘
└── synthesize_findings
└── final_review
TemplateWhat it does
software_featureDesign → Implement → Review → Test → Deploy
bug_fixInvestigate → Reproduce → Fix → Verify → Deploy
TemplateWhat it does
research_swarmParallel research across sub-domains with synthesis
literature_reviewSearch → Screen → Extract → Synthesize
literature_review_continuousOngoing monitoring with dual review
hypothesis_swarmGenerate, attack, and validate competing hypotheses
research_monitorWatch for new papers and evidence
TemplateWhat it does
second_opinionMedical case review with expert validation
rare_disease_diagnosisMulti-specialist parallel diagnosis
clinical_trial_monitorMulti-site trial surveillance + DSMB review
drug_interaction_analysisPK/PD analysis with interaction matrix
epidemiological_investigationOutbreak investigation pipeline
TemplateWhat it does
strategic_analysisMarket → Competition → Strategy → Plan
content_creationOutline → Draft → Review → Edit → Publish
simple_taskExecute → Review → Finalize
parallel_executionSplit → Execute in parallel → Merge
// All templates
const all = client.listTemplates();
// Filter by category
const medical = client.listTemplates('medical');
// Search by keyword
import { searchTemplates } from 'society-protocol';
const results = searchTemplates('pharmacology');