[GH-ISSUE #3762] [Feature]: Agent track bar #2027

Closed
opened 2026-10-21 05:44:41 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @HackZers7 on GitHub (Jul 17, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3762

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

During generation the user sees only a generic "thinking…" indicator with no
visibility into what the agent pipeline is actually doing. When a preset
configures multiple agents (pre-generation, parallel batch, post-processing,
auto-translation), there is no way to tell:

  • how many agents are queued and in which phase,
  • which agents share a single LLM request (and therefore run as one batch),
  • which agent is currently executing versus still waiting,
  • which agent failed and at which stage.

This is especially painful on heavy presets where a shared-call batch can take
several seconds: the user cannot distinguish "everything is working, just slow"
from "one agent failed and is dragging the rest of the pipeline". The result is
ambiguous loading states and support questions about "stuck" generations that
are actually healthy.

Proposed solution

Add a live agent track bar rendered above the chat input that visualises the
agent lifecycle in real time, driven by actual agent execution events rather
than the pre-flight plan:

  • One circular widget per agent, coloured by status (queued / running /
    completed / failed), ordered left-to-right by phase
    (pre-gen → parallel → main response → post-processing → translation).
  • Agents that share a single LLM request are visually grouped into a dashed
    "batch" capsule with a batch ×N badge, so the user can see at a glance
    which agents ride the same HTTP call.
  • Widgets flip to running only when the LLM request actually goes out — not
    when the queue is planned — so the bar reflects real execution, not intent.
  • The bar shows a completed/total agents counter and auto-hides ~5s after
    all agents settle.
  • Server emits agent_queue / agent_start / agent_completed SSE events;
    batches are pre-grouped (planAgentBatches) so clusters render the moment
    the queue arrives instead of re-clustering on each agent_start.

Alternatives considered


Additional context

Implemented in commit f55eb330 (feat(agents): add agent track bar with live batch progress), available on branch
chat-agent-process.
Touches:

  • packages/client/src/components/agents/AgentTrackBar.tsx
  • packages/client/src/components/agents/agent-track-animations.tsx
  • packages/client/src/stores/agent.store.ts
  • packages/client/src/hooks/use-generate.ts
  • packages/server/src/routes/generate.routes.ts
  • packages/server/src/routes/generate/retry-agents-route.ts
  • packages/server/src/services/agents/agent-pipeline.ts
  • packages/server/src/services/agents/agent-executor.ts

Manual verification needed: visibility on mobile, light/dark theme contrast of
the four status colours, behaviour when an entire batch fails, behaviour on
retry (retry-agents-route), and auto-hide timing when translation is disabled.

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 @HackZers7 on GitHub (Jul 17, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3762 Originally assigned to: @SpicyMarinara on GitHub. ## What problem does this solve? During generation the user sees only a generic "thinking…" indicator with no visibility into what the agent pipeline is actually doing. When a preset configures multiple agents (pre-generation, parallel batch, post-processing, auto-translation), there is no way to tell: - how many agents are queued and in which phase, - which agents share a single LLM request (and therefore run as one batch), - which agent is currently executing versus still waiting, - which agent failed and at which stage. This is especially painful on heavy presets where a shared-call batch can take several seconds: the user cannot distinguish "everything is working, just slow" from "one agent failed and is dragging the rest of the pipeline". The result is ambiguous loading states and support questions about "stuck" generations that are actually healthy. ## Proposed solution Add a live agent track bar rendered above the chat input that visualises the agent lifecycle in real time, driven by actual agent execution events rather than the pre-flight plan: - One circular widget per agent, coloured by status (`queued` / `running` / `completed` / `failed`), ordered left-to-right by phase (pre-gen → parallel → main response → post-processing → translation). - Agents that share a single LLM request are visually grouped into a dashed "batch" capsule with a `batch ×N` badge, so the user can see at a glance which agents ride the same HTTP call. - Widgets flip to `running` only when the LLM request actually goes out — not when the queue is planned — so the bar reflects real execution, not intent. - The bar shows a `completed/total agents` counter and auto-hides ~5s after all agents settle. - Server emits `agent_queue` / `agent_start` / `agent_completed` SSE events; batches are pre-grouped (`planAgentBatches`) so clusters render the moment the queue arrives instead of re-clustering on each `agent_start`. ## Alternatives considered --- ## Additional context Implemented in commit `f55eb330` (`feat(agents): add agent track bar with live batch progress`), available on branch [`chat-agent-process`](https://github.com/HackZers7/Marinara-Engine/tree/chat-agent-process). Touches: - `packages/client/src/components/agents/AgentTrackBar.tsx` - `packages/client/src/components/agents/agent-track-animations.tsx` - `packages/client/src/stores/agent.store.ts` - `packages/client/src/hooks/use-generate.ts` - `packages/server/src/routes/generate.routes.ts` - `packages/server/src/routes/generate/retry-agents-route.ts` - `packages/server/src/services/agents/agent-pipeline.ts` - `packages/server/src/services/agents/agent-executor.ts` Manual verification needed: visibility on mobile, light/dark theme contrast of the four status colours, behaviour when an entire batch fails, behaviour on retry (`retry-agents-route`), and auto-hide timing when translation is disabled. ## 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-21 05:44:41 +07:00
Author
Owner

@HackZers7 commented on GitHub (Jul 17, 2026):

Now a bit off-topic: the code committed to the repository is fully AI-generated. I did not review it or check what exactly the AI wrote — I only verified that the feature works. If you're willing to accept the commit with these caveats, I'll open a draft PR, after which I'll do a proper code review, fix any issues I find, and test what I'm able to.

<!-- gh-comment-id:5007736792 --> @HackZers7 commented on GitHub (Jul 17, 2026): Now a bit off-topic: the code committed to the repository is fully AI-generated. I did not review it or check what exactly the AI wrote — I only verified that the feature works. If you're willing to accept the commit with these caveats, I'll open a draft PR, after which I'll do a proper code review, fix any issues I find, and test what I'm able to.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 18, 2026):

Hey pookie, first, thank you for your work and the idea! Allow me to explain where what is.

  • Remember to always have Debug Mode (Settings -> Advanced) enabled, this one is your friend.
  • Only agents added to the chat or enabled in it are going to trigger. In Roleplay mode, you can view which Agents triggered and what they returned in the Agents menu button in the top left corner. In other modes, given how they are restricted there they are, they are only logged in the debug console, plus of course we show toast messages if something goes wrong.
  • For thinking, we intentionally hide it to not break the immersion during the scene, but of course, any extensions showing it or features making it optionally show when generating are welcomed!
    I hope that cleared up some things. :)
<!-- gh-comment-id:5010714394 --> @SpicyMarinara commented on GitHub (Jul 18, 2026): Hey pookie, first, thank you for your work and the idea! Allow me to explain where what is. - Remember to always have Debug Mode (Settings -> Advanced) enabled, this one is your friend. - Only agents **added to the chat or enabled in it** are going to trigger. In Roleplay mode, you can view which Agents triggered and what they returned in the Agents menu button in the top left corner. In other modes, given how they are restricted there they are, they are only logged in the debug console, plus of course we show toast messages if something goes wrong. - For thinking, we intentionally hide it to not break the immersion during the scene, but of course, any extensions showing it or features making it optionally show when generating are welcomed! I hope that cleared up some things. :)
Author
Owner

@HackZers7 commented on GitHub (Jul 18, 2026):

I reviewed the activity menu you pointed out, but it does not provide the same information as this feature. It does not show which agents are active when generation starts, how many agents are scheduled to run in total, or how many are still waiting to finish. Based on my observations, the activity menu also appears to report only tracker-agent activity, rather than the full agent pipeline.

Moving this feature into an extension would significantly reduce its functionality. The current extension API does not expose the agent lifecycle events needed to implement it properly, such as when an agent is queued, when its request actually starts, and when it completes or fails. Extensions also cannot access the internal batch-planning logic used to determine which agents share the same LLM request.

I should also clarify that, in my observations, enabling Debug mode does not surface much beyond the Injections tab.

<!-- gh-comment-id:5010893385 --> @HackZers7 commented on GitHub (Jul 18, 2026): I reviewed the activity menu you pointed out, but it does not provide the same information as this feature. It does not show which agents are active when generation starts, how many agents are scheduled to run in total, or how many are still waiting to finish. Based on my observations, the activity menu also appears to report only tracker-agent activity, rather than the full agent pipeline. Moving this feature into an extension would significantly reduce its functionality. The current extension API does not expose the agent lifecycle events needed to implement it properly, such as when an agent is queued, when its request actually starts, and when it completes or fails. Extensions also cannot access the internal batch-planning logic used to determine which agents share the same LLM request. I should also clarify that, in my observations, enabling Debug mode does not surface much beyond the Injections tab.
Author
Owner

@SpicyMarinara commented on GitHub (Jul 18, 2026):

Pookie, like I said, only the added agents are active. You can check which ones will trigger by going into Chat Settings -> Agents and seeing which ones are enabled. If any agents are still working, the send message button is being displayed as a loading circle. All agents that have already completed their request are visible in the aforementioned menu, so you can easily tell which ones haven't finished their job yet. Agents are also split into pre-generation/parallel/post-processing pipelines, so if you received a response, that means all the pre-generation and parallel agents have already worked and now it's time for the post-processing ones to kick in. I also checked and the debug mode is still working as intended on my end, maybe your browser is not showing it correctly? I'm on Firefox.

Image
<!-- gh-comment-id:5011005674 --> @SpicyMarinara commented on GitHub (Jul 18, 2026): Pookie, like I said, only the added agents are active. You can check which ones will trigger by going into Chat Settings -> Agents and seeing which ones are enabled. If any agents are still working, the send message button is being displayed as a loading circle. All agents that have already completed their request are visible in the aforementioned menu, so you can easily tell which ones haven't finished their job yet. Agents are also split into pre-generation/parallel/post-processing pipelines, so if you received a response, that means all the pre-generation and parallel agents have already worked and now it's time for the post-processing ones to kick in. I also checked and the debug mode is still working as intended on my end, maybe your browser is not showing it correctly? I'm on Firefox. <img width="1709" height="989" alt="Image" src="https://github.com/user-attachments/assets/1ac70f9d-cef1-4abb-83b4-ef5ad29f69ea" />
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#2027
No description provided.