For Recipe • AI Agent SDK

for_recipe: Preset for recipe/workflow use cases with many tool calls.

for_recipe

Method

</div>

This is a method of the ContextConfig class in the models module.

Preset for recipe/workflow use cases with many tool calls.

Optimized for:

  • Preventing context overflow in multi-step workflows
  • Preserving important tool outputs
  • Triggering compaction earlier (70% vs 80%)
  • Limiting tool outputs to prevent explosion

Signature

python
def for_recipe() -> 'ContextConfig'

Returns

ResponseField 'ContextConfig'

ContextConfig with recipe-optimized settings

Uses

  • cls

Source

View on GitHub

praisonaiagents/context/models.py at line 357


Related Documentation