Versions in this module Expand all Collapse all v0 v0.3.0 Jun 11, 2026 Changes in this version + const BackoffBase + const DefaultExamples + const DefaultMaxRetries + const DefaultMaxSteps + const DefaultPromptTemplate + const FailModeClosed + const FailModeOpen + const TracerName + func Execute[TIn any, TOut any](ctx context.Context, c *Client, handle TypedAction[TIn, TOut], input TIn) (TOut, error) + func HydrateActions(ctx context.Context, actions map[string]config.ActionConfig) ([]core.Action, error) + func NewActionFromConfig(ctx context.Context, name string, cfg config.ActionConfig) (core.Action, error) + func RegisterMemoryProvider(name string, factory MemoryFactory) + func RegisterProvider(name string, factory ProviderFactory) + func WithExtractor(action core.Action, ext ports.Extractor) core.Action + func WithJSONMode(enabled bool) core.GenerateOption + func WithMaxTokens(n int) core.GenerateOption + func WithModel(m string) core.GenerateOption + func WithStopSequences(seqs []string) core.GenerateOption + func WithStructuredOutput(schema any) core.GenerateOption + func WithTemperature(t float64) core.GenerateOption + func WithTopP(p float64) core.GenerateOption + type ActionMetadata = core.ActionMetadata + type Client struct + func Must(c *Client, err error) *Client + func NewClient(ctx context.Context, opts ...ClientOption) (*Client, error) + func NewClientFromConfig(ctx context.Context, cfg *config.Config, opts ...ClientOption) (*Client, error) + func NewClientFromFile(ctx context.Context, configPath string, opts ...ClientOption) (*Client, error) + func NewDefault() (*Client, error) + func TryClient(c *Client, err error) (*Client, error) + func (c *Client) Action(name string) core.Action + func (c *Client) Engine() core.Evaluator + func (c *Client) Execute(ctx context.Context, input core.Envelope, opts ...ExecuteOption) (core.Envelope, error) + func (c *Client) ExecuteByName(ctx context.Context, actionName string, input any, opts ...ExecuteOption) (core.Envelope, error) + func (c *Client) ExecutePlan(ctx context.Context, steps []PlanStep, initialInput core.Envelope) (core.Envelope, error) + func (c *Client) ExecuteSingleStep(ctx context.Context, actionName string, payload any, params *ExecutionParams) (core.Envelope, error) + func (c *Client) LoadFacts(facts []string) error + func (c *Client) LoadGherkinPolicy(ctx context.Context, featureContent string) error + func (c *Client) LoadNTriplesFile(path string) error + func (c *Client) Logger() core.Logger + func (c *Client) Memory() core.AgentMemory + func (c *Client) Plan(ctx context.Context, goalName string) ([]PlanStep, error) + func (c *Client) RegisterAction(name string, action core.Action) + func (c *Client) SetLLM(gen core.TextGenerator) + func (c *Client) Shutdown(ctx context.Context) error + func (c *Client) Supervise(action core.Action) core.Action + func (c *Client) Tracer() trace.Tracer + type ClientOption func(*Client) error + func WithAgentMemory(mem core.AgentMemory) ClientOption + func WithBlueprintPath(path string) ClientOption + func WithConfig(cfg *config.Config) ClientOption + func WithEngine(e core.Evaluator) ClientOption + func WithFailMode(mode string) ClientOption + func WithHistory(store core.HistoryStore) ClientOption + func WithLLM(gen core.TextGenerator) ClientOption + func WithLogger(l core.Logger) ClientOption + func WithMemory(mem core.AgentMemory) ClientOption + func WithProviderConfig(name string, cfg config.ActionConfig) ClientOption + func WithStateProvider(provider core.StateProvider) ClientOption + func WithStdoutTracer() ClientOption + func WithTracerProvider(tp trace.TracerProvider) ClientOption + type Envelope = core.Envelope + func NewEnvelope(payload any) Envelope + type ExecuteOption func(*ExecutionParams) + func WithMaxSteps(n int) ExecuteOption + func WithMetadata(key, value string) ExecuteOption + func WithMetadataMap(meta map[string]any) ExecuteOption + func WithSessionID(id string) ExecuteOption + func WithTransientMemory() ExecuteOption + type ExecutionParams struct + AuditRecords []core.AuditRecord + CurrentHistory []core.Message + FeedbackHistory []string + LastFeedback string + MaxSteps int + MemoryMode core.MemoryMode + Metadata map[string]string + RetryCount int + SessionID string + Store core.HistoryStore + type Generator struct + func NewPolicyGenerator(llmAction core.Action, opts GeneratorOptions) (*Generator, error) + func (g *Generator) GenerateRule(ctx context.Context, schemaSample any, policyText string) (string, error) + type GeneratorOptions struct + Examples string + PromptTemplate string + RuleHead string + type HybridMemory struct + CollectionName string + Embedder core.Embedder + History core.HistoryStore + TopK int + Vectors core.VectorStore + func NewHybridMemory(h core.HistoryStore, v core.VectorStore, e core.Embedder) *HybridMemory + func (m *HybridMemory) Append(ctx context.Context, sessionID string, msgs []core.Message) error + func (m *HybridMemory) Init(ctx context.Context) error + func (m *HybridMemory) Memorize(ctx context.Context, query string, answer string) error + func (m *HybridMemory) Read(ctx context.Context, sessionID string) ([]core.Message, error) + func (m *HybridMemory) Recall(ctx context.Context, query string) (string, error) + type MemoryFactory func(ctx context.Context, cfg config.MemoryConfig) (core.AgentMemory, error) + func MemoryProvider(name string) (MemoryFactory, error) + type PlanStep struct + ActionName string + Order int + type ProviderFactory func(opts map[string]any) (ClientOption, error) + func Provider(name string) (ProviderFactory, error) + type Runnable struct + func Define[In any, Out any](c *Client, name string, handler func(context.Context, In) (Out, error)) *Runnable[In, Out] + func (r *Runnable[In, Out]) Run(ctx context.Context, input In) (Out, error) + type TypedAction struct + Name string + func DefineAction[TIn any, TOut any](name string) TypedAction[TIn, TOut]