Documentation
¶
Overview ¶
Package ladym is the Go SDK facade for LadyM — a brain-inspired, multi-tier memory framework for LLM agents and codebase RAG.
Usage:
eng, err := ladym.NewEngine(ladym.DefaultConfig())
eng.IndexCode("./src", false, "", nil)
resp, _ := eng.Recall("how does auth work", "", 0, nil, nil, 0)
Index ¶
- Constants
- func DefaultConfig() *config.Config
- func IndexCode(root, dbPath, workspace string, force bool) (*code.IndexReport, error)
- func NamedOps() []string
- func NewEngine(cfg *config.Config) (*engine.Engine, error)
- func NewEngineWithModels(cfg *config.Config, models *adapter.ModelRouting) (*engine.Engine, error)
- func OpenEngine(cfg *config.Config, dbPath, workspace string, fn func(*engine.Engine) error) error
- func Recall(query, dbPath, workspace string, topK int) (*schema.RecallResponse, error)
- func Remember(content, dbPath, workspace string, tags []string, source string) (*schema.Memory, error)
- type ActivationWeights
- type CodeIndexConfig
- type CodeSymbol
- type Config
- type ConsolidateConfig
- type Edge
- type Engine
- type Layer
- type Memory
- type MemoryType
- type ModelRouting
- type RecallConfig
- type RecallResponse
- type RecallResult
- type Stats
Constants ¶
const ( LayerWorking = schema.LayerWorking LayerEpisodic = schema.LayerEpisodic LayerSemantic = schema.LayerSemantic LayerProcedural = schema.LayerProcedural LayerAssociative = schema.LayerAssociative LayerL5Mental = schema.LayerL5Mental LayerL6Predictive = schema.LayerL6Predictive )
Layer constants.
const ( TypeNote = schema.TypeNote TypeEvent = schema.TypeEvent TypeFact = schema.TypeFact TypeCodeFile = schema.TypeCodeFile TypeCodeSymbol = schema.TypeCodeSymbol TypePlaybook = schema.TypePlaybook TypeSnippet = schema.TypeSnippet TypeMentalModel = schema.TypeMentalModel TypeForwardIntent = schema.TypeForwardIntent )
MemoryType constants.
const Version = "0.5.2"
Version is the LadyM version.
Variables ¶
This section is empty.
Functions ¶
func DefaultConfig ¶
DefaultConfig returns a Config with all defaults populated.
func IndexCode ¶
func IndexCode(root, dbPath, workspace string, force bool) (*code.IndexReport, error)
IndexCode is a one-shot codebase index.
func NamedOps ¶
func NamedOps() []string
NAMED_OPS mirrors providers.NAMED_OPS (the cognitive operations that can bind an LLM provider). A copy is returned so callers cannot mutate the registry.
func NewEngineWithModels ¶
NewEngineWithModels builds an Engine injecting host-owned models.
func OpenEngine ¶
OpenEngine runs fn with a short-lived Engine, closing it on return. It is the Go equivalent of Python's `open_engine` context manager.
Types ¶
type ActivationWeights ¶
type ActivationWeights = config.ActivationWeights
Re-export the public types for a one-import SDK surface.
type CodeIndexConfig ¶
type CodeIndexConfig = config.CodeIndexConfig
Re-export the public types for a one-import SDK surface.
type CodeSymbol ¶
type CodeSymbol = schema.CodeSymbol
Re-export the public types for a one-import SDK surface.
type ConsolidateConfig ¶
type ConsolidateConfig = config.ConsolidateConfig
Re-export the public types for a one-import SDK surface.
type MemoryType ¶
type MemoryType = schema.MemoryType
Re-export the public types for a one-import SDK surface.
type ModelRouting ¶
type ModelRouting = adapter.ModelRouting
Re-export the public types for a one-import SDK surface.
type RecallConfig ¶
type RecallConfig = config.RecallConfig
Re-export the public types for a one-import SDK surface.
type RecallResponse ¶
type RecallResponse = schema.RecallResponse
Re-export the public types for a one-import SDK surface.
type RecallResult ¶
type RecallResult = schema.RecallResult
Re-export the public types for a one-import SDK surface.