Last Iteration • AI Agent SDK

last_iteration: Return the highest journalled iteration index, or “None“.

last_iteration

Method

</div>

This is a method of the RunJournal class in the journal module.

Return the highest journalled iteration index, or `None`.

Used to restore the loop cursor exactly on resume.

Signature

python
def last_iteration(run_id: str) -> Optional[int]

Parameters

ParamField str

No description available.

Returns

ResponseField Optional[int]

The result of the operation.

Uses

  • events

Source

View on GitHub

praisonaiagents/runtime/journal.py at line 388