Handoff Filters • AI Agent SDK
handoff_filters: Common handoff input filters.
handoff_filters
Defined in the handoff module.
AI Agent
Common handoff input filters.
Methods
remove_all_tools()
Remove all tool calls from the message history.
keep_last_n_messages()Keep only the last n messages in the history.
remove_system_messages()Remove all system messages from the history.
compress_history()Compress all messages into a single summary message.
Source
View on GitHubpraisonaiagents/agent/handoff.py at line 1336