agentadapter

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GuardPromptBlock

func GuardPromptBlock() prompt.Block

Types

type ExplicitWriteAllowed

type ExplicitWriteAllowed func(agentcore.RunRequest) bool

type JSONCandidateExtractor

type JSONCandidateExtractor struct {
	Client        ports.LLMClient
	Limits        memorykit.Limits
	MaxCandidates int
}

func NewJSONCandidateExtractor

func NewJSONCandidateExtractor(client ports.LLMClient, limits memorykit.Limits, maxCandidates int) (*JSONCandidateExtractor, error)

func (*JSONCandidateExtractor) Extract

type Observer

type Observer interface {
	RecordMemoryEvent(context.Context, string, map[string]any)
}

type Projector

type Projector struct {
	// contains filtered or unexported fields
}

func NewProjector

func NewProjector(cfg ProjectorConfig) (*Projector, error)

type ProjectorConfig

type ProjectorConfig struct {
	Recall       *memorykit.Recaller
	ResolveScope ScopeResolver
	BuildQuery   QueryBuilder
	Observe      Observer
	Next         agentcore.ContextProjector
}

type QueryBuilder

type QueryBuilder func(context.Context, agentcore.ContextProjectionRequest) (text string, keys []string, kinds []memorykit.Kind, err error)

type ScopeResolver

type ScopeResolver func(map[string]any) (memorykit.Scope, error)

type ToolProvider

type ToolProvider struct {
	// contains filtered or unexported fields
}

func NewToolProvider

func NewToolProvider(config ToolProviderConfig) (*ToolProvider, error)

func (*ToolProvider) OutputValidator

func (p *ToolProvider) OutputValidator() agentcore.OutputValidator

OutputValidator converts any request-scoped write failure into one stable final-output error without inspecting or echoing model content.

func (*ToolProvider) Tools

func (p *ToolProvider) Tools(ctx context.Context, request agentcore.RunRequest) ([]tools.Tool, error)

type ToolProviderConfig

type ToolProviderConfig struct {
	Store              memorykit.LifecycleStore
	DeepRecall         *memorykit.Recaller
	ResolveScope       ScopeResolver
	AllowExplicitWrite ExplicitWriteAllowed
	ValidateContent    memorykit.ContentValidator
	Limits             memorykit.Limits
	Now                func() time.Time
}

Jump to

Keyboard shortcuts

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