Versions in this module Expand all Collapse all v1 v1.9.1 Apr 8, 2026 v1.9.0 Apr 7, 2026 Changes in this version + const MemoryTypeIndex + const MemoryTypeKnowledge + const MemoryTypePreference + const PageKindKnowledge + const PageKindKnowledgeBase + const PageKindLongTerm + const PageKindPreference + const PriorityHigh + const PriorityLow + const PriorityMedium + var EstimateTokens = utils.EstimateTokens + var NewID = utils.NewID + var PageKeywordScore = utils.PageKeywordScore + func IngestGetCursor(ctx context.Context, db *sql.DB, sessionID string) (int64, error) + func IngestIncStat(ctx context.Context, db *sql.DB, sessionID, ruleName string) error + func IngestSetCursor(ctx context.Context, db *sql.DB, sessionID string, lastMessageID int64) error + type IndexNode = typescore.IndexNode + type IndexSearchResult = typescore.IndexSearchResult + type IndexTree = typescore.IndexTree + type KnowledgeEntry = typescore.KnowledgeEntry + type MemoryItem = typescore.MemoryItem + type PageIndexDoc = typescore.PageIndexDoc + type PageIndexHit = typescore.PageIndexHit + type PageIndexKind = typescore.PageIndexKind + type PageIndexSearchOptions = typescore.PageIndexSearchOptions + type Preference = typescore.Preference + type Priority = typescore.Priority + type SQLiteIndexStore struct + func NewSQLiteIndexStore(store *SQLiteStore) *SQLiteIndexStore + func (s *SQLiteIndexStore) AddNode(ctx context.Context, userID, sourceID string, node *IndexNode, parentID string) error + func (s *SQLiteIndexStore) CreateIndex(ctx context.Context, userID, sourceID, title string, nodes []*IndexNode) (*IndexTree, error) + func (s *SQLiteIndexStore) DeleteIndex(ctx context.Context, userID, sourceID string) error + func (s *SQLiteIndexStore) GetAllIndexes(ctx context.Context, userID string) ([]*IndexTree, error) + func (s *SQLiteIndexStore) GetIndex(ctx context.Context, userID, sourceID string) (*IndexTree, error) + func (s *SQLiteIndexStore) RemoveNode(ctx context.Context, userID, sourceID, nodeID string) error + func (s *SQLiteIndexStore) SearchIndex(ctx context.Context, userID, query string, limit int) (*IndexSearchResult, error) + func (s *SQLiteIndexStore) UpdateIndex(ctx context.Context, tree *IndexTree) error + func (s *SQLiteIndexStore) UpdateNode(ctx context.Context, userID, sourceID string, node *IndexNode) error + type SQLiteKnowledgeStore struct + func NewSQLiteKnowledgeStore(store *SQLiteStore) *SQLiteKnowledgeStore + func (s *SQLiteKnowledgeStore) Add(ctx context.Context, entry KnowledgeEntry) error + func (s *SQLiteKnowledgeStore) Clear(ctx context.Context, userID string) error + func (s *SQLiteKnowledgeStore) Delete(ctx context.Context, id string) error + func (s *SQLiteKnowledgeStore) Get(ctx context.Context, id string) (*KnowledgeEntry, error) + func (s *SQLiteKnowledgeStore) GetByCategory(ctx context.Context, userID, category string) ([]KnowledgeEntry, error) + func (s *SQLiteKnowledgeStore) GetByTags(ctx context.Context, userID string, tags []string) ([]KnowledgeEntry, error) + func (s *SQLiteKnowledgeStore) GetStats(ctx context.Context, userID string) (int, error) + func (s *SQLiteKnowledgeStore) Search(ctx context.Context, userID string, opts *SearchOptions) (*SearchResult, error) + func (s *SQLiteKnowledgeStore) Update(ctx context.Context, entry KnowledgeEntry) error + type SQLitePageIndexStore struct + func NewSQLitePageIndexStore(store *SQLiteStore) *SQLitePageIndexStore + func (s *SQLitePageIndexStore) CountByUser(ctx context.Context, userID string) (int, error) + func (s *SQLitePageIndexStore) Delete(ctx context.Context, userID, id string) error + func (s *SQLitePageIndexStore) DeleteByKinds(ctx context.Context, userID string, kinds []PageIndexKind) error + func (s *SQLitePageIndexStore) DeleteByUser(ctx context.Context, userID string) error + func (s *SQLitePageIndexStore) Search(ctx context.Context, userID, query string, opts *PageIndexSearchOptions) ([]PageIndexHit, error) + func (s *SQLitePageIndexStore) Upsert(ctx context.Context, doc PageIndexDoc) error + type SQLitePreferenceStore struct + func NewSQLitePreferenceStore(store *SQLiteStore) *SQLitePreferenceStore + func (s *SQLitePreferenceStore) Clear(ctx context.Context, userID string) error + func (s *SQLitePreferenceStore) Delete(ctx context.Context, userID, category, key string) error + func (s *SQLitePreferenceStore) Get(ctx context.Context, userID, category, key string) (*Preference, error) + func (s *SQLitePreferenceStore) GetAllAsMap(ctx context.Context, userID string) (map[string]string, error) + func (s *SQLitePreferenceStore) GetByCategory(ctx context.Context, userID, category string) ([]Preference, error) + func (s *SQLitePreferenceStore) GetByUser(ctx context.Context, userID string) ([]Preference, error) + func (s *SQLitePreferenceStore) Search(ctx context.Context, userID string, opts *SearchOptions) (*SearchResult, error) + func (s *SQLitePreferenceStore) Set(ctx context.Context, pref Preference) error + type SQLiteStore struct + func NewSQLiteStore(dbPath string) (*SQLiteStore, error) + func NewSQLiteStoreFromDB(db *sql.DB) (*SQLiteStore, error) + func (s *SQLiteStore) Close() error + func (s *SQLiteStore) DB() *sql.DB + type SearchOptions = typescore.SearchOptions + type SearchResult = typescore.SearchResult