Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Evidence ¶
type Evidence struct {
Plan Plan
Sources []Source
AttemptedQuery []string
Failures []string
Observations []Observation
Metrics Metrics
LimitReached bool
ContextLimit int
}
Evidence is safe, bounded context collected for the model.
func (Evidence) ContextSection ¶
ContextSection serializes evidence as internal model context. It explicitly labels web content as untrusted so page text cannot become instructions.
func (Evidence) FallbackAnswer ¶
func (Evidence) NeedsRepair ¶
NeedsRepair detects a small set of objectively invalid research answers. This is deliberately narrow: it does not attempt to grade writing quality.
func (Evidence) RepairInstruction ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
Executor performs the bounded, deterministic retrieval phase before the LLM starts reasoning. Functions are injectable so behavior can be tested without network access.
func NewExecutor ¶
func NewExecutor() *Executor
type Metrics ¶
type Metrics struct {
PlannerIterations int
ToolCalls int
SearchCalls int
FetchCalls int
CacheHits int
ElapsedMS int64
}
Metrics summarizes a complete deterministic research pass.
type Observation ¶
type Observation struct {
Tool string
Status string
Summary string
ErrorCode string
ElapsedMS int64
Confidence float64
CacheHit bool
Target string
}
Observation is the compact, provider-independent result of one tool call. Raw HTML and large provider payloads are deliberately excluded.
type Plan ¶
type Plan struct {
Kind Kind
Queries []string
SeedURLs []string
MinSources int
MaxSources int
Date string
ResolvedRequest string
ResponseLanguage string
}
Plan is the code-owned contract for one research pass.
type Protocol ¶
type Protocol struct {
MaxSearches int
MaxFetches int
MaxPlannerIterations int
MaxExecutionTime time.Duration
SearchCacheTTL time.Duration
FetchCacheTTL time.Duration
MaxContextChars int
SearchInterval time.Duration
FetchInterval time.Duration
PerDomainInterval time.Duration
MaxFetchRetries int
RetryBackoff time.Duration
}
Protocol defines the deterministic limits around the model-independent research phase. The zero value is normalized to DefaultProtocol.
func DefaultProtocol ¶
func DefaultProtocol() Protocol
DefaultProtocol implements Agent Protocol v1.0 limits.