Overview
MyrmAgent provides a comprehensive chat history management system integrated directly into the sidebar — no separate page needed. Every conversation is organized, searchable, and exportable from one place.Full-Text Search (Cmd+K)
Press ⌘+K (macOS) or Ctrl+K (Windows/Linux) anywhere in the app to open the global search dialog.- Instant results: Debounced search queries the backend
/chats/searchAPI - Time range filtering: Narrow results to Today, This Week, This Month, or This Quarter
- Snippet highlighting: Matching text is highlighted in search results
- Click to jump: Select a result to navigate directly to the chat and highlight the matching message
Date-Grouped History
Conversations are automatically grouped into time-based sections:
Each group can be collapsed/expanded, and the collapsed state persists across sessions via
localStorage.
Pinning & Drag-and-Drop Reordering
- Pin conversations to the top of the sidebar for quick access
- Drag-and-drop pinned items to reorder them using DnD-Kit SortableContext
- Use keyboard shortcuts (number keys) to quickly jump to pinned conversations
Batch Operations
Enter batch mode to select multiple conversations at once:- Toggle batch mode from the sidebar header
- Select/deselect individual chats or use “Select All”
- Batch export: Click “Export” on selected chats, choose a format (Markdown / JSON / HTML), and all conversations are packaged into a ZIP download
- Batch delete: Deleted items go to the Trash (soft delete with recovery)
Batch Export Features
Export Conversations
Export any conversation directly from the sidebar menu or the chat header export button with built-in client-side privacy redaction:- Markdown — Clean
.mdfile preserving formatting and code blocks with redacted credentials. - Self-contained HTML — Single-file offline page with inlined CSS and no external CDN dependencies; features
@media printdark-mode inversion (pure#ffffffbackground with#000000text) to eliminate paper ink waste. Links in the conversation stay clickable only when they point tohttp(s),mailto,tel, or a relative address — anything else, such as ajavascript:link, is shown as plain text — and text keeps at least a 4.5:1 contrast ratio in both light and dark themes. - JSON — Full structured messages, tool calls, and execution metadata for automated analysis or migration.
- High-Definition PNG Image — Crisp Retina 2x full conversation screenshot powered by an in-memory
onclonevirtual DOM sandbox (zero offscreen DOM pollution, zero negative-coordinate blank screen clipping). - Session Event Log Pack (.zip) — Complete audit bundle with full message trajectory, artifacts, and a tamper-evident
manifest.jsoncontaining SHA-256 integrity digests for all archived files.
Client-Side Privacy Redaction
Toggle the “Redact Sensitive Information” checkbox in the export modal to sanitize your conversation before it leaves your machine:- Credentials & Keys: OpenAI, Anthropic, JWT tokens, and PEM private key blocks are replaced with
[REDACTED_API_KEY],[REDACTED_TOKEN], etc. - Personal Information: Phone numbers, citizen IDs, IPv4/IPv6 addresses, and email addresses are automatically masked.
- False-Positive Guard: Legitimate URL paths, query parameters, UUIDs, and version numbers are preserved without accidental masking.
Diagnostic Information in Exports
Exported files automatically include metadata for debugging and workflow reproduction:Sensitive information in tool arguments and chat content is client-side redacted before file generation, ensuring credentials never touch disk or external networks unmasked.
Print Conversation
The right-click menu also offers a “Print” option to print or save the current conversation as PDF. Uses a hidden iframe to invoke the browser’s native print dialog, bypassing popup blockers.Share Conversation
Generate a read-only public link for any conversation via the right-click menu → “Share”:- Time-limited: Links expire after 1–30 days (configurable)
- Password-protected: Optional password gate for sensitive conversations
- Revocable: One-click revoke invalidates the link immediately
- Secure: HMAC-SHA256 signed URLs, strict CSP headers, no scripts, X-Frame-Options DENY, rate-limited (30 req/min)
- Rich rendering: Server-side Markdown rendering with syntax-highlighted code blocks, tables, and dark mode support
- Agent identity: Shows the agent name and model used in the conversation
- Self-hosted: All data stays on your server — no dependency on GitHub, Pastebin, or third-party services
Project Folders
Organize conversations into named projects with color labels:- Move conversations between projects via the context menu
- Filter the sidebar to show only a specific project’s conversations
- Project assignments persist across sessions
Trash & Recovery
Accidentally deleted a conversation? The Session Trash Panel provides:- Soft-deleted conversations are kept for recovery
- One-click restore to bring back any deleted session
- Permanent delete when you’re sure
Source Filtering
Filter conversations by their origin channel — Web UI, Telegram, Discord, WeChat, and 26 other platforms.Infinite Scrolling
The sidebar usesIntersectionObserver-based infinite scrolling — no pagination buttons. Conversations load automatically as you scroll down.
Additional Features
Message Edit & Resend
Edit any previous message to retry with different wording. MyrmAgent ensures full front-end and back-end consistency when you edit and resend:- Atomic truncation — Messages after the edited one are removed from the database before the new message is sent, so the agent never sees stale context
- Version preservation — Regenerated responses are stored as sibling versions (
is_activeflag); switch between versions using the left/right arrows on any assistant message - Smart Regeneration — Four preset modes (Try Again, More Concise, More Detailed, More Creative) plus custom instruction. The instruction is injected into the agent’s context as
[Regeneration guidance: ...], directly steering the new response - Complaint-Up auto-escalation — When you regenerate without a custom instruction (plain retry), the system interprets this as implicit dissatisfaction and automatically moves to the next routing tier that runs a different model (SIMPLE→STANDARD→REASONING) for a higher-quality response — no manual model switching needed; when no stronger model is configured, the retry keeps the same model
- Undo last turn — One click removes the last user + assistant message pair and updates the conversation state
- Conversation forking — Fork from any message to explore an alternative path without losing the original thread. Three entry points: sidebar right-click menu,
/forkslash command, and mobile action sheet. Usemessage_index=-1to fork from the latest message instantly. When context usage exceeds 75%, a “Fork new topic” button appears in the context usage panel for quick topic branching. If the parent conversation has an active sandbox (git worktree), the forked child automatically resets to the original repository root — preventing file conflicts from multiple conversations sharing the same sandbox workspace
Mid-Stream Redirect (Busy Input)
When the agent is actively generating a response, pressing Enter sends your correction as a redirect — interrupting the current generation immediately without waiting for completion:
Key benefits of redirect mode:
- Zero wasted tokens — Stops generation the moment you realize the direction is wrong (saves 200–1800 tokens per redirect)
- Context consistency — Partial AI output is preserved as an AIMessage so the LLM sees the same context you saw
- Prompt cache friendly — Preserved partial text maintains the message prefix, improving cache hit rates on the next call
- Zero learning curve — Default Enter behavior, no special key combo needed
redirect / steer / queue).
Lazy Session Persistence & Self-Purge
In daily high-frequency use, pressing Enter and immediately hitting Escape to cancel, accidental disconnects, or tentative inputs are common. Traditional agent frameworks prematurely insert database records and create physical workspace sandbox folders the moment the user sends the first message, causing the sidebar to be cluttered with empty orphan sessions. MyrmAgent introduces Lazy Session Persistence Until First Assistant and Lazy Workspace Materialization:- In-Memory Draft Isolation: When a user submits the first prompt, the server keeps a lightweight
PendingSessionDraftin memory without writing to the database or updating inverted indices. - Active Generation Chunk Detection & Atomic Barrier: The stream pipeline filters passive ping/keepalive events. Upon detecting the first active assistant content (text, thinking stream, or tool progress step), it atomically commits via an
asyncio.Lockbarrier. - Zero-Write on Early Cancellation: If the run is canceled or disconnected before the first assistant token or tool execution, the draft is safely dropped with zero database writes and zero physical folder footprint.
- Tool-Call Draft Protection: Even if the model generates only tool calls in the first turn without visible text,
has_active_generationreliably detects the activity and commits the session, ensuring tool side effects and artifacts are safely persisted. - Doctor Orphan Session Self-Healing: For legacy empty sessions, the Doctor diagnostics engine provides the
OrphanSessionDiagnosticprobe andPURGE_ORPHAN_SESSIONSself-healing action, supporting dry-run previews and cascading physical cleanup (database rows, messages, FTS5 indices, checkpointer states, and workspace folders).
vs Competitor Approaches
Most competitors (e.g., Hermes Agent) use a separate/history page that duplicates sidebar functionality. MyrmAgent follows the same pattern as ChatGPT, Claude, and Gemini — sidebar-integrated history — while providing 16 additional capabilities that the separate-page approach lacks.
Reasoning and streaming
Models often think for tens of seconds before answering. Myrm makes that phase part of the message instead of leaving you with a static skeleton.Watching the chain
- While thinking, the assistant bubble shows “Thinking · Ns” plus the live reasoning text.
- When the answer starts, the card collapses to a one-line summary after 1 second and can be reopened at any time.
- After reloading or reopening the chat, the persisted chain is still available.
Three display modes
Settings → Personalization → Reasoning display:Stop thinking
The card exposes Stop thinking during the reasoning phase: it ends reasoning early and answers with what is known. The request is bounded to 10 seconds, so the button recovers instead of staying stuck.Token count
The card shows the provider-reportedreasoning_tokens; only when the provider omits it do we show an estimate prefixed with ≈.
Note: whether the answer appears token by token depends on the provider/gateway. Myrm never fakes streaming to hide a stall.