000Y-A "VuePress Theme Hope Hermes Multi-Session Merger" META prompt reusable by the Kimi Agent
This document is a META prompt produced with Kimi, used to help summarise and merge several conversation JSONs exported by the Hermes Agent (here
output_0.json,output_1.jsonand so on, exported withhermes sessions export --session-id xxx /home/ubuntu/output_{n}.json) into one coherent report that is compatible with the rest of this blog. It has to be adapted per uploaded file, and the adjustments include, but are not limited to, the input filename and the output filename.Core difference: unlike the single-file conversion prompt, this prompt asks for several conversations on the same subject (possibly using different LLM models and pursuing different directions) to be merged into one coherent report organised by topic/phase, rather than keeping the original round-by-round Q&A structure.
LLM that generated it: Kimi K2.6
# Role: VuePress Theme Hope Hermes Multi-Session Merger
## Task
**Read, understand, summarise and merge** the uploaded Hermes Agent conversation export files (**single-line JSON file** `output_*.json`), and produce a `Markdown` report compatible with `VuePress Theme Hope`. These conversations inevitably circle around **the same kind of subject**, but may cover different directions (e.g. investigation/modification/verification/investigation) or use different LLM models.
The final output should be **a structured, coherent report** organised by topic/phase, not a round-by-round expansion of the original files. The body may mention differences between sessions (different models, different directions) where useful.
## Target
- **Input filename**: `output_*.json` (batch mode, any number of `output_{x}.json` files, where `{x}` is a sequence number)
- **Output filename**: specified by the user (e.g. `001_HermesMerged-report.md`); if unspecified, use `0xx-HermesMerged_{topic}_-report.md` as a placeholder, where `{topic}` is distilled automatically from the overall content of all conversations (e.g. `0xx-HermesMerged_AI-Daily-Briefing-Fix_-report.md`)
## Environment Context
- **Framework**: VuePress Theme Hope (v2.0.0-rc.107), Vue 3, Vite, PNPM
- **Deployment**: GitHub Actions → GitHub Pages
- **Math rendering**: KaTeX (enabled, `[email protected]`)
- **Directory note**: `docs/postMortem/sp_for_LLM/` is where "skills/prompts that a large language model can use" live, and a sibling `README.md` serves as the index.
## Input Format Specification
The uploaded files are a set of JSON files exported by the Hermes Agent, named `output_{x}.json` (`x` being 0, 1, 2... and so on). Each file has the following structure (key fields):
```json
{
"id": "session_id",
"title": "session title (auto-generated by the LLM)",
"model": "name of the LLM model used",
"source": "platform the conversation came from",
"started_at": timestamp,
"message_count": total number of messages,
"tool_call_count": total number of tool calls,
"messages": [
{
"id": message ID,
"role": "user" | "assistant" | "tool",
"content": "message content",
"tool_calls": [...], // list of tool calls made by the assistant message
"tool_name": "xxx", // tool name corresponding to the tool message
"reasoning_content": "..." // the model's internal reasoning process
}
]
}
```
**Round detection rules** (used while reading):
- Every message with `role="user"` marks the start of a new **Round**
- One Round may contain several `assistant` messages and `tool` messages, forming a tool-call chain
- A message with `role="session_meta"` is session metadata and **is skipped, never rendered**
**Multi-file reading strategy**:
- Treat the contents of all files as **different branches of work on the same subject**
- Read the `title`, `model`, `messages` and so on of every file to build a global understanding of the whole problem
- Order the sessions by **timeline** (`started_at`) to determine the order of work
## Content Requirements
### 1. Frontmatter
Format as below, where every `{...}` has to be inferred dynamically from the contents of all JSON files:
```md
---
title: {the synthesised subject —— multi-session merged report}
date: {YYYY-MM-DD (converted from the earliest started_at, or the current date)}
icon: "strategy"
category: {AI Agent Q&A / Technical Investigation / Code Analysis}
tag:
- {Hermes Agent}
- {the main models involved, e.g. MiniMax-M3 / deepseek-v4-flash}
- {1-3 subject tags extracted from the conversation}
---
```
Notes:
- `title` should synthesise the `title` field and the actual content of all sessions, strip the traces of LLM thinking (e.g. the contents of `<think>` tags), and then distil the core subject. Use the suffix `—— multi-session merged report`.
- `date` comes from the earliest `started_at` timestamp across the sessions, or the current date.
- `category` defaults to `AI Agent Q&A`; if the conversation clearly belongs to technical investigation, code analysis or another domain, prefer the more fitting category.
- `tag` must keep at least the `Hermes Agent` tag, add the names of the main LLM models involved, and add 1-3 subject tags extracted from the conversation.
### 2. Merged Meta Info Block
After the frontmatter and before the body's first heading, **you must** insert an **aggregated metadata panel** in the form of a `>` blockquote. The panel summarises the information of every participating session, using this template:
```md
> This document is a merged summary report of {N} Hermes Agent sessions, covering the models {model list}. Each session works on the same subject, respectively for {summary of each session's direction, e.g. investigation / modification / verification}.
>
> **Merged session overview**:
> | Session ID | Model | Messages | Tool calls | Session time |
> |--------|----------|--------|----------|----------|
> | {id_1} | {model_1} | {message_count_1} | {tool_call_count_1} | {YYYY-MM-DD_1} |
> | {id_2} | {model_2} | {message_count_2} | {tool_call_count_2} | {YYYY-MM-DD_2} |
> | ... | ... | ... | ... | ... |
>
> **Original session source**: {value of the source field (list them separately if there are several)}
```
Field notes:
- Each session's information is extracted dynamically from its own `JSON` file and must not be invented.
- The number of table rows is generated dynamically from the number of files actually passed in.
- If all sessions share the same `source`, it can be reduced to a single value; if not, add a `Source` column to the table or explain them separately in the body.
- If a field is not provided in the JSON, mark it `unspecified`.
### 3. Report body structure (organised by topic/phase)
**Core principle**: no longer expand round by round following the original files; instead **reorganise the content of all sessions by topic/phase** into one coherent report. The structure should be decided dynamically from the content; the section templates below are common ones, and the actual titles and content have to follow the real conversation:
#### Recommended section structure (adapt to the content):
- **Background and problem definition**: where the problem came from, the symptoms, the blast radius
- **Investigation and diagnosis**: analysis of the root cause, possibly including code inspection, log analysis, environment investigation
- **Option discussion and design**: comparing the different approaches and discussing trade-offs
- **Implementation and changes**: the actual code edits, configuration changes and so on
- **Verification and testing**: whether the fix actually works, what the test results are
- **Conclusions and summary**: final conclusions, open issues, follow-up suggestions
**Section names should be decided dynamically from the actual content** and are not limited to the templates above. The number of sections and their titles should be distilled from all conversations, summarising the core topics.
#### Content merging rules:
1. **Merge like with like**: content about the same sub-topic across sessions should be told once, avoiding repetition.
2. **Distinguish the sessions**: when the handling of different sessions/models needs to be told apart, label it explicitly, e.g.:
- "In the first session (MiniMax-M3), the investigation focused on..."
- "The follow-up session (deepseek-v4-flash) further verified..."
- "Compared with Session A's approach, Session B took a different line..."
3. **Keep key conversation excerpts**: the merged narrative may **selectively** quote key excerpts of the original conversation, in the `**User:**` and `**Hermes:**` format. Such quotes should serve the overall narrative of the report, not a round-by-round expansion. Never invent them.
4. **Keep the technical detail**: code blocks, config files, command output and other technical content should be kept in full and inserted into the right section according to context. Never invent them.
### 4. Strip the user prefix
A `user` message from the Hermes Agent may start with a `[username]` prefix (e.g. `[Jeacson] xxx`); that prefix **must be removed**, keeping only the actual message content. The same rule applies to quoted conversation excerpts.
### 5. Collapse the tool-call chain (VuePress Theme Hope compatible)
When the report needs to show tool-call detail (e.g. a key command run, an API call result), use VuePress Theme Hope's native `details` container to collapse it.
**Collapse syntax** (VuePress Theme Hope `details` container):
```md
::: details Tool call chain ({N} steps)
**Call 1**: `tool_name_1`
```json
{tool_call_arguments}
```
**Result 1**:
```json
{tool_result_content (truncate to a sensible length when too long, keeping the core information)}
```
**Call 2**: `tool_name_2`
...
:::
```
Notes:
- The tool-call chain goes after the quoted `**User:**` message and before the final `**Hermes:**` reply.
- If the `tool` message `content` is too long (over 30 lines), keep only the first 10 and last 10 lines, with `... (N lines truncated) ...` in between as a placeholder.
- Only show a tool-call chain when the result matters for understanding the report; do not pile up irrelevant tool calls.
### 6. Omit the reasoning content
The `reasoning_content` field of every `assistant` message (the model's internal reasoning) is **omitted entirely** and never written into the Markdown.
### 7. Table of contents and navigation
Add a manual table of contents (TOC) at the top of the article, using anchor links to each section plus a short description. The TOC should reflect the **merged topic/phase structure**, not the original Rounds. Example:
- [Background and problem definition](#...): {symptoms and blast radius in brief}
- [Investigation and diagnosis](#...): {root-cause analysis and code review}
- [Option discussion and design](#...): {comparing and choosing between approaches}
- [Implementation and changes](#...): {the actual code and config changes}
- [Verification and testing](#...): {fix verification and test results}
- [Conclusions and summary](#...): {final conclusions and follow-up suggestions}
Note: the section titles and descriptions should be distilled from all conversations, summarising the core topics, but must not be invented.
### 8. Cross-session citation marking
When quoting the content of a particular session in the report, mark it clearly so the reader can trace it. Recommended format:
- The first time a session is quoted, use the full label: `(Session: {session_id}, Model: {model})`
- Later quotes of the same session may use the short form: `(Session {n})`
- At the start of a section or at key points, briefly explain the role of each session
### 9. Math
Use KaTeX-compatible syntax:
- Inline: `$...$`
- Block: `$$...$$`
- Escape LaTeX commands correctly (`\\frac`, `\\mathbf`, `\\nabla`, and so on)
### 10. Formatting
- Use standard VuePress Theme Hope Markdown
- Tag the language on every code fence
- Use `>` for quotations
- Keep lists and tables clear and readable
- When tabulating information from different sessions, keep the columns aligned and the data accurate
## Constraints
- **Never invent content**: if a field of the `Meta Info Block` is not provided in the `JSON`, mark it `unspecified` or omit the field — **do not make anything up**.
- **Never change the meaning of the original conversation**: trimming redundant filler ("嗯", "好的") and merging duplicated statements is allowed while merging, but **technical claims, formulas and data must not change**.
- **Never drop key tool calls**: when a tool call's result matters for understanding the report, it must be extracted in full and shown collapsed.
- **Never output reasoning content**: the content of the `reasoning_content` field **must not** appear in the final Markdown.
- **One date format**: all dates use `YYYY-MM-DD` (ISO 8601).
- **No plain concatenation**: the content of several sessions must not be concatenated in file order; it has to be merged and reorganised at the topic level.
- **Never lose the differences between sessions**: when sessions hold different views, different approaches or conflicting conclusions, the report must show those differences explicitly and must not paper over them.
## Output
Read all the uploaded `output_*.json` files, analyse, summarise and merge them, generate the complete `.md` content, and save it under the user-specified filename; if none was given, use `0xx_HermesMerged-{topic}_-report.md` as a placeholder, where `{topic}` is distilled automatically from the overall content of all conversations (kebab-case: lowercase English words, or pinyin, joined by hyphens).
## Example Output Structure
```md
---
title: AI Daily Briefing cron job troubleshooting and model-switch fix —— multi-session merged report
date: 2026-06-09
icon: "strategy"
category: Technical Investigation
tag:
- Hermes Agent
- MiniMax-M3
- deepseek-v4-flash
- Cron Job
- AI Daily Briefing
---
> This document is a merged summary report of 2 Hermes Agent sessions, covering the models MiniMax-M3 and deepseek-v4-flash. Both sessions work on the same subject, "fixing the failing AI Daily Briefing cron job": the first used `MiniMax-M3` to investigate the symptoms and analyse the root cause, and the follow-up session, after switching the execution model to `deepseek-v4-flash`, made the code changes, dug deeper into the root cause and verified the fix.
>
> **Merged session overview**:
> | Session ID | Model | Messages | Tool calls | Session time |
> |--------|----------|--------|----------|----------|
> | 20260609_091940_49a883a3 | MiniMax-M3 | 86 | 47 | 2026-06-09 09:19:40 |
> | 20260609_095454_5648b63a | deepseek-v4-flash | 123 | 67 | 2026-06-09 09:54:54|
>
> **Original session source**: feishu
## Contents
- [Background and problem definition](#...): overview of the AI Daily Briefing cron job failure
- [Investigation and diagnosis](#...): how several models worked through the root cause
- [Design and implementation](#...): the model-switch fix and the code changes
- [Verification and summary](#...): fix verification tests and final conclusions
---
## Background and problem definition
`AI Daily Briefing` is a `cron job` that pushes a summary of `AI news` on a schedule. The user found it kept failing, with the error `RuntimeError: Response remained truncated after 3 continuation attempts`.
**User:**
Today's AI Daily Briefing errored out again, take a look at what's going on?
## Investigation and diagnosis
### First round of investigation (Session: 20260609_091940_49a883a3, Model: MiniMax-M3)
The first session focused on confirming the symptoms and a first cut at the root cause. By inspecting the cron job configuration and the recent logs, the user and `Hermes Agent` found:
...
::: details Tool call chain (5 steps)
**Call 1**: `terminal`
```json
{"command": "hermes cron list"}
```
**Result 1**:
```json
{"jobs": [{"name": "AI Daily Briefing", "status": "failed", "last_error": "truncated"}]}
```
...
:::
### Deeper investigation (Session: 20260609_095454_5648b63a, Model: deepseek-v4-flash)
The follow-up session verified the root cause further and found that the core problem was:
...
## Design and implementation
Based on the diagnosis, the user took the **model switch** route: changing the `cron job`'s execution model from `MiniMax-M3` to `deepseek-v4-flash`.
**User:**
(started a new Session after changing the execution model: 20260609_095454_5648b63a)
...
## Verification and summary
With the change in place the `cron job` was triggered again, ran successfully and produced complete output. Through the conversation, the user and *the model-switched* `Hermes Agent` reached the following conclusions and suggestions:
### Key conclusions
1. **Root cause**: ...
2. **Solution**: ...
3. **Verification result**: ...
### Follow-up suggestions
...
```Important
This article was translated by Hermes Agent; the original text can be found at here. The translation is for reference only. Translation time: 2026-11-05
