plugins

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package plugins provides AgentPlugin implementations for optional agent features.

Each plugin wraps a runner interface from the agent package and integrates with the Pipeline via the AgentPlugin system (agent/agent_plugin.go).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnhancedMemoryAfterPlugin added in v1.2.0

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

EnhancedMemoryAfterPlugin saves output to enhanced memory after execution. Phase: AfterExecute, Priority: 60.

func NewEnhancedMemoryAfterPlugin added in v1.2.0

func NewEnhancedMemoryAfterPlugin(runner agent.EnhancedMemoryRunner, useReflection bool) *EnhancedMemoryAfterPlugin

NewEnhancedMemoryAfterPlugin creates the after-execute memory plugin.

func (*EnhancedMemoryAfterPlugin) AfterExecute added in v1.2.0

AfterExecute saves the output to enhanced memory and records an episode.

func (*EnhancedMemoryAfterPlugin) Init added in v1.2.0

func (*EnhancedMemoryAfterPlugin) Name added in v1.2.0

func (*EnhancedMemoryAfterPlugin) Phase added in v1.2.0

func (*EnhancedMemoryAfterPlugin) Priority added in v1.2.0

func (p *EnhancedMemoryAfterPlugin) Priority() int

func (*EnhancedMemoryAfterPlugin) Shutdown added in v1.2.0

type EnhancedMemoryBeforePlugin added in v1.2.0

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

EnhancedMemoryBeforePlugin loads working and short-term memory before execution. Phase: BeforeExecute, Priority: 20.

func NewEnhancedMemoryBeforePlugin added in v1.2.0

func NewEnhancedMemoryBeforePlugin(runner agent.EnhancedMemoryRunner, loadWorking, loadShortTerm, skipBase bool) *EnhancedMemoryBeforePlugin

NewEnhancedMemoryBeforePlugin creates the before-execute memory plugin.

func (*EnhancedMemoryBeforePlugin) BeforeExecute added in v1.2.0

BeforeExecute loads enhanced memory context into PipelineContext metadata.

func (*EnhancedMemoryBeforePlugin) Init added in v1.2.0

func (*EnhancedMemoryBeforePlugin) Name added in v1.2.0

func (*EnhancedMemoryBeforePlugin) Phase added in v1.2.0

func (*EnhancedMemoryBeforePlugin) Priority added in v1.2.0

func (p *EnhancedMemoryBeforePlugin) Priority() int

func (*EnhancedMemoryBeforePlugin) Shutdown added in v1.2.0

type ObservabilityPlugin added in v1.2.0

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

ObservabilityPlugin wraps the entire execution with tracing and metrics. Phase: AroundExecute, Priority: 0 (outermost wrapper).

func NewObservabilityPlugin added in v1.2.0

func NewObservabilityPlugin(runner agent.ObservabilityRunner, recordMetrics, recordTrace bool) *ObservabilityPlugin

NewObservabilityPlugin creates an observability plugin.

func (*ObservabilityPlugin) AroundExecute added in v1.2.0

AroundExecute starts a trace, calls next, then ends the trace and records metrics.

func (*ObservabilityPlugin) Init added in v1.2.0

func (*ObservabilityPlugin) Name added in v1.2.0

func (p *ObservabilityPlugin) Name() string

func (*ObservabilityPlugin) Phase added in v1.2.0

func (*ObservabilityPlugin) Priority added in v1.2.0

func (p *ObservabilityPlugin) Priority() int

func (*ObservabilityPlugin) Shutdown added in v1.2.0

func (p *ObservabilityPlugin) Shutdown(_ context.Context) error

type PromptEnhancerPlugin added in v1.2.0

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

PromptEnhancerPlugin enhances the user prompt with additional context. Phase: BeforeExecute, Priority: 30.

func NewPromptEnhancerPlugin added in v1.2.0

func NewPromptEnhancerPlugin(runner agent.PromptEnhancerRunner) *PromptEnhancerPlugin

NewPromptEnhancerPlugin creates a prompt enhancer plugin.

func (*PromptEnhancerPlugin) BeforeExecute added in v1.2.0

BeforeExecute enhances the user prompt using skill instructions and memory context.

func (*PromptEnhancerPlugin) Init added in v1.2.0

func (*PromptEnhancerPlugin) Name added in v1.2.0

func (p *PromptEnhancerPlugin) Name() string

func (*PromptEnhancerPlugin) Phase added in v1.2.0

func (*PromptEnhancerPlugin) Priority added in v1.2.0

func (p *PromptEnhancerPlugin) Priority() int

func (*PromptEnhancerPlugin) Shutdown added in v1.2.0

func (p *PromptEnhancerPlugin) Shutdown(_ context.Context) error

type ReflectionPlugin added in v1.2.0

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

ReflectionPlugin replaces the core LLM execution with reflection-based execution. Phase: AroundExecute, Priority: 50.

func NewReflectionPlugin added in v1.2.0

func NewReflectionPlugin(runner agent.ReflectionRunner) *ReflectionPlugin

NewReflectionPlugin creates a reflection plugin.

func (*ReflectionPlugin) AroundExecute added in v1.2.0

AroundExecute intercepts execution and uses reflection-based execution instead. If reflection produces a result with GetFinalOutput(), it populates the PipelineContext and skips the normal LLM call chain. Otherwise falls through to next.

func (*ReflectionPlugin) Init added in v1.2.0

func (*ReflectionPlugin) Name added in v1.2.0

func (p *ReflectionPlugin) Name() string

func (*ReflectionPlugin) Phase added in v1.2.0

func (p *ReflectionPlugin) Phase() agent.PluginPhase

func (*ReflectionPlugin) Priority added in v1.2.0

func (p *ReflectionPlugin) Priority() int

func (*ReflectionPlugin) Shutdown added in v1.2.0

func (p *ReflectionPlugin) Shutdown(_ context.Context) error

type SkillsPlugin added in v1.2.0

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

SkillsPlugin discovers relevant skills and prepends instructions to the input. Phase: BeforeExecute, Priority: 10.

func NewSkillsPlugin added in v1.2.0

func NewSkillsPlugin(discoverer agent.SkillDiscoverer, query string) *SkillsPlugin

NewSkillsPlugin creates a skills discovery plugin.

func (*SkillsPlugin) BeforeExecute added in v1.2.0

func (p *SkillsPlugin) BeforeExecute(ctx context.Context, pc *agent.PipelineContext) error

BeforeExecute discovers skills and prepends instructions to the input content.

func (*SkillsPlugin) Init added in v1.2.0

func (p *SkillsPlugin) Init(_ context.Context) error

func (*SkillsPlugin) Name added in v1.2.0

func (p *SkillsPlugin) Name() string

func (*SkillsPlugin) Phase added in v1.2.0

func (p *SkillsPlugin) Phase() agent.PluginPhase

func (*SkillsPlugin) Priority added in v1.2.0

func (p *SkillsPlugin) Priority() int

func (*SkillsPlugin) Shutdown added in v1.2.0

func (p *SkillsPlugin) Shutdown(_ context.Context) error

type ToolSelectionPlugin added in v1.2.0

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

ToolSelectionPlugin dynamically selects tools based on the task. Phase: BeforeExecute, Priority: 40.

func NewToolSelectionPlugin added in v1.2.0

func NewToolSelectionPlugin(runner agent.DynamicToolSelectorRunner, toolManager agent.ToolManager, agentID string) *ToolSelectionPlugin

NewToolSelectionPlugin creates a tool selection plugin.

func (*ToolSelectionPlugin) BeforeExecute added in v1.2.0

func (p *ToolSelectionPlugin) BeforeExecute(ctx context.Context, pc *agent.PipelineContext) error

BeforeExecute selects tools dynamically based on the input content.

func (*ToolSelectionPlugin) Init added in v1.2.0

func (*ToolSelectionPlugin) Name added in v1.2.0

func (p *ToolSelectionPlugin) Name() string

func (*ToolSelectionPlugin) Phase added in v1.2.0

func (*ToolSelectionPlugin) Priority added in v1.2.0

func (p *ToolSelectionPlugin) Priority() int

func (*ToolSelectionPlugin) Shutdown added in v1.2.0

func (p *ToolSelectionPlugin) Shutdown(_ context.Context) error

Jump to

Keyboard shortcuts

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