Get Recovery Action • AI Agent SDK

get_recovery_action: Get recommended recovery action when doom loop detected.

get_recovery_action

Method

</div>

This is a method of the DoomLoopTracker class in the autonomy module.

Get recommended recovery action when doom loop detected.

Returns graduated recovery actions:

  • “retry_different”: Try a different approach (1st detection)
  • “escalate_model”: Escalate to stronger model (2nd detection)
  • “request_help”: Request human intervention (3rd detection)
  • “abort”: Stop execution (4th+ detection)
  • “continue”: No doom loop, continue normally

Signature

python
def get_recovery_action() -> str

Returns

ResponseField str

The result of the operation.

Uses

  • is_doom_loop

Used By

Source

View on GitHub

praisonaiagents/agent/autonomy.py at line 481