Chat Search
Search all your chats by keyword or phrase. A magnifying-glass button in the sidebar opens a search panel showing matching chats with highlighted snippets, a live preview pane, keyboard navigation, and click-to-jump to the exact message.
README
Chat Search
Search across all of your Agent Zero chats by keyword or phrase.
What it does
- Adds a magnifying-glass button to the sidebar quick-actions toolbar.
- Clicking it opens a centered search panel.
- As you type, it finds chats that mention your word or phrase and shows highlighted snippets of where the match occurs.
- Selecting a result previews all matching snippets on the right; click Open (or double-click a result, or press Enter) to jump straight to that chat.
Matching
The backend searches every stored chat's messages (your messages, assistant replies, agent thoughts/actions, tool results, and titles) using three tiers:
- Exact phrase match (case-insensitive).
- All words present in a single message.
- Similar phrasing — fuzzy word matching that tolerates typos and close words.
Results are ranked by relevance, with title matches and multi-match chats boosted. No filters are applied for now.
Files
| Path | Purpose |
|---|---|
api/search_chats.py |
Search API endpoint |
helpers/search.py |
Chat reading, matching, snippet + highlight logic |
extensions/webui/sidebar-quick-actions-main-start/chat-search-button.html |
Magnifying-glass sidebar button |
webui/chat-search-modal.html |
Search panel UI |
webui/chat-search-store.js |
Alpine store (debounced search, selection, navigation) |
Notes
- Read-only: the plugin never modifies your chats.
- Per-file results are cached by modification time so repeated keystrokes stay fast.