package
Version:
v1.4.0
Opens a new window with list of versions in this module.
Published: Oct 31, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package search defines external web search and its Agent tool adapter.
Tool adapts s for Agent calls. maxResults bounds model-selected limits.
Search results are untrusted content, never application instructions.
type Request struct {
Query string `json:"query"`
Limit int `json:"limit,omitempty"`
}
Request describes a web search. Limits are provider specific.
Validate rejects empty queries and negative limits.
type Response struct {
Results []Result `json:"results"`
RequestID string `json:"request_id,omitempty"`
}
Response preserves source attribution and the provider request ID.
type Result struct {
Title string `json:"title"`
URL string `json:"url"`
Content string `json:"content"`
Score float64 `json:"score,omitempty"`
}
Result is an external source. Content is untrusted source material.
Searcher searches external sources without fetching result URLs.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.