正在打开每日关注
正在打开每日关注
零依赖直连 Postgres 线协议的 Go 客户端与只读巡检 CLI,让 Agent 安全快速地查询和诊断数据库。
Launched today: https://t.co/ajEqK3M3fI 🐘 tiny, fast Postgres client built for coding agents. → Zero dependencies → JSON-native → Safe parameterized queries → Read-only queries by default → Bounded output → Strict timeouts → Predictable errors + SQLSTATE → ~8ms one-shot Postgres calls ~2,000 lines of Go. ~4 MB static binary. ~1.7 MB compressed. No pgx. No libpq. No psql parsing. It speaks the Postgres wire protocol directly. Minimal. Fast. Agentic. https://t.co/7XTntOV8if
https://t.co/rbsinUJrsG is a tiny 5.9 MB binary 🐘 that connects directly to Postgres and tells you what’s happening in your database in 5.9 seconds. No dashboard. No telemetry stack. No separate database to run. pgbot inspect → database health pgbot queries → expensive queries pgbot indexes → risky / unused indexes pgbot ask → answers for humans and agents MCP → your coding agent can inspect Postgres directly pgbot reads your database. It doesn't write to it. Fast is nice. Safe + understandable is better. https://t.co/IGp9M3QBFh
是什么 alex shapalov 同日发布的一对 Postgres 工具:pggo 是约 2000 行 Go 写成的极简客户端库,零依赖、直连 Postgres 线协议、约 4MB 静态二进制(压缩 1.7MB),一次性查询约 8ms;pgbot 是 5.9MB 的数据库巡检 CLI/Agent 工具,提供 inspect、queries、indexes、ask 等子命令,并可通过 MCP 暴露给编码 Agent。视频演示了从 go get 到连上 Postgres 18、跑通 SELECT 1 仅需 8.2ms 的完整流程。
核心设计 pggo 刻意抛弃 pgx、libpq 和 psql 解析,直接实现线协议,并以 JSON 原生、参数化查询、默认只读、有界输出、严格超时和可预测的 SQLSTATE 错误为约束——每一条都针对 Agent 调用数据库的真实痛点:安全边界和输出可控比功能丰富更重要。pgbot 延续同一哲学:只读、不写库,向 MCP 客户端仅暴露 inspect 与 unused_indexes 两个确定性 JSON 工具,把解释与建议留给上层模型;私有环境可经本地 agent 接入,数据不出内网。
关键洞察 「确定性计算放工具侧、叙事放模型侧」是 MCP 工具设计的可复用范式;Agent 时代的基础件被重新定义为小而硬的约束集合,而非大而全的平台。
边界与风险 单人新项目,成熟度与生态待验证;自研协议实现需长期消化认证方式、类型系统与版本兼容成本;「AI DBA」式建议仍需人工核实,不能替代真正的人肉运维判断。