Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvancedRunner ¶ added in v0.1.4
type AdvancedRunner interface {
Runner
ExecuteWithOptions(context.Context, Plan, ExecuteOptions) (Evidence, error)
}
AdvancedRunner is the optional V3 contract. Dispatcher uses it when model advice or live research progress is enabled, while older Runner implementations continue to work unchanged.
type AgentConfig ¶ added in v0.1.4
type AgentConfig struct {
Protocol Protocol
CacheDir string
Providers []string
GitHubToken string
Resilience searchsystem.ResilienceConfig
}
type AgentExecutor ¶ added in v0.1.4
type AgentExecutor struct {
// contains filtered or unexported fields
}
AgentExecutor adapts the layered Research Agent back to the existing dispatcher contract.
func NewResearchAgent ¶ added in v0.1.4
func NewResearchAgent() *AgentExecutor
func NewResearchAgentWithConfig ¶ added in v0.1.4
func NewResearchAgentWithConfig(config AgentConfig) *AgentExecutor
func (*AgentExecutor) ExecuteWithOptions ¶ added in v0.1.4
func (e *AgentExecutor) ExecuteWithOptions(ctx context.Context, plan Plan, options ExecuteOptions) (Evidence, error)
type Contradiction ¶ added in v0.1.4
type Evidence ¶
type Evidence struct {
Plan Plan
Sources []Source
Claims []Claim
Contradictions []Contradiction
Gaps []ResearchGap
AttemptedQuery []string
Failures []string
Observations []Observation
Metrics Metrics
LimitReached bool
ContextLimit int
StopReason string
Confidence float64
}
Evidence is the bounded, structured research result exposed to Dispatcher.
func (Evidence) ContextSection ¶
ContextSection serializes ranked evidence as model context. Page text remains explicitly untrusted and cannot override system instructions.
func (Evidence) FallbackAnswer ¶
func (Evidence) NeedsRepair ¶
NeedsRepair detects narrow, objectively invalid research answers.
func (Evidence) RepairInstruction ¶
type ExecuteOptions ¶ added in v0.1.4
type Metrics ¶
type Metrics struct {
PlannerIterations int
ToolCalls int
SearchCalls int
FetchCalls int
CacheHits int
AdvisorCalls int
PromptTokens int
CompletionTokens int
TotalTokens 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
ResearchGoal string
Constraints []string
ResponseLanguage string
}
Plan is the code-owned contract for one research pass.
type Protocol ¶
type Protocol struct {
MaxSearches int
MaxFetches int
MaxResearchRounds int
ResultsPerSearch int
MaxPlannerIterations int
MaxExecutionTime time.Duration
SearchCacheTTL time.Duration
FetchCacheTTL time.Duration
ResearchCacheTTL time.Duration
NewsCacheTTL 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.
type ResearchGap ¶ added in v0.1.4
type ValuablePage ¶ added in v0.1.4
type ValuablePage = decision.ValuablePage
Directories
¶
| Path | Synopsis |
|---|---|
|
Package decision implements the research decision layer.
|
Package decision implements the research decision layer. |
|
Package evidence turns retrieved documents into ranked, attributable facts.
|
Package evidence turns retrieved documents into ranked, attributable facts. |
|
Package searchsystem implements the capability layer of the research stack.
|
Package searchsystem implements the capability layer of the research stack. |