AI Skill Hub 推荐使用:pg_sage 是一款优质的Agent工作流。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的Agent工作流解决方案,这是一个值得深入了解的选择。
pg_sage:开源AI工作流,监控、分析和优化PostgreSQL 14-1,提高数据库性能和安全性。
pg_sage 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
pg_sage:开源AI工作流,监控、分析和优化PostgreSQL 14-1,提高数据库性能和安全性。
pg_sage 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:go install(推荐) go install github.com/jasonmassie01/pg_sage@latest # 方式二:从源码编译 git clone https://github.com/jasonmassie01/pg_sage cd pg_sage go build -o pg_sage . # 方式三:下载预编译二进制 # 访问 Releases 页面下载对应平台二进制文件 # https://github.com/jasonmassie01/pg_sage/releases
# 查看帮助 pg_sage --help # 基本运行 pg_sage [options] <input> # 详细使用说明请查阅文档 # https://github.com/jasonmassie01/pg_sage
# pg_sage 配置说明 # 查看配置选项 pg_sage --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export PG_SAGE_CONFIG="/path/to/config.yml"
Agentic Postgres DBA. No extension required.
| Area | What You Get |
|---|---|
| **Cases Work Queue** | Findings, incidents, migration risks, and action history are projected into ranked DBA cases with why-now context and next actions |
| **Incident Playbooks** | Runaway queries, lock blockers, connection exhaustion, WAL/replication risk, and sequence exhaustion become typed diagnostics or reviewed action scripts |
| **Vacuum/Bloat/Freeze Autopilot** | Table bloat, dead tuples, XID runway, freeze blockers, and per-table autovacuum tuning produce guarded candidates with verification plans |
| **Query Tuning Beyond Hints** | Query rewrites, broken-hint retirement, CREATE STATISTICS, parameterization, and repeated role-level work_mem patterns become reviewable actions with verification steps |
| **Provider Capability Adapters** | Cloud SQL, AlloyDB, RDS, Aurora, and self-managed Postgres expose provider-specific extension paths, log access, limitations, and action readiness |
| **Agent DB Deployments** | Provision local agent schemas/databases, run gated cloud provisioning for RDS/Cloud SQL/Lakebase, track pings, cost, backups, cleanup, blueprints, Terraform, and agent-facing query recommendations |
| **DDL Safety + PR/CI Output** | Migration-risk cases include lock/rewrite/live-risk preflight, guarded migration SQL, rollback or forward-fix guidance, verification SQL, and PR-ready metadata |
| **Rules Engine** | 20+ deterministic checks: duplicate/unused/missing indexes, slow queries, regressions, seq scans, vacuum & bloat, dead tuples, sequence exhaustion, replication lag, security audit, config drift |
| **Index Optimizer** | LLM-powered recommendations validated through 8 checks + HypoPG cost estimation, confidence scored 0.0--1.0 |
| **Config Advisors** | 6 LLM advisors: vacuum tuning, WAL/checkpoint, connections, memory, query rewrite, bloat remediation |
| **Health Briefings** | Periodic LLM-generated summaries of database state; interactive diagnose via ReAct loop |
| **Trust-Ramped Executor** | Observation -> Advisory -> Autonomous. Typed actions carry risk tier, guardrails, expiration, rollback/mitigation, and verification state. HIGH-risk actions always require approval. |
| **Shadow Mode** | Shows avoided toil and proof rows for actions pg_sage would have handled under auto-safe policy before teams turn on autonomous execution |
| **Fleet Mode** | Monitor N databases from one binary with per-database trust levels, token budgets, and health scores |
| **Per-Query Tuner** | EXPLAIN plan analysis with pg_hint_plan directives for disk sorts, hash spills, bad joins, missed index scans |
| **Workload Forecaster** | Predicts disk growth, connection saturation, cache pressure, sequence exhaustion, query volume spikes, checkpoint pressure |
| **Alerting** | Slack, PagerDuty, and webhook channels with per-severity routing, cooldown, and quiet hours |
| **Dashboard & API** | React SPA + REST API embedded in the binary -- Overview, Cases, Actions, Fleet, Settings, authenticated by default |
| **Prometheus** | Standard /metrics endpoint with findings, collector, LLM, executor, and database size gauges |
docker run --name pg_sage \ -e SAGE_DATABASE_URL="postgres://sage_agent:pw@host:5432/mydb" \ -p 8080:8080 -p 9187:9187 ghcr.io/jasonmassie01/pg_sage:latest
Dashboard at `http://localhost:8080` -- API and Prometheus metrics at `:8080/api/v1/` and `:9187/metrics`.
On first start, pg_sage creates `admin@pg-sage.local` and prints a one-time
initial admin password to stderr. The dashboard and JSON API use the
`sage_session` login cookie; unauthenticated API calls return `401`.
For Docker, retrieve the password with:
bash docker logs pg_sage 2>&1 | grep 'INITIAL ADMIN PASSWORD' ```
Requires Go 1.24+ and Node.js 20+. See docs/installation.md for details.
cd sidecar
cd web && npm ci && npm run build && cd ..
go build -o pg_sage ./cmd/pg_sage_sidecar/
```bash
pg_sage是一个开源的AI工作流,使用Go语言编写,提供了监控、分析和优化PostgreSQL 14-1的功能,适合数据库管理员和开发者使用,评分7.5分,推荐使用。
该工具使用 AGPL-3.0 协议,商用场景请仔细阅读协议条款,必要时咨询法律意见。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
⚠️ AGPL 3.0 — 最严格的 Copyleft,网络服务端使用也需开源,SaaS 使用受限。
总体来看,pg_sage 是一款质量良好的Agent工作流,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | pg_sage |
| 原始描述 | 开源AI工作流:An Agentic PostgreSQL DBA— monitors, analyzes, and optimizes any PostgreSQL 14-1。⭐11 · Go |
| Topics | workflowai-agentalloydbauroracloud-sqldatabase-monitoringgo |
| GitHub | https://github.com/jasonmassie01/pg_sage |
| License | AGPL-3.0 |
| 语言 | Go |
收录时间:2026-06-13 · 更新时间:2026-06-13 · License:AGPL-3.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端