latent.agents.conditions¶
Reusable predicates for agent lifecycle hooks.
Functions¶
all_of¶
Return a predicate that passes only when all predicates pass.
any_of¶
Return a predicate that passes when any predicate passes.
is_first_message¶
Return True when the history contains exactly one user message.
is_later_turn¶
Return True when at least two user messages are present.
last_user_matches¶
Build a predicate matching the latest user text with search.
min_user_turns¶
Build a predicate requiring at least n user messages.
not_¶
Return the logical negation of predicate.