v0.0.3: add built-in web tools

Add no-key web_search and web_fetch tools.
Fetch pages with net/http and parse HTML content.
Document built-in web capabilities.
This commit is contained in:
loveuer
2026-06-23 09:59:24 +08:00
parent 86f5ca4aef
commit 8dbcb1147f
7 changed files with 747 additions and 3 deletions
+2
View File
@@ -60,6 +60,8 @@ func run() error {
} else {
registry = tools.ReadOnlyBuiltins(cfg.Agent.WorkingDir)
}
registry.Register(tools.NewBuiltinSearchTool(http.DefaultClient))
registry.Register(tools.NewBuiltinFetchTool(http.DefaultClient))
systemPrompt := strings.TrimSpace(cfg.Agent.SystemPrompt + "\n\n" + tools.AgentInstructions(cfg.Agent.WorkingDir, *yolo))
assistant := agent.New(agent.Options{