handoffFilters
const handoffFilters: object;Convenience namespace for all pre-built filters.
Type Declaration
Section titled “Type Declaration”compose
Section titled “compose”compose: (...filters) => HandoffInputFilter = composeFilters;Composes multiple filters into a single filter. Filters are applied left-to-right: each filter receives the output of the previous one.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
… |
Returns
Section titled “Returns”keepRecentMessages
Section titled “keepRecentMessages”keepRecentMessages: (count) => (data) => HandoffInputResult;Keeps only the last N non-system messages. System messages are always preserved.
Respects tool-call/tool-result pair integrity: if a tool-result message is included but its preceding tool-call assistant message is cut, both are excluded.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”(data) => HandoffInputResult
removeKeys
Section titled “removeKeys”removeKeys: (keys) => (data) => HandoffInputResult;Removes specified keys from workingMemory. Passes messages through unchanged.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|
Returns
Section titled “Returns”(data) => HandoffInputResult
removeToolHistory
Section titled “removeToolHistory”removeToolHistory: (data) => HandoffInputResult;Removes all tool-call and tool-result messages from the history. The target agent sees only user/assistant conversational turns.
- Messages with role ‘tool’ are removed entirely.
- Assistant messages that contain ONLY tool-call content parts are removed.
- Assistant messages with mixed content (text + tool-call) are preserved.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|