[GH-ISSUE #1073] [Feature]: Add lorebook-like trigger conditions for custom agents #530

Closed
opened 2026-10-20 17:29:50 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @cha1latte on GitHub (May 21, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1073

What problem does this solve?

Custom agents currently run on a simple interval, such as once every N messages. This can make active agents run even when the recent narrative context has nothing relevant for them to do.

Source Discord thread: https://discord.com/channels/1417099416812392641/1506778915824472205

Proposed solution

Allow custom agents to use lorebook-like trigger conditions, such as keywords in the last N messages, so agents only run when the recent context matches their domain.

Possible applications from the reporter:

  • Run anti-slop rewriting only when certain unwanted patterns appear.
  • Run the combat agent only when combat-related terms appear.
  • Run inventory or money management only when buy/sell terms appear.
  • Run narrative director agents only when their domain is relevant.
  • Run translation agents when other-language regex hits.
  • Run location transition handlers when terms such as "arrive," "enter," or "walk into" appear.

Alternatives considered

Current behavior: control agent frequency with run interval only.

The reporter is experimenting locally with kicking active agents out of the pipeline before groupByProviderModel if their keyword conditions are not met.

Additional context

Reporter: Albatross Ascot.

The reporter also mentioned future extensions such as agents that trigger from tracker contents, and lorebook entries that are only presented to agents.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @cha1latte on GitHub (May 21, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1073 ## What problem does this solve? Custom agents currently run on a simple interval, such as once every N messages. This can make active agents run even when the recent narrative context has nothing relevant for them to do. Source Discord thread: https://discord.com/channels/1417099416812392641/1506778915824472205 ## Proposed solution Allow custom agents to use lorebook-like trigger conditions, such as keywords in the last N messages, so agents only run when the recent context matches their domain. Possible applications from the reporter: - Run anti-slop rewriting only when certain unwanted patterns appear. - Run the combat agent only when combat-related terms appear. - Run inventory or money management only when buy/sell terms appear. - Run narrative director agents only when their domain is relevant. - Run translation agents when other-language regex hits. - Run location transition handlers when terms such as "arrive," "enter," or "walk into" appear. ## Alternatives considered Current behavior: control agent frequency with run interval only. The reporter is experimenting locally with kicking active agents out of the pipeline before `groupByProviderModel` if their keyword conditions are not met. ## Additional context Reporter: Albatross Ascot. The reporter also mentioned future extensions such as agents that trigger from tracker contents, and lorebook entries that are only presented to agents. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:29:50 +07:00
Author
Owner

@cha1latte commented on GitHub (May 21, 2026):

Triage note: labeling this as scope-risk because lorebook-like custom agent triggers would change agent activation logic and may need keyword, history-window, tracker, and prompt-pipeline decisions.

The least risky next step is to define one supported trigger type for custom agents before expanding to tracker-based or agent-specific lorebook behavior.

<!-- gh-comment-id:4511983086 --> @cha1latte commented on GitHub (May 21, 2026): Triage note: labeling this as `scope-risk` because lorebook-like custom agent triggers would change agent activation logic and may need keyword, history-window, tracker, and prompt-pipeline decisions. The least risky next step is to define one supported trigger type for custom agents before expanding to tracker-based or agent-specific lorebook behavior.
Author
Owner

@cha1latte commented on GitHub (May 21, 2026):

Hi! I'm going to close thisfor now because it is larger than the QoL-focused feature work we’re currently taking on.

Trigger-based agent activation would require product and architecture decisions around trigger types, history windows, tracker access, agent scheduling, and prompt-pipeline behavior. That is a real agent-system feature, not a small quality-of-life improvement, so unfortunately right now it just isn't a good time haha

If we revisit this later, the likely path would be a much narrower proposal for one trigger type first, rather than the full lorebook-like trigger system.

<!-- gh-comment-id:4512105382 --> @cha1latte commented on GitHub (May 21, 2026): Hi! I'm going to close thisfor now because it is larger than the QoL-focused feature work we’re currently taking on. Trigger-based agent activation would require product and architecture decisions around trigger types, history windows, tracker access, agent scheduling, and prompt-pipeline behavior. That is a real agent-system feature, not a small quality-of-life improvement, so unfortunately right now it just isn't a good time haha If we revisit this later, the likely path would be a much narrower proposal for one trigger type first, rather than the full lorebook-like trigger system.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#530
No description provided.