Interface MemoryFilter.MemoryFilterSupplier

All Superinterfaces:
Supplier<List<MemoryFilter>>
Enclosing interface:
MemoryFilter

@DoNotInherit public static interface MemoryFilter.MemoryFilterSupplier extends Supplier<List<MemoryFilter>>
A fluent builder for composing multiple memory filters.

This interface extends Supplier returning the accumulated list of filters. It also provides builder methods for chaining additional filter operations.

This supplier is designed to be used directly with MemoryProvider methods such as MemoryProvider.LimitedWindowMemoryProvider.readOnly(MemoryFilterSupplier) and MemoryProvider.LimitedWindowMemoryProvider.filtered(MemoryFilterSupplier).

This is an internal API, and we do not recommend inheriting from it. To have access to an implementation, use the factory methods in MemoryFilter

See Also:
  • Method Details

    • includeFromAgentId

      MemoryFilter.MemoryFilterSupplier includeFromAgentId(String id)
      Adds a filter to include only messages from the specified agent component id.
      Parameters:
      id - the agent component id to include messages from
      Returns:
      this supplier with the additional filter
    • includeFromAgentIds

      MemoryFilter.MemoryFilterSupplier includeFromAgentIds(Set<String> ids)
      Adds a filter to include only messages from the specified agent component ids.
      Parameters:
      ids - the set of agent component ids to include messages from
      Returns:
      this supplier with the additional filter
    • excludeFromAgentId

      MemoryFilter.MemoryFilterSupplier excludeFromAgentId(String id)
      Adds a filter to exclude messages from the specified agent component id.
      Parameters:
      id - the agent component id to exclude messages from
      Returns:
      this supplier with the additional filter
    • excludeFromAgentIds

      MemoryFilter.MemoryFilterSupplier excludeFromAgentIds(Set<String> ids)
      Adds a filter to exclude messages from the specified agent component ids.
      Parameters:
      ids - the set of agent component ids to exclude messages from
      Returns:
      this supplier with the additional filter
    • includeFromAgentRole

      MemoryFilter.MemoryFilterSupplier includeFromAgentRole(String role)
      Adds a filter to include only messages from agents with the specified role.
      Parameters:
      role - the agent role to include messages from
      Returns:
      this supplier with the additional filter
    • includeFromAgentRoles

      MemoryFilter.MemoryFilterSupplier includeFromAgentRoles(Set<String> roles)
      Adds a filter to include only messages from agents with the specified roles.
      Parameters:
      roles - the set of agent roles to include messages from
      Returns:
      this supplier with the additional filter
    • excludeFromAgentRole

      MemoryFilter.MemoryFilterSupplier excludeFromAgentRole(String role)
      Adds a filter to exclude messages from agents with the specified role.
      Parameters:
      role - the agent role to exclude messages from
      Returns:
      this supplier with the additional filter
    • excludeFromAgentRoles

      MemoryFilter.MemoryFilterSupplier excludeFromAgentRoles(Set<String> roles)
      Adds a filter to exclude messages from agents with the specified roles.
      Parameters:
      roles - the set of agent roles to exclude messages from
      Returns:
      this supplier with the additional filter