Integrations
PostgreSQL logo

PostgreSQL integration

Databases · 10 actions · Custom auth

PostgreSQL database integration for executing SQL queries, managing tables, and performing CRUD operations. Uses the asyncpg driver.

Overview

The ModuleX PostgreSQL integration lets a ModuleX agent operate PostgreSQL on your behalf — running create, update and remove actions across raw queries, rows and query with conditions — directly from a plain-English request, using your organization's own PostgreSQL credentials. No pre-built workflow is required: the agent picks the right PostgreSQL action for the task.

PostgreSQL is a databases platform. ModuleX adds the agent layer: ask for an outcome and it selects and runs the right PostgreSQL action — or, when you want a repeatable process, the composer assembles a PostgreSQL workflow for you, streaming the nodes onto the canvas as it builds.

Ask the assistant

Drive PostgreSQL in plain English

Type what you want. A ModuleX agent picks the right PostgreSQL action — or chains several — and runs it. No workflow to build.

  • INSERT a new row, returning the inserted record
    resolves tocreate_row
  • Find the row I describe and remove it
    resolves tofind_rowdelete_row
  • UPDATE rows matching a WHERE condition (returns updated rows)
    resolves toupdate_row
  • Show me the schemas that match what I describe
    resolves tolist_schemas
Use cases

What you can automate with PostgreSQL

  • Find the right row and remove it in one promptfind_rowdelete_row
  • Run a raw query from a plain-English requestexecute_raw_query
  • Pull a list of schemas for a reportlist_schemas
At a glance

PostgreSQL integration at a glance

CategoryDatabases
Actions available10
AuthenticationCustom
Uses your own credentialsYes
Works with the assistantYes
Works in the composerYes
Multi-step / tool-chainingYes
Technical referenceView docs
Integration version1.0.0
Last updatedJun 2026
Reference

All 10 PostgreSQL actions

Raw Queries1
execute_raw_query
Execute a raw SQL statement (SELECT/INSERT/UPDATE/DELETE/DDL). Use $1, $2, ... placeholders for parameterized queries.
Rows5
create_row
INSERT a new row, returning the inserted record
delete_row
DELETE rows matching a WHERE condition (returns deleted rows)
update_row
UPDATE rows matching a WHERE condition (returns updated rows)
upsert_row
INSERT … ON CONFLICT (conflict_target) DO UPDATE …
find_row
SELECT * FROM table WHERE column <op> value
Query with Conditions1
execute_query_with_condition
SELECT * FROM table WHERE <condition>
Schemas1
list_schemas
List all user-visible schemas (excludes pg_catalog etc.)
Tables2
list_tables
List all tables and views in a schema
describe_table
Return column metadata + primary keys for a table

See full parameters and response schemas in the PostgreSQL integration docs

Two ways

Two ways to use PostgreSQL in ModuleX

Ask the assistantType what you want done and a ModuleX agent picks the right PostgreSQL action and runs it — no workflow to build.
Compose a workflowNeed it to happen every time? Describe the process and the composer wires PostgreSQL into a repeatable workflow you can run on a schedule, from chat, or as an API.
Security

Connecting PostgreSQL

CustomPostgreSQL uses a custom authentication flow. ModuleX encrypts whatever credentials you supply and scopes them to your organization.

Step-by-step setup in the PostgreSQL docs

Related

Pairs well with PostgreSQL

Agents often chain PostgreSQL with these — connect them once and the agent can use all of them in a single task.

FAQ

PostgreSQL + ModuleX FAQ

A ModuleX agent can run any of PostgreSQL's 10 actions — across raw queries, rows, query with conditions and schemas — from a plain-English request, using your organization's own PostgreSQL credentials.
No. The agent selects the right PostgreSQL action from your prompt. A workflow is only needed when you want a repeatable process — and the composer builds that for you from a description.
Through a secure PostgreSQL connection; your credentials are stored encrypted and scoped to your organization.
10, spanning raw queries, rows, query with conditions and schemas.
PostgreSQL runs on your own credentials, so any PostgreSQL usage is billed by PostgreSQL directly. ModuleX meters the agent run — and if you connect your own model keys, there's no ModuleX markup on model usage.

Put PostgreSQL to work in ModuleX.

Connect PostgreSQL once with your own credentials and let your agent run all 10 actions on demand.

Last updated: Jun 2026Browse all 175 integrations →