AI Skill Hub 推荐使用:PostgresAI 是一款优质的Agent工作流。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的Agent工作流解决方案,这是一个值得深入了解的选择。
PostgresAI 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
PostgresAI 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install postgresai
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install postgresai
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/postgres-ai/postgresai
cd postgresai
pip install -e .
# 验证安装
python -c "import postgresai; print('安装成功')"
# 命令行使用
postgresai --help
# 基本用法
postgresai input_file -o output_file
# Python 代码中调用
import postgresai
# 示例
result = postgresai.process("input")
print(result)
# postgresai 配置文件示例(config.yml) app: name: "postgresai" debug: false log_level: "INFO" # 运行时指定配置文件 postgresai --config config.yml # 或通过环境变量配置 export POSTGRESAI_API_KEY="your-key" export POSTGRESAI_OUTPUT_DIR="./output"
postgres_ai monitoring is developed by PostgresAI, bringing years of Postgres expertise into automated monitoring and analysis tools. We provide enterprise consulting and advanced Postgres solutions for fast-growing companies.
| Component | Purpose |
|---|---|
| **Express checkup** | Instant health checks — no setup needed |
| **Grafana dashboards** | 13+ expert views: Node Overview, Query Analysis, Wait Events, Indexes, Tables, Replication, and more |
| **Scheduled reports** | 45+ metrics collected continuously via pgwatch |
| **Metrics collection** | pgwatch v3 + Victoria Metrics |
| **AI-ready output** | Structured JSON for Claude, GPT, and other agents |
| **Claude Code plugin** | Slash commands for health checks in your IDE |
| **MCP server** | Work with Issues from [console.postgres.ai](https://console.postgres.ai) in AI coding tools |
For checkup (express mode): - Node.js 18+ (includes npm/npx) - Network access to PostgreSQL 14-18
For full monitoring stack: - Linux machine with Docker - pg_stat_statements extension enabled
postgresai mon update-config
npx postgresai prepare-db postgresql://admin@host:5432/dbname # Create monitoring role with minimal permissions npx postgresai mon local-install --api-key=YOUR_TOKEN --db-url="postgresql://..." ```
Get your API key at console.postgres.ai — or use the fully managed version there.
npx postgresai mcp install ```
<details> <summary>See demo</summary> <div align="center"> <img src="assets/demo-mcp.gif" alt="MCP install demo" width="700"> </div> </details>
This enables AI agents to work with Issues and Action Items from console.postgres.ai directly within your IDE.
The simplest approach is to re-run local-install, which updates the image tag and pulls new images:
postgresai mon local-install -y
This will: - Update the PGAI_TAG in .env (located in your monitoring directory, typically ~/.postgres_ai/ or your current working directory) to match the new CLI version - Pull the latest Docker images - Start the services with the new images
Note: The.envfile contains configuration for the monitoring stack, includingPGAI_TAG(the Docker image version tag),REPLICATOR_PASSWORD(generated password for the demo standby replication user),VM_AUTH_USERNAME,VM_AUTH_PASSWORD, and optionallyGF_SECURITY_ADMIN_PASSWORD(Grafana admin password) andPGAI_REGISTRY(custom Docker registry).postgresai mon local-installpreserves existingREPLICATOR_PASSWORDandVM_AUTH_*values or generates new ones when they are missing; Docker Compose requires these values and does not use known default passwords.
In-place upgrade note: Newer stack versions can require additional.envkeys (e.g.,VM_AUTH_USERNAME/VM_AUTH_PASSWORDwere added in 0.15 for VictoriaMetrics basic auth). Bothpostgresai mon local-install -yandpostgresai mon updateperform a purely-additive.envmigration on every run: existing values are preserved verbatim, and any newly-required keys are appended with safe random defaults. If you rundocker composedirectly and maintain.envyourself, addVM_AUTH_USERNAME=vmauthand a non-emptyVM_AUTH_PASSWORDbefore upgrading, or runpostgresai mon update-configonce to have the CLI fill them in for you. To rotate the VictoriaMetrics auth password, runVM_AUTH_PASSWORD="$(openssl rand -base64 18)" ./scripts/rotate-vm-auth.shfrom the monitoring directory; the script updates.envand recreatessink-prometheusplusgrafanatogether so datasource provisioning cannot reinsert stale credentials on restart.
Alternative: Manual upgrade
If you prefer more control:
```bash
Deploy postgres_ai monitoring to Kubernetes using helm:
```bash
helm install postgres-ai-monitoring ./postgres_ai_helm
curl -LO https://gitlab.com/postgres-ai/postgresai/-/releases/helm-v<VERSION>/downloads/postgres-ai-monitoring-chart.tgz helm install postgres-ai-monitoring postgres-ai-monitoring-chart.tgz
helm install postgres-ai-monitoring ./postgres_ai_helm -f custom-values.yaml ```
Install dev dependencies (includes pytest, pytest-postgresql, psycopg, etc.):
python3 -m pip install -r reporter/requirements-dev.txt
For developers:
postgresai mon local-install --demo Get a complete monitoring setup with demo data in under 2 minutes.
For production: ```bash postgresai mon local-install --api-key=your_key
npx postgresai mon local-install --demo
postgresai --version # check your CLI version
```bash
Install from the marketplace:
claude plugin marketplace add postgres-ai/postgresai
claude plugin install pgai@postgresai
Work with Issues from console.postgres.ai:
/pgai:issues
<details> <summary>See demo</summary> <div align="center"> <img src="assets/demo-claude-code.gif" alt="Claude Code plugin demo" width="700"> </div> </details>
postgresai checkup --check-id H002 → finds unused indexesDROP INDEX or creates PR| Check ID | Title |
|---|---|
| D004 | pg_stat_statements and pg_stat_kcache settings |
高质量的Postgres可观测性平台,集成AI能力
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
总体来看,PostgresAI 是一款质量良好的Agent工作流,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | postgresai |
| 原始描述 | 开源AI工作流:postgresai – Postgres observability built for humans and AI agents。⭐123 · Python |
| Topics | PostgresAI工作流 |
| GitHub | https://github.com/postgres-ai/postgresai |
| License | Apache-2.0 |
| 语言 | Python |
收录时间:2026-05-25 · 更新时间:2026-05-26 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端