Keep Last N • Rust AI Agent SDK

keep_last_n: Keep only the last n messages

keep_last_n

Method

</div>

This is a method of the HandoffFilters class in the handoff module.

Keep only the last n messages

Signature

python
def keep_last_n(n: usize) -> impl Fn(HandoffInputData) -> HandoffInputData

Parameters

ParamField usize

No description available.

Returns

ResponseField

HandoffInputData”> The result of the operation.