Skip to content

FTS5 Cross-Session Search

FTS5 Cross-Session Search is a specialized data persistence and retrieval mechanism employed by the Hermes Agent. It utilizes the SQLite3 database engine with the FTS5 (Full-Text Search 5) extension to index conversation history, enabling the system to perform semantic-aware searches across previous sessions^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].

This capability forms a critical part of the agent's Closed Learning Loop, allowing the AI to effectively "remember" and reference past interactions and context rather than treating each session as an isolated event^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].

Technical Implementation

The storage solution is designed to be lightweight yet robust, balancing query performance with ease of deployment^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].

  • Database Engine: SQLite3
  • Extension: FTS5 (Full-Text Search 5)
  • Objective: To provide a queryable history of agent interactions without the overhead of a separate vector database or external search service^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].

Role in the Learning Loop

In the context of Hermes Agent's architecture, FTS5 search serves as the bridge between discrete conversations^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].

  • Breaking Isolation: By indexing sessions, the agent can retrieve relevant information from weeks or months ago, ensuring that valuable context is not lost when a session closes.
  • Skill Enhancement: This historical awareness supports the agent's ability to [[Self-Improving Skills]], as it can verify past decisions or refine behaviors based on long-term user history^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].

Design Philosophy

The decision to use SQLite + FTS5 reflects a specific set of engineering priorities within the Hermes framework^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md]:

  • Simplicity & Deployment: It avoids the "dependency hell" of running a separate vector database (like Pinecone or Milvus) or a heavy search engine (like Elasticsearch). This aligns with the principle that the system should be able to run on minimal resources, such as a $5 VPS^[001-TODO__Hermes_Agent_·_设计哲学与思维框架.md].
  • Self-Contained: By keeping the search index as a local file (SQLite DB), the system maintains its [[Platform-Agnostic Core]], ensuring that the "brain" of the agent remains portable and easy to back up.

Sources

  • 001-TODO__Hermes_Agent_·_设计哲学与思维框架.md