跳到正文

正在自动登录…

← 返回项目列表

smhanov/agentloop

代理构建

agentloop 是一个 Go 库,用于构建 LLM 代理,提供了工具调用循环、预算、钩子、技能和追踪功能。适合用 Go 开发代理的开发者。

AI 中文解读 · 根据仓库描述与 README 生成 · 2026/10/26 15:56:21 · 查看原文

值得看Go库与框架
累计 Stars
55
当前热度
1 天内 · 小火
仓库创建时间
打开 GitHub ↗

选用指南

AI 根据 README 整理 · 2026/10/26 15:56:21

使用方式

作为 Go 库使用,通过 `go get` 安装,可嵌入到 Go 程序或 CLI 中,也提供了命令行示例 `examples/ask` 用于运行代理。

查看 README 依据
agents compile with `CGO_ENABLED=0 go build` to any `GOOS`/`GOARCH` and run in about 7 MB of RAM — no Python environment, no Node sidecar, no container to babysit. Embed an agent in a CLI, a cron job, an existing Go service, or a Raspberry Pi; between model calls the loop itself is nearly free. ## Installation ```bash go get github.com/smhanov/agentloop ``` Go 1.21 or newer. The only dependency is llmhub; the search preset also wants a [serper.dev](https://serper.dev) API key at runtime (never at build time). The full API reference — every exported type, option, and hook — lives
ans, err := agent.Ask(context.Background(), "What Go version was released most recently, and when?") if err != nil { panic(err) } fmt.Println(ans.Text) for i, s := range ans.Sources { fmt.Printf("[%d] %s — %s\n", i+1, s.Title, s.URL) } fmt.Printf("%d tool calls, $%.4f\n", ans.ToolCalls, ans.Usage.Cost) } ``` `ans.Text` carries inline `[n]` citations that line up with `ans.Sources` (see [The search agent](#the-search-agent)). ## Command line The repository ships `examples/ask`, a general-purpose runner for all
部署要求

需要 Go 1.21 或更新版本,依赖 llmhub;使用搜索代理时需要 Serper API 密钥(运行时)。

查看 README 依据
agents compile with `CGO_ENABLED=0 go build` to any `GOOS`/`GOARCH` and run in about 7 MB of RAM — no Python environment, no Node sidecar, no container to babysit. Embed an agent in a CLI, a cron job, an existing Go service, or a Raspberry Pi; between model calls the loop itself is nearly free. ## Installation ```bash go get github.com/smhanov/agentloop ``` Go 1.21 or newer. The only dependency is llmhub; the search preset also wants a [serper.dev](https://serper.dev) API key at runtime (never at build time). The full API reference — every exported type, option, and hook — lives

README

正在加载 README…

收录信息

仓库创建时间
2026/10/26 00:18:50
首次达标收录
2026/10/26 15:51:25
统计更新时间
2026/10/26 17:11:22

按创建时长与累计 Stars 判断等级。首次达标收录后,即使未达当前门槛仍保留;累计 Stars 和仓库状态会定期更新。确认只有 README 及辅助文件的仓库会停止公开。

模型评估

值得看加权总分 4.0 / 5

新颖度
3.5
实用价值
4.5
成熟度
4.4
实质含量
3.7

由 Jev 模型根据仓库描述与 README 评估,2026/10/26 15:51:25 生成。评分仅供参考,不是代码、安全或许可证审查;热度等级另按创建时长与累计 Stars 计算。

仓库信息

最近推送
2026/10/26 00:19:10
许可证标识
MIT
Fork 数
5
当前状态
未归档

收录记录

按创建时长与累计 Stars 首次收录:小火
首次发现项目