[GH-ISSUE #5456] [Feature]: Add user-approved character card creation results for Agents #3025

Closed
opened 2026-10-21 05:58:55 +07:00 by bsakaguchi · 11 comments
Owner

Originally created by @xKoMaRx on GitHub (Aug 23, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5456

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

Roleplay histories and lorebooks can establish recurring NPCs in detail, but Marinara Engine has no agent-result contract for proposing a brand-new character card. Card Evolution Auditor can only update existing cards, while tracker and lorebook agents leave NPC knowledge in separate runtime state. Users must manually reconstruct complete cards and risk losing established voice, relationships, and durable facts.

Proposed solution

Add a user-approved character_card_create result path for post-processing agents. The Engine should validate a complete Character Card V2 draft, reject malformed or duplicate candidates, queue proposals without writing automatically, and show an editable review modal with Create, Regenerate, and Reject actions. Creation must use the normal character API and invalidate the character library cache. The proposal should carry concise evidence/reasoning and remain scoped to the originating Roleplay chat and visible swipe.

This Engine issue owns the shared contract, server result routing, client validation/store/modal flow, localization, regression proof, and documentation. The downloadable Agent definition belongs in Pasta-Devs/Marinara-Agents and will be linked separately.

Alternatives considered

  • Reusing character_card_update: rejected because updates require a trusted existing character ID and exact old-text matching.
  • Writing directly from a custom Agent: rejected because character identity changes need explicit review and custom Agent capabilities intentionally do not expose unrestricted card creation.
  • Using Professor Mari manually: useful as a one-off workflow, but it does not provide recurring post-processing or candidate deduplication.

Additional context

The intended first consumer is an optional NPC Archivist Agent that analyzes recent Roleplay, chat summaries, activated lorebook context, and tracked character continuity. It should prefer false negatives over creating incidental or speculative NPCs.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @xKoMaRx on GitHub (Aug 23, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5456 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? Roleplay histories and lorebooks can establish recurring NPCs in detail, but Marinara Engine has no agent-result contract for proposing a brand-new character card. Card Evolution Auditor can only update existing cards, while tracker and lorebook agents leave NPC knowledge in separate runtime state. Users must manually reconstruct complete cards and risk losing established voice, relationships, and durable facts. ## Proposed solution Add a user-approved `character_card_create` result path for post-processing agents. The Engine should validate a complete Character Card V2 draft, reject malformed or duplicate candidates, queue proposals without writing automatically, and show an editable review modal with Create, Regenerate, and Reject actions. Creation must use the normal character API and invalidate the character library cache. The proposal should carry concise evidence/reasoning and remain scoped to the originating Roleplay chat and visible swipe. This Engine issue owns the shared contract, server result routing, client validation/store/modal flow, localization, regression proof, and documentation. The downloadable Agent definition belongs in Pasta-Devs/Marinara-Agents and will be linked separately. ## Alternatives considered - Reusing `character_card_update`: rejected because updates require a trusted existing character ID and exact old-text matching. - Writing directly from a custom Agent: rejected because character identity changes need explicit review and custom Agent capabilities intentionally do not expose unrestricted card creation. - Using Professor Mari manually: useful as a one-off workflow, but it does not provide recurring post-processing or candidate deduplication. ## Additional context The intended first consumer is an optional NPC Archivist Agent that analyzes recent Roleplay, chat summaries, activated lorebook context, and tracked character continuity. It should prefer false negatives over creating incidental or speculative NPCs. ## Template check - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@SpicyMarinara commented on GitHub (Aug 23, 2026):

I don't understand, we have character versions so even if the agent changes something in a character card, it gets saved as a new version?

<!-- gh-comment-id:5387801647 --> @SpicyMarinara commented on GitHub (Aug 23, 2026): I don't understand, we have character versions so even if the agent changes something in a character card, it gets saved as a new version?
Author
Owner

@xKoMaRx commented on GitHub (Aug 23, 2026):

Character versions solve a different problem: preserving changes to a character card that already exists.

This proposal is specifically about recurring NPCs discovered in roleplay that do not have a character card or character ID yet. In that case, there is nothing for Card Evolution Auditor to update or version.

The proposed character_card_create result would let an agent prepare a complete draft for such an NPC, but it would not create anything automatically. The user would first review and edit the proposal, then explicitly approve its creation through the normal character API. From that point onward, any later changes could use the existing versioning system.

So the intended flow is:

  1. A recurring NPC exists only in chat, lorebook, summaries, or tracker state.
  2. The agent proposes a new card based on established information.
  3. The user reviews, edits, and approves or rejects it.
  4. Only after approval is the first character card created.
  5. Future changes to that card are handled through normal character versions.
<!-- gh-comment-id:5387883350 --> @xKoMaRx commented on GitHub (Aug 23, 2026): Character versions solve a different problem: preserving changes to a character card that already exists. This proposal is specifically about recurring NPCs discovered in roleplay that do not have a character card or character ID yet. In that case, there is nothing for Card Evolution Auditor to update or version. The proposed character_card_create result would let an agent prepare a complete draft for such an NPC, but it would not create anything automatically. The user would first review and edit the proposal, then explicitly approve its creation through the normal character API. From that point onward, any later changes could use the existing versioning system. So the intended flow is: 1. A recurring NPC exists only in chat, lorebook, summaries, or tracker state. 2. The agent proposes a new card based on established information. 3. The user reviews, edits, and approves or rejects it. 4. Only after approval is the first character card created. 5. Future changes to that card are handled through normal character versions.
Author
Owner

@xKoMaRx commented on GitHub (Aug 23, 2026):

Implementation owner: @xKoMaRx. Work is in progress on branch codex/npc-archivist.

<!-- gh-comment-id:5387891138 --> @xKoMaRx commented on GitHub (Aug 23, 2026): Implementation owner: @xKoMaRx. Work is in progress on branch codex/npc-archivist.
Author
Owner

@SpicyMarinara commented on GitHub (Aug 23, 2026):

Okay, but which agents should have that ability? Or do you plan to add it to custom agents only?

<!-- gh-comment-id:5387911347 --> @SpicyMarinara commented on GitHub (Aug 23, 2026): Okay, but which agents should have that ability? Or do you plan to add it to custom agents only?
Author
Owner

@xKoMaRx commented on GitHub (Aug 23, 2026):

Yeah, i'm trying to create one for this

<!-- gh-comment-id:5388065020 --> @xKoMaRx commented on GitHub (Aug 23, 2026): Yeah, i'm trying to create one for this
Author
Owner

@SpicyMarinara commented on GitHub (Aug 23, 2026):

I can do it if you prefer, no issue in giving that ability to custom agents. But if you want to submit the PR yourself, go for it. :)

<!-- gh-comment-id:5388125753 --> @SpicyMarinara commented on GitHub (Aug 23, 2026): I can do it if you prefer, no issue in giving that ability to custom agents. But if you want to submit the PR yourself, go for it. :)
Author
Owner

@xKoMaRx commented on GitHub (Aug 23, 2026):

I just created new agent for this :) now i'm tweaking it for my liking and best use of his power :)
I was doing it for myself for ST so i can do it for ME too, but because i like ME more i will try to make it even better :P

<!-- gh-comment-id:5388163156 --> @xKoMaRx commented on GitHub (Aug 23, 2026): I just created new agent for this :) now i'm tweaking it for my liking and best use of his power :) I was doing it for myself for ST so i can do it for ME too, but because i like ME more i will try to make it even better :P
Author
Owner

@SpicyMarinara commented on GitHub (Aug 23, 2026):

No, no, we would rather not create a separate agent for this. I meant to add this as an ability (a toggle) for custom agents.

<!-- gh-comment-id:5388221279 --> @SpicyMarinara commented on GitHub (Aug 23, 2026): No, no, we would rather not create a separate agent for this. I meant to add this as an ability (a toggle) for custom agents.
Author
Owner

@SpicyMarinara commented on GitHub (Aug 23, 2026):

Okay, I'll take it over from here. I'll make it an available function of custom agents that allows agents to create character cards saved to the user's Characters tab.

<!-- gh-comment-id:5388248626 --> @SpicyMarinara commented on GitHub (Aug 23, 2026): Okay, I'll take it over from here. I'll make it an available function of custom agents that allows agents to create character cards saved to the user's Characters tab.
Author
Owner

@xKoMaRx commented on GitHub (Aug 23, 2026):

Ok :)

<!-- gh-comment-id:5388253411 --> @xKoMaRx commented on GitHub (Aug 23, 2026): Ok :)
Author
Owner

@SpicyMarinara commented on GitHub (Aug 23, 2026):

Implementation is now tracked in draft PR #5465. Scope is limited to an opt-in Custom Agent ability and structured result that creates a character card only after the user reviews and accepts it; no separate NPC Archivist Agent.

<!-- gh-comment-id:5388947429 --> @SpicyMarinara commented on GitHub (Aug 23, 2026): Implementation is now tracked in draft PR #5465. Scope is limited to an opt-in Custom Agent ability and structured result that creates a character card only after the user reviews and accepts it; no separate NPC Archivist Agent.
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#3025
No description provided.