Documentation
¶
Overview ¶
Package yaad provides the public Go SDK for embedding Yaad memory into any Go application or coding agent.
Usage:
import "github.com/GrayCodeAI/yaad/sdk/go/yaad"
mem, _ := yaad.Open(".yaad/yaad.db")
defer mem.Close()
node, _ := mem.Remember("Use jose for JWT", yaad.Convention)
results, _ := mem.Recall("auth middleware")
context, _ := mem.Context("")
model, _ := mem.MentalModel("")
Index ¶
- Constants
- type Edge
- type Memory
- func (m *Memory) Approve(id string) error
- func (m *Memory) Close() error
- func (m *Memory) Compact(project string) (int, error)
- func (m *Memory) Context(project string) (*RecallResult, error)
- func (m *Memory) Discard(id string) error
- func (m *Memory) Edit(id string, newContent string) error
- func (m *Memory) Forget(id string) error
- func (m *Memory) MentalModel(project string) (*MentalModel, error)
- func (m *Memory) Recall(query string, opts ...RecallOption) (*RecallResult, error)
- func (m *Memory) Remember(content string, nodeType string, opts ...RememberOption) (*Node, error)
- type MentalModel
- type Node
- type RecallOption
- type RecallResult
- type RememberOption
Constants ¶
const ( Convention = "convention" Decision = "decision" Bug = "bug" Spec = "spec" Task = "task" Skill = "skill" Preference = "preference" )
Memory types.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
Memory is the main Yaad SDK handle.
func Open ¶
Open opens a Yaad database at the given path. Creates the database and schema if it doesn't exist.
func (*Memory) Context ¶
func (m *Memory) Context(project string) (*RecallResult, error)
Context returns the hot-tier subgraph for session start injection.
func (*Memory) MentalModel ¶
func (m *Memory) MentalModel(project string) (*MentalModel, error)
MentalModel generates an auto-evolving project summary.
func (*Memory) Recall ¶
func (m *Memory) Recall(query string, opts ...RecallOption) (*RecallResult, error)
Recall performs graph-aware search: BM25 + vector + graph + temporal.
type MentalModel ¶
MentalModel is an auto-generated project summary.
type RecallOption ¶
type RecallOption func(*engine.RecallOpts)
RecallOption configures a Recall call.
type RecallResult ¶
type RecallResult = engine.RecallResult
RecallResult holds search results with nodes and edges.
type RememberOption ¶
type RememberOption func(*engine.RememberInput)
RememberOption configures a Remember call.
func WithProject ¶
func WithProject(project string) RememberOption
WithProject sets the project scope.
func WithSummary ¶
func WithSummary(summary string) RememberOption
WithSummary sets a short summary.