Versions in this module Expand all Collapse all v1 v1.2.2 Jan 27, 2026 Changes in this version + const CoreSchema + const FTS5Schema + const SchemaVersion + var AgentTypes = []string + var RelationshipTypes = []string + func IsValidAgentType(t string) bool + func IsValidRelationshipType(t string) bool + func MigrationV1ToV2(db *sql.DB) error + func ParseTags(s string) []string + type AgentSession struct + AgentContext string + AgentType string + CreatedAt time.Time + IsActive bool + LastAccessed time.Time + Metadata string + SessionID string + type AutonomousLoop struct + BaselineScore *float64 + BestRunID string + BestScore *float64 + ChangesAccepted string + ChangesAttempted string + ChangesRejected string + CompletedAt *time.Time + ConvergenceThreshold float64 + FinalScore *float64 + ID string + MaxIterations int + MinImprovementThreshold float64 + StartedAt time.Time + Status string + StopReason string + TotalIterations int + type BenchmarkCategoryResult struct + Bleu1Score *float64 + Category string + CorrectCount *int + F1Score *float64 + ID string + Improvement *float64 + LLMJudgeAccuracy *float64 + PreviousBestAccuracy *float64 + RunID string + TotalQuestions *int + type BenchmarkQuestionResult struct + Bleu1Score *float64 + Category string + ChangedFromPrevious *bool + ContextLength *int + F1Score *float64 + GeneratedAnswer string + GenerationTimeMs *int + GoldAnswer string + ID string + LLMJudgeLabel *int + MemoriesUsed *int + PreviousWasCorrect *bool + QuestionID string + QuestionText string + RetrievalTimeMs *int + RunID string + type BenchmarkRun struct + AutonomousLoopID string + BaselineRunID string + BenchmarkType string + ChangeDescription string + CompletedAt *time.Time + ConfigSnapshot string + CreatedBy string + DurationSeconds *float64 + ErrorMessage string + GitBranch string + GitCommitHash string + GitDirty bool + ID string + ImprovementFromBaseline *float64 + IsBestRun bool + IterationNumber int + Notes string + OverallBleu1 *float64 + OverallF1 *float64 + OverallScore *float64 + StartedAt time.Time + Status string + TotalCorrect *int + TotalQuestions *int + type BenchmarkRunFilters struct + BenchmarkType string + GitCommit string + Limit int + LoopID string + Offset int + Since *time.Time + Status string + Until *time.Time + type Category struct + AutoGenerated bool + ConfidenceThreshold float64 + CreatedAt time.Time + Description string + ID string + Name string + ParentCategoryID string + type Database struct + func Open(path string) (*Database, error) + func (d *Database) Begin() (*sql.Tx, error) + func (d *Database) CategorizeMemory(memoryID, categoryID string, confidence float64, reasoning string) error + func (d *Database) Checkpoint() error + func (d *Database) Close() error + func (d *Database) CountRows(table string) (int, error) + func (d *Database) CreateAutonomousLoop(loop *AutonomousLoop) error + func (d *Database) CreateBenchmarkCategoryResult(result *BenchmarkCategoryResult) error + func (d *Database) CreateBenchmarkQuestionResult(result *BenchmarkQuestionResult) error + func (d *Database) CreateBenchmarkRun(run *BenchmarkRun) error + func (d *Database) CreateCategory(c *Category) error + func (d *Database) CreateDomain(dom *Domain) error + func (d *Database) CreateMemory(m *Memory) error + func (d *Database) CreateRelationship(r *Relationship) error + func (d *Database) DB() *sql.DB + func (d *Database) DeleteMemory(id string) error + func (d *Database) EnsureSession(sessionID string, agentType string) error + func (d *Database) Exec(query string, args ...interface{}) (sql.Result, error) + func (d *Database) FindRelated(memoryID string, filters *RelationshipFilters) ([]*Memory, error) + func (d *Database) GetAutonomousLoop(id string) (*AutonomousLoop, error) + func (d *Database) GetBenchmarkCategoryResults(runID string) ([]*BenchmarkCategoryResult, error) + func (d *Database) GetBenchmarkQuestionResults(runID string) ([]*BenchmarkQuestionResult, error) + func (d *Database) GetBenchmarkRun(id string) (*BenchmarkRun, error) + func (d *Database) GetBestBenchmarkRun(benchmarkType string) (*BenchmarkRun, error) + func (d *Database) GetChildChunks(parentID string) ([]*Memory, error) + func (d *Database) GetDomainStats(domainName string) (*DomainStats, error) + func (d *Database) GetGraph(rootID string, depth int) (*Graph, error) + func (d *Database) GetMemory(id string) (*Memory, error) + func (d *Database) GetMemoryCountBySession(sessionID string) (int, error) + func (d *Database) GetRelationshipsBetween(sourceID, targetID string) ([]*Relationship, error) + func (d *Database) GetRelationshipsForMemory(memoryID string) ([]*Relationship, error) + func (d *Database) GetRootMemories(filters *MemoryFilters) ([]*Memory, error) + func (d *Database) GetSchemaVersion() (int, error) + func (d *Database) GetStats() (*Stats, error) + func (d *Database) InitSchema() error + func (d *Database) ListBenchmarkRuns(filters *BenchmarkRunFilters) ([]*BenchmarkRun, error) + func (d *Database) ListCategories() ([]*Category, error) + func (d *Database) ListDomains() ([]*Domain, error) + func (d *Database) ListMemories(filters *MemoryFilters) ([]*Memory, error) + func (d *Database) ListSessions() ([]*AgentSession, error) + func (d *Database) Path() string + func (d *Database) Query(query string, args ...interface{}) (*sql.Rows, error) + func (d *Database) QueryRow(query string, args ...interface{}) *sql.Row + func (d *Database) RecordMetric(operationType string, executionTimeMs int, memoryCount int) error + func (d *Database) RunMigrations() error + func (d *Database) SearchFTS(query string, filters *SearchFilters) ([]*SearchResult, error) + func (d *Database) TableExists(name string) (bool, error) + func (d *Database) UpdateAutonomousLoop(loop *AutonomousLoop) error + func (d *Database) UpdateBenchmarkRun(run *BenchmarkRun) error + func (d *Database) UpdateMemory(id string, updates *MemoryUpdate) error + func (d *Database) Vacuum() error + type Domain struct + CreatedAt time.Time + Description string + ID string + Name string + UpdatedAt time.Time + type DomainStats struct + AverageImportance float64 + MemoryCount int + type Graph struct + Edges []GraphEdge + Nodes []GraphNode + type GraphEdge struct + SourceID string + Strength float64 + TargetID string + Type string + type GraphNode struct + Content string + Distance int + ID string + Importance int + type Memory struct + AccessScope string + AgentContext string + AgentType string + ChunkIndex int + ChunkLevel int + Content string + CreatedAt time.Time + Domain string + Embedding []byte + ID string + Importance int + ParentMemoryID string + SessionID string + Slug string + Source string + Tags []string + UpdatedAt time.Time + func (m *Memory) IsChunk() bool + func (m *Memory) IsRoot() bool + func (m *Memory) TagsJSON() string + type MemoryCategorization struct + CategoryID string + Confidence float64 + CreatedAt time.Time + MemoryID string + Reasoning string + type MemoryFilters struct + Domain string + EndDate *time.Time + Limit int + MaxImportance int + MinImportance int + Offset int + SessionID string + StartDate *time.Time + Tags []string + type MemoryUpdate struct + Content *string + Domain *string + Importance *int + Source *string + Tags []string + type MigrationLog struct + CategoriesMigrated int + Checksum string + ErrorMessage string + ID string + MemoriesMigrated int + MigrationTimestamp time.Time + MigrationType string + NewSessionID string + OriginalSessionID string + RelationshipsMigrated int + SourceDBPath string + Success bool + type PerformanceMetric struct + ExecutionTimeMs int + ID int + MemoryCount int + OperationType string + Timestamp time.Time + type Relationship struct + AutoGenerated bool + Context string + CreatedAt time.Time + ID string + RelationshipType string + SourceMemoryID string + Strength float64 + TargetMemoryID string + type RelationshipFilters struct + Limit int + MinStrength float64 + Type string + type SearchFilters struct + Domain string + Limit int + MinRelevance float64 + Query string + SessionID string + Tags []string + UseAI bool + type SearchResult struct + Memory *Memory + Relevance float64 + type Stats struct + CategoryCount int + DomainCount int + FileSizeBytes int64 + MemoryCount int + Path string + RelationCount int + SchemaVersion int + SessionCount int + TableCount int + type VectorMetadata struct + EmbeddingDimension int + EmbeddingModel string + LastUpdated time.Time + MemoryID string + VectorIndex int