Help us shape the future of Go! Take the 2026 Go Developer Survey

ladym

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 6 Imported by: 0

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

View Source
const (
	LayerWorking      = schema.LayerWorking
	LayerEpisodic     = schema.LayerEpisodic
	LayerSemantic     = schema.LayerSemantic
	LayerProcedural   = schema.LayerProcedural
	LayerAssociative  = schema.LayerAssociative
	LayerL5Mental     = schema.LayerL5Mental
	LayerL6Predictive = schema.LayerL6Predictive
)

Layer constants.

View Source
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.

View Source
const Version = "0.5.2"

Version is the LadyM version.

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() *config.Config

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 NewEngine

func NewEngine(cfg *config.Config) (*engine.Engine, error)

NewEngine builds an Engine from cfg (nil → defaults).

func NewEngineWithModels

func NewEngineWithModels(cfg *config.Config, models *adapter.ModelRouting) (*engine.Engine, error)

NewEngineWithModels builds an Engine injecting host-owned models.

func OpenEngine

func OpenEngine(cfg *config.Config, dbPath, workspace string, fn func(*engine.Engine) error) error

OpenEngine runs fn with a short-lived Engine, closing it on return. It is the Go equivalent of Python's `open_engine` context manager.

func Recall

func Recall(query, dbPath, workspace string, topK int) (*schema.RecallResponse, error)

Recall is a one-shot recall. Returns a RecallResponse.

func RecallOperations added in v0.7.0

func RecallOperations(q OperationsQuery, dbPath, workspace string) (*engine.OperationsResponse, error)

RecallOperations is a one-shot recall_ops pivot query: which operations touched a resource, narrowed by action / time window / outcome. A resource miss degrades to plain recall with Fallback=true.

func RecordOperation added in v0.7.0

func RecordOperation(ev OperationEvent, dbPath, workspace string) (*schema.Memory, error)

RecordOperation is a one-shot structured L1 write: the action is normalized onto the vocabulary, each resource is resolved to a workspace entity, and an operates_on edge links the episode to every resource.

func Remember

func Remember(content, dbPath, workspace string, tags []string, source string) (*schema.Memory, error)

Remember is a one-shot write of a semantic fact.

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 Config

type Config = config.Config

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 Edge

type Edge = schema.Edge

Re-export the public types for a one-import SDK surface.

type Engine

type Engine = engine.Engine

Re-export the public types for a one-import SDK surface.

type Layer

type Layer = schema.Layer

Re-export the public types for a one-import SDK surface.

type Memory

type Memory = schema.Memory

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 OperationEvent added in v0.7.0

type OperationEvent = engine.OperationEvent

Re-export the public types for a one-import SDK surface.

type OperationsQuery added in v0.7.0

type OperationsQuery = engine.OperationsQuery

Re-export the public types for a one-import SDK surface.

type OperationsResponse added in v0.7.0

type OperationsResponse = engine.OperationsResponse

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.

type Stats

type Stats = schema.Stats

Re-export the public types for a one-import SDK surface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL