Documentation
¶
Index ¶
- func CalculateSuccessRate(metrics []*EvaluationMetrics) float64
- func ClassifyFileType(filename string) string
- func FormatDuration(d time.Duration) string
- func GetAverageLatency(metrics []*EvaluationMetrics) time.Duration
- func GetCostEstimate(plan *ExecutionPlan, model string) float64
- func ParseFileList(output string) []string
- func ParseJSONResponse(response string, target interface{}) error
- type Agent
- type AgentConfig
- type AgentOutputConfig
- type BashAgent
- func (a *BashAgent) CheckToolInstalled(ctx context.Context, tool string) (bool, error)
- func (a *BashAgent) Execute(ctx context.Context, input interface{}) (interface{}, error)
- func (a *BashAgent) Name() string
- func (a *BashAgent) SetOutputAgent(outputAgent *OutputAgent)
- func (a *BashAgent) SuggestInstallation(tool string) string
- type BashCommand
- type BashResult
- type CacheConfig
- type ChunkingAgent
- type ChunkingAgentConfig
- type ChunkingAnalysisInput
- type ChunkingAnalysisOutput
- type ChunkingMetrics
- type ChunkingRecommendation
- type CommandReport
- type DocumentSample
- type DocumentStructure
- type EvalAgent
- type EvalAgentConfig
- type EvaluationMetrics
- type ExecutionPlan
- type ExecutionStep
- type FeaturesConfig
- type FieldConfig
- type FieldSuggestion
- type IndexConfig
- type LLMConfig
- type OperationReport
- type OutputAgent
- func (a *OutputAgent) AskConfirmation(message string) (bool, error)
- func (a *OutputAgent) CreateProgressBar(max int, description string) *progressbar.ProgressBar
- func (a *OutputAgent) Execute(ctx context.Context, input interface{}) (interface{}, error)
- func (a *OutputAgent) Name() string
- func (a *OutputAgent) PrintCommandOutput(output string)
- func (a *OutputAgent) PrintCommandResult(report *CommandReport)
- func (a *OutputAgent) PrintError(message string)
- func (a *OutputAgent) PrintInfo(message string)
- func (a *OutputAgent) PrintMetrics(metrics *EvaluationMetrics)
- func (a *OutputAgent) PrintPlan(plan *ExecutionPlan)
- func (a *OutputAgent) PrintRejectionMessage(reason string)
- func (a *OutputAgent) PrintStepCompletion(stepNum int, duration time.Duration)
- func (a *OutputAgent) PrintStepError(stepNum int, errMsg string)
- func (a *OutputAgent) PrintStepProgress(stepNum int, step *ExecutionStep, status string)
- func (a *OutputAgent) PrintSuccess(message string)
- func (a *OutputAgent) PrintWarning(message string)
- type OutputConfig
- type PerformanceConfig
- type PlanningAgent
- type PlanningAgentConfig
- type PlanningAgentInput
- type QueryAgent
- type QueryAgentConfig
- type QueryAgentInput
- type QueryAgentOutput
- type ReportAgent
- type ReportAgentConfig
- type SchemaAgent
- type SchemaAgentConfig
- type SchemaAnalysisInput
- type SchemaAnalysisOutput
- type SchemaConfig
- type WeaveAgent
- func (a *WeaveAgent) Execute(ctx context.Context, input interface{}) (interface{}, error)
- func (a *WeaveAgent) InferMissingArguments(tool string, args map[string]interface{}, context map[string]interface{}) map[string]interface{}
- func (a *WeaveAgent) Name() string
- func (a *WeaveAgent) SetVerbose(verbose bool)
- func (a *WeaveAgent) ValidateArguments(tool string, args map[string]interface{}) error
- type WeaveAgentCommand
- type WeaveAgentResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateSuccessRate ¶
func CalculateSuccessRate(metrics []*EvaluationMetrics) float64
CalculateSuccessRate calculates success rate from historical metrics
func ClassifyFileType ¶
ClassifyFileType classifies a file based on its extension
func FormatDuration ¶
FormatDuration formats a duration for display
func GetAverageLatency ¶
func GetAverageLatency(metrics []*EvaluationMetrics) time.Duration
GetAverageLatency calculates average latency from historical metrics
func GetCostEstimate ¶
func GetCostEstimate(plan *ExecutionPlan, model string) float64
GetCostEstimate estimates the cost of a query before execution
func ParseFileList ¶
ParseFileList parses output from ls command into file list
func ParseJSONResponse ¶
ParseJSONResponse is a helper to parse JSON responses
Types ¶
type Agent ¶
type Agent interface {
// Name returns the agent's name
Name() string
// Execute processes input and returns output
Execute(ctx context.Context, input interface{}) (interface{}, error)
}
Agent is the base interface for all agents
type AgentConfig ¶ added in v0.8.4
type AgentConfig struct {
LLM LLMConfig `yaml:"llm"`
SchemaAgent SchemaAgentConfig `yaml:"schema_agent"`
ChunkingAgent ChunkingAgentConfig `yaml:"chunking_agent"`
QueryAgent QueryAgentConfig `yaml:"query_agent"`
PlanningAgent PlanningAgentConfig `yaml:"planning_agent"`
ReportAgent ReportAgentConfig `yaml:"report_agent"`
EvalAgent EvalAgentConfig `yaml:"eval_agent"`
Output AgentOutputConfig `yaml:"output"`
Cache CacheConfig `yaml:"cache"`
Performance PerformanceConfig `yaml:"performance"`
Features FeaturesConfig `yaml:"features"`
}
AgentConfig represents the configuration for AI agents
func LoadAgentConfig ¶ added in v0.8.4
func LoadAgentConfig() (*AgentConfig, error)
LoadAgentConfig loads agent configuration from file or returns defaults
func (*AgentConfig) GetMaxTokens ¶ added in v0.8.4
func (c *AgentConfig) GetMaxTokens(agentType string) int
GetMaxTokens returns the max tokens to use for an agent
func (*AgentConfig) GetModel ¶ added in v0.8.4
func (c *AgentConfig) GetModel(agentType string) string
GetModel returns the model to use for an agent, falling back to defaults
func (*AgentConfig) GetTemperature ¶ added in v0.8.4
func (c *AgentConfig) GetTemperature(agentType string) float64
GetTemperature returns the temperature to use for an agent
type AgentOutputConfig ¶ added in v0.8.4
type AgentOutputConfig struct {
DefaultFormat string `yaml:"default_format"`
Verbosity string `yaml:"verbosity"`
ShowConfidence bool `yaml:"show_confidence"`
ShowReasoning bool `yaml:"show_reasoning"`
ShowWarnings bool `yaml:"show_warnings"`
}
AgentOutputConfig represents output settings for AI agents
type BashAgent ¶
type BashAgent struct {
// contains filtered or unexported fields
}
BashAgent executes bash commands safely
func (*BashAgent) CheckToolInstalled ¶
CheckToolInstalled checks if a tool is installed
func (*BashAgent) SetOutputAgent ¶
func (a *BashAgent) SetOutputAgent(outputAgent *OutputAgent)
SetOutputAgent sets the output agent for user interaction
func (*BashAgent) SuggestInstallation ¶
SuggestInstallation suggests how to install a missing tool
type BashCommand ¶
type BashCommand struct {
Command string `json:"command"`
Args []string `json:"args"`
WorkingDir string `json:"working_dir,omitempty"`
Timeout time.Duration `json:"timeout,omitempty"`
Environment map[string]string `json:"environment,omitempty"`
}
BashCommand represents a bash command to execute
type BashResult ¶
type BashResult struct {
Success bool `json:"success"`
Stdout string `json:"stdout"`
Stderr string `json:"stderr"`
ExitCode int `json:"exit_code"`
Duration time.Duration `json:"duration"`
}
BashResult represents result of bash command execution
type CacheConfig ¶ added in v0.8.4
type CacheConfig struct {
Enabled bool `yaml:"enabled"`
TTLSeconds int `yaml:"ttl_seconds"`
MaxSizeMB int `yaml:"max_size_mb"`
}
CacheConfig represents cache settings
type ChunkingAgent ¶ added in v0.8.4
type ChunkingAgent struct {
// contains filtered or unexported fields
}
ChunkingAgent analyzes documents and suggests optimal chunking strategies
func NewChunkingAgent ¶ added in v0.8.4
func NewChunkingAgent(llmClient *llm.OpenAIClient) *ChunkingAgent
NewChunkingAgent creates a new chunking analysis agent
func (*ChunkingAgent) Execute ¶ added in v0.8.4
func (a *ChunkingAgent) Execute(ctx context.Context, input interface{}) (interface{}, error)
Execute analyzes documents and suggests chunking strategy
func (*ChunkingAgent) Name ¶ added in v0.8.4
func (a *ChunkingAgent) Name() string
Name returns the agent name
type ChunkingAgentConfig ¶ added in v0.8.4
type ChunkingAgentConfig struct {
Enabled bool `yaml:"enabled"`
Model string `yaml:"model"`
Temperature float64 `yaml:"temperature"`
MaxTokens int `yaml:"max_tokens"`
DefaultChunkSize int `yaml:"default_chunk_size"`
MinChunkSize int `yaml:"min_chunk_size"`
MaxChunkSize int `yaml:"max_chunk_size"`
DefaultOverlapPercent int `yaml:"default_overlap_percent"`
MinOverlapPercent int `yaml:"min_overlap_percent"`
MaxOverlapPercent int `yaml:"max_overlap_percent"`
TechnicalChunkSize int `yaml:"technical_chunk_size"`
NarrativeChunkSize int `yaml:"narrative_chunk_size"`
MixedChunkSize int `yaml:"mixed_chunk_size"`
}
ChunkingAgentConfig represents chunking agent configuration
type ChunkingAnalysisInput ¶ added in v0.8.4
type ChunkingAnalysisInput struct {
SampleFiles []string // Paths to sample documents
CollectionName string // Target collection name
VDBType string // Target VDB type
Requirements string // User requirements (optional)
MaxSamples int // Max files to analyze (default: 50)
}
ChunkingAnalysisInput represents input for chunking analysis
type ChunkingAnalysisOutput ¶ added in v0.8.4
type ChunkingAnalysisOutput struct {
Recommendation ChunkingRecommendation `json:"chunking_advice"`
Confidence float64 `json:"confidence"`
Warnings []string `json:"warnings,omitempty"`
Metrics ChunkingMetrics `json:"metrics,omitempty"`
}
ChunkingAnalysisOutput represents AI-generated chunking recommendations
type ChunkingMetrics ¶ added in v0.8.4
type ChunkingMetrics struct {
AvgContentLength int `json:"avg_content_length" yaml:"avg_content_length"`
AvgParagraphs int `json:"avg_paragraphs" yaml:"avg_paragraphs"`
AvgSections int `json:"avg_sections" yaml:"avg_sections"`
AvgParagraphLen int `json:"avg_paragraph_len" yaml:"avg_paragraph_len"`
ContentDensity string `json:"content_density" yaml:"content_density"`
FileTypes []string `json:"file_types" yaml:"file_types"`
}
ChunkingMetrics represents analyzed chunking characteristics
type ChunkingRecommendation ¶ added in v0.8.4
type ChunkingRecommendation struct {
RecommendedSize int `json:"recommended_size" yaml:"recommended_size"`
MinSize int `json:"min_size" yaml:"min_size"`
MaxSize int `json:"max_size" yaml:"max_size"`
OverlapSize int `json:"overlap_size" yaml:"overlap_size"`
Reasoning string `json:"reasoning" yaml:"reasoning"`
DocumentType string `json:"document_type" yaml:"document_type"`
Considerations []string `json:"considerations,omitempty" yaml:"considerations,omitempty"`
}
ChunkingRecommendation represents AI-powered chunking size recommendations
type CommandReport ¶
type CommandReport struct {
Type string `json:"type"` // "bash", "weave"
Command string `json:"command"`
Success bool `json:"success"`
Output string `json:"output"`
Error string `json:"error,omitempty"`
Duration time.Duration `json:"duration"`
}
CommandReport represents a single command execution report
type DocumentSample ¶ added in v0.8.4
type DocumentSample struct {
Path string
Type string
Size int64
Fields map[string]interface{}
Preview string // First 1000 chars
}
DocumentSample represents a sampled document
type DocumentStructure ¶ added in v0.8.4
type DocumentStructure struct {
Samples []DocumentSample
FileTypes []string
CommonFields map[string]int // field -> frequency
FieldTypes map[string]string // field -> inferred type
ContentLengths []int
Languages []string
// Chunking analysis fields
ParagraphCounts []int // paragraph count per document
SectionCounts []int // section count per document
AvgParagraphLen int // average paragraph length
ContentDensity string // "sparse", "medium", "dense"
}
DocumentStructure represents analyzed document structure
type EvalAgent ¶
type EvalAgent struct {
// contains filtered or unexported fields
}
EvalAgent evaluates query execution and tracks metrics
func NewEvalAgent ¶
NewEvalAgent creates a new EvalAgent
func (*EvalAgent) TrackMetrics ¶
func (a *EvalAgent) TrackMetrics(metrics *EvaluationMetrics) error
TrackMetrics tracks metrics (placeholder for Opik integration)
type EvalAgentConfig ¶ added in v0.8.4
type EvalAgentConfig struct {
Enabled bool `yaml:"enabled"`
Temperature float64 `yaml:"temperature"`
MaxTokens int `yaml:"max_tokens"`
}
EvalAgentConfig represents eval agent configuration
type EvaluationMetrics ¶
type EvaluationMetrics struct {
QueryID string `json:"query_id"`
Success bool `json:"success"`
IntentMatched bool `json:"intent_matched"`
LLMInvocations int `json:"llm_invocations"`
TotalTokens int `json:"total_tokens"`
PromptTokens int `json:"prompt_tokens"`
CompletionTokens int `json:"completion_tokens"`
TotalCost float64 `json:"total_cost"`
Latency time.Duration `json:"latency"`
ErrorRate float64 `json:"error_rate"`
UserSatisfaction *float64 `json:"user_satisfaction,omitempty"`
}
EvaluationMetrics represents evaluation metrics for a query
type ExecutionPlan ¶
type ExecutionPlan struct {
Steps []ExecutionStep `json:"steps"`
Summary string `json:"summary"`
Warnings []string `json:"warnings,omitempty"`
Estimations struct {
Duration string `json:"duration"`
Risk string `json:"risk"` // "low", "medium", "high"
} `json:"estimations"`
}
ExecutionPlan represents a complete execution plan
type ExecutionStep ¶
type ExecutionStep struct {
Type string `json:"type"` // "bash", "weave", "confirm"
Command string `json:"command"`
Description string `json:"description"`
Args []string `json:"args,omitempty"`
Params map[string]interface{} `json:"params,omitempty"`
DependsOn []int `json:"depends_on,omitempty"` // Step indices
Optional bool `json:"optional"`
Destructive bool `json:"destructive"`
}
ExecutionStep represents a single step in an execution plan
type FeaturesConfig ¶ added in v0.8.4
type FeaturesConfig struct {
Experimental bool `yaml:"experimental"`
Debug bool `yaml:"debug"`
Telemetry bool `yaml:"telemetry"`
}
FeaturesConfig represents feature flags
type FieldConfig ¶ added in v0.8.4
type FieldConfig struct {
Name string `yaml:"name" json:"name"`
Type string `yaml:"type" json:"type"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Indexed bool `yaml:"indexed" json:"indexed"`
Filterable bool `yaml:"filterable" json:"filterable"`
Required bool `yaml:"required" json:"required"`
}
FieldConfig represents a field configuration
type FieldSuggestion ¶ added in v0.8.4
type FieldSuggestion struct {
Name string `json:"name"`
Type string `json:"type"`
Indexed bool `json:"indexed"`
Filterable bool `json:"filterable"`
Required bool `json:"required"`
Examples []interface{} `json:"examples"`
Frequency float64 `json:"frequency"`
Cardinality int `json:"cardinality"`
Reasoning string `json:"reasoning"`
}
FieldSuggestion represents analysis for a single field
type IndexConfig ¶ added in v0.8.4
type IndexConfig struct {
Name string `yaml:"name" json:"name"`
Fields []string `yaml:"fields" json:"fields"`
Type string `yaml:"type" json:"type"` // "vector", "bm25", "composite"
}
IndexConfig represents an index configuration
type LLMConfig ¶ added in v0.8.4
type LLMConfig struct {
Provider string `yaml:"provider"`
APIKeyEnv string `yaml:"api_key_env"`
DefaultModel string `yaml:"default_model"`
DefaultTemperature float64 `yaml:"default_temperature"`
DefaultMaxTokens int `yaml:"default_max_tokens"`
}
LLMConfig represents LLM provider configuration
type OperationReport ¶
type OperationReport struct {
QueryIntent string `json:"query_intent"`
ExecutedSteps int `json:"executed_steps"`
SuccessfulSteps int `json:"successful_steps"`
FailedSteps int `json:"failed_steps"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
Duration time.Duration `json:"duration"`
Commands []CommandReport `json:"commands"`
Summary string `json:"summary"`
Recommendations []string `json:"recommendations,omitempty"`
NextSteps []string `json:"next_steps,omitempty"`
}
OperationReport represents a complete operation report
func CreateReport ¶
func CreateReport(intent string, startTime time.Time, commands []CommandReport) *OperationReport
CreateReport creates an operation report from execution results
type OutputAgent ¶
type OutputAgent struct {
// contains filtered or unexported fields
}
OutputAgent formats and displays information to users
func NewOutputAgent ¶
func NewOutputAgent(config OutputConfig) *OutputAgent
NewOutputAgent creates a new OutputAgent
func (*OutputAgent) AskConfirmation ¶
func (a *OutputAgent) AskConfirmation(message string) (bool, error)
AskConfirmation asks the user for confirmation
func (*OutputAgent) CreateProgressBar ¶
func (a *OutputAgent) CreateProgressBar(max int, description string) *progressbar.ProgressBar
CreateProgressBar creates a progress bar for tracking operations
func (*OutputAgent) Execute ¶
func (a *OutputAgent) Execute(ctx context.Context, input interface{}) (interface{}, error)
Execute formats and displays output (not typically used directly)
func (*OutputAgent) PrintCommandOutput ¶
func (a *OutputAgent) PrintCommandOutput(output string)
PrintCommandOutput prints the output from a command execution
func (*OutputAgent) PrintCommandResult ¶
func (a *OutputAgent) PrintCommandResult(report *CommandReport)
PrintCommandResult prints the result of a command execution
func (*OutputAgent) PrintError ¶
func (a *OutputAgent) PrintError(message string)
PrintError prints an error message
func (*OutputAgent) PrintInfo ¶
func (a *OutputAgent) PrintInfo(message string)
PrintInfo prints an info message
func (*OutputAgent) PrintMetrics ¶
func (a *OutputAgent) PrintMetrics(metrics *EvaluationMetrics)
PrintMetrics prints evaluation metrics
func (*OutputAgent) PrintPlan ¶
func (a *OutputAgent) PrintPlan(plan *ExecutionPlan)
PrintPlan displays the execution plan to the user
func (*OutputAgent) PrintRejectionMessage ¶
func (a *OutputAgent) PrintRejectionMessage(reason string)
PrintRejectionMessage prints a message when query is rejected
func (*OutputAgent) PrintStepCompletion ¶
func (a *OutputAgent) PrintStepCompletion(stepNum int, duration time.Duration)
PrintStepCompletion prints step completion with duration
func (*OutputAgent) PrintStepError ¶
func (a *OutputAgent) PrintStepError(stepNum int, errMsg string)
PrintStepError prints step error
func (*OutputAgent) PrintStepProgress ¶
func (a *OutputAgent) PrintStepProgress(stepNum int, step *ExecutionStep, status string)
PrintStepProgress prints progress for a step
func (*OutputAgent) PrintSuccess ¶
func (a *OutputAgent) PrintSuccess(message string)
PrintSuccess prints a success message
func (*OutputAgent) PrintWarning ¶
func (a *OutputAgent) PrintWarning(message string)
PrintWarning prints a warning message
type OutputConfig ¶
type OutputConfig struct {
NoColor bool
Verbose bool
Quiet bool
OutputFormat string // "text", "json", "yaml"
}
OutputConfig configures the OutputAgent
type PerformanceConfig ¶ added in v0.8.4
type PerformanceConfig struct {
LLMTimeout int `yaml:"llm_timeout"`
MaxConcurrentFiles int `yaml:"max_concurrent_files"`
MaxRetries int `yaml:"max_retries"`
RetryDelayMS int `yaml:"retry_delay_ms"`
}
PerformanceConfig represents performance settings
type PlanningAgent ¶
type PlanningAgent struct {
// contains filtered or unexported fields
}
PlanningAgent creates execution plans for queries
func NewPlanningAgent ¶
func NewPlanningAgent(llmClient llm.Client, mcpTools []string) *PlanningAgent
NewPlanningAgent creates a new PlanningAgent with tool names only
func NewPlanningAgentWithTools ¶
func NewPlanningAgentWithTools(llmClient llm.Client, tools []mcp.Tool) *PlanningAgent
NewPlanningAgentWithTools creates a new PlanningAgent with full tool information
type PlanningAgentConfig ¶ added in v0.8.4
type PlanningAgentConfig struct {
Enabled bool `yaml:"enabled"`
Model string `yaml:"model"`
Temperature float64 `yaml:"temperature"`
MaxTokens int `yaml:"max_tokens"`
}
PlanningAgentConfig represents planning agent configuration
type PlanningAgentInput ¶
type PlanningAgentInput struct {
FixedQuery string `json:"fixed_query"`
Intent string `json:"intent"`
}
PlanningAgentInput is input for PlanningAgent
type QueryAgent ¶
type QueryAgent struct {
// contains filtered or unexported fields
}
QueryAgent validates and normalizes user queries
func NewQueryAgent ¶
func NewQueryAgent(llmClient llm.Client) *QueryAgent
NewQueryAgent creates a new QueryAgent
func (*QueryAgent) Execute ¶
func (a *QueryAgent) Execute(ctx context.Context, input interface{}) (interface{}, error)
Execute processes the query and determines if it's weave-related
func (*QueryAgent) SetMCPTools ¶
func (a *QueryAgent) SetMCPTools(tools []string)
SetMCPTools sets the available MCP tools for validation
type QueryAgentConfig ¶ added in v0.8.4
type QueryAgentConfig struct {
Enabled bool `yaml:"enabled"`
Model string `yaml:"model"`
Temperature float64 `yaml:"temperature"`
MaxTokens int `yaml:"max_tokens"`
}
QueryAgentConfig represents query agent configuration
type QueryAgentInput ¶
type QueryAgentInput struct {
Query string `json:"query"`
}
QueryAgentInput is input for QueryAgent
type QueryAgentOutput ¶
type QueryAgentOutput struct {
IsWeaveQuery bool `json:"is_weave_query"`
FixedQuery string `json:"fixed_query"`
Intent string `json:"intent"` // "list", "create", "query", "delete", etc.
Confidence float64 `json:"confidence"`
Reason string `json:"reason"`
}
QueryAgentOutput is output from QueryAgent
type ReportAgent ¶
type ReportAgent struct {
// contains filtered or unexported fields
}
ReportAgent creates comprehensive operation reports
func NewReportAgent ¶
func NewReportAgent(outputAgent *OutputAgent, llmClient llm.Client) *ReportAgent
NewReportAgent creates a new ReportAgent
func (*ReportAgent) Execute ¶
func (a *ReportAgent) Execute(ctx context.Context, input interface{}) (interface{}, error)
Execute generates a report from the operation results
func (*ReportAgent) PrintReport ¶
func (a *ReportAgent) PrintReport(report *OperationReport)
PrintReport displays the operation report
type ReportAgentConfig ¶ added in v0.8.4
type ReportAgentConfig struct {
Enabled bool `yaml:"enabled"`
Temperature float64 `yaml:"temperature"`
MaxTokens int `yaml:"max_tokens"`
}
ReportAgentConfig represents report agent configuration
type SchemaAgent ¶ added in v0.8.4
type SchemaAgent struct {
// contains filtered or unexported fields
}
SchemaAgent analyzes documents and suggests collection schemas
func NewSchemaAgent ¶ added in v0.8.4
func NewSchemaAgent(llmClient *llm.OpenAIClient) *SchemaAgent
NewSchemaAgent creates a new schema analysis agent
func (*SchemaAgent) Execute ¶ added in v0.8.4
func (a *SchemaAgent) Execute(ctx context.Context, input interface{}) (interface{}, error)
Execute analyzes documents and suggests a schema
func (*SchemaAgent) Name ¶ added in v0.8.4
func (a *SchemaAgent) Name() string
Name returns the agent name
type SchemaAgentConfig ¶ added in v0.8.4
type SchemaAgentConfig struct {
Enabled bool `yaml:"enabled"`
Model string `yaml:"model"`
Temperature float64 `yaml:"temperature"`
MaxTokens int `yaml:"max_tokens"`
MaxSamples int `yaml:"max_samples"`
DefaultVectorDimensions int `yaml:"default_vector_dimensions"`
MinConfidence float64 `yaml:"min_confidence"`
WarnBelowConfidence float64 `yaml:"warn_below_confidence"`
}
SchemaAgentConfig represents schema agent configuration
type SchemaAnalysisInput ¶ added in v0.8.4
type SchemaAnalysisInput struct {
SampleFiles []string // Paths to sample documents
CollectionName string // Target collection name
Requirements string // User requirements (optional)
VDBType string // Target VDB type
MaxSamples int // Max files to analyze (default: 50)
}
SchemaAnalysisInput represents input for schema analysis
type SchemaAnalysisOutput ¶ added in v0.8.4
type SchemaAnalysisOutput struct {
Schema SchemaConfig `json:"schema"`
Reasoning string `json:"reasoning"`
FieldAnalysis []FieldSuggestion `json:"field_analysis"`
Confidence float64 `json:"confidence"`
Warnings []string `json:"warnings"`
Alternatives []SchemaConfig `json:"alternatives,omitempty"`
ChunkingAdvice *ChunkingRecommendation `json:"chunking_advice,omitempty"`
}
SchemaAnalysisOutput represents AI-generated schema suggestion
type SchemaConfig ¶ added in v0.8.4
type SchemaConfig struct {
CollectionName string `yaml:"collection_name" json:"collection_name"`
VectorDimensions int `yaml:"vector_dimensions" json:"vector_dimensions"`
SimilarityMetric string `yaml:"similarity_metric" json:"similarity_metric"`
Fields []FieldConfig `yaml:"fields" json:"fields"`
Indexes []IndexConfig `yaml:"indexes" json:"indexes"`
Metadata map[string]interface{} `yaml:"metadata,omitempty" json:"metadata,omitempty"`
}
SchemaConfig represents a complete schema configuration
type WeaveAgent ¶
type WeaveAgent struct {
// contains filtered or unexported fields
}
WeaveAgent executes weave-cli commands via MCP
func NewWeaveAgent ¶
func NewWeaveAgent(mcpClient *mcp.Client) *WeaveAgent
NewWeaveAgent creates a new WeaveAgent
func (*WeaveAgent) Execute ¶
func (a *WeaveAgent) Execute(ctx context.Context, input interface{}) (interface{}, error)
Execute executes a weave command via MCP
func (*WeaveAgent) InferMissingArguments ¶
func (a *WeaveAgent) InferMissingArguments(tool string, args map[string]interface{}, context map[string]interface{}) map[string]interface{}
InferMissingArguments attempts to infer missing arguments from context
func (*WeaveAgent) SetVerbose ¶ added in v0.3.1
func (a *WeaveAgent) SetVerbose(verbose bool)
SetVerbose sets verbose mode for debug logging
func (*WeaveAgent) ValidateArguments ¶
func (a *WeaveAgent) ValidateArguments(tool string, args map[string]interface{}) error
ValidateArguments validates that required arguments are present