Recommend Pattern • AI Agents Framework

recommend_pattern: Recommend the best workflow pattern based on task characteristics.

recommend_pattern

Method

</div>

This is a method of the WorkflowAutoGenerator class in the auto module.

Recommend the best workflow pattern based on task characteristics.

Signature

python
def recommend_pattern(topic: str) -> str

Parameters

ParamField str

The task description (uses self.topic if not provided)

Returns

ResponseField str

Recommended pattern name

Pattern recommendations based on Anthropic’s best practices:

  • sequential: Clear step-by-step dependencies
  • parallel: Independent subtasks that can run concurrently
  • routing: Different input types need different handling
  • orchestrator-workers: Complex tasks needing dynamic decomposition
  • evaluator-optimizer: Tasks requiring iterative refinement

Source

View on GitHub

praisonai/auto.py at line 1052