Skip to main content

Postgres

Postgres lets Lightflare inspect configured PostgreSQL databases and run read-only queries. It is useful when an agent or workflow needs database-backed facts without giving it write access.

Tools

ToolPurpose
postgres-list-tablesList tables in the public schema.
postgres-list-columnsInspect columns for a table.
postgres-run-queryRun a read-only SQL query.

postgres-list-tables Inputs

InputRequiredDescription
connectionNamenoConfigured connection name. Optional when only one connection is configured.

postgres-list-columns Inputs

InputRequiredDescription
connectionNamenoConfigured connection name. Optional when only one connection is configured.
tableNameyesTable to inspect.

postgres-run-query Inputs

InputRequiredDescription
connectionNamenoConfigured connection name. Optional when only one connection is configured.
sqlyesRead-only SQL query. Queries must start with SELECT or WITH.

Required Properties

VariableDescription
LIGHTFLARE_TOOLS_POSTGRES_ENABLEDSet to true.
LIGHTFLARE_TOOLS_POSTGRES_CONNECTIONS_<CONNECTION_NAME>_CONNECTION_URLJDBC connection URL for a named connection.
LIGHTFLARE_TOOLS_POSTGRES_CONNECTIONS_<CONNECTION_NAME>_USERNAMEDatabase username for the named connection.
LIGHTFLARE_TOOLS_POSTGRES_CONNECTIONS_<CONNECTION_NAME>_PASSWORDDatabase password for the named connection.

When Postgres is enabled, all three Postgres tools are available to the agent. Configure database permissions so the provided credentials only allow the access level you want Lightflare to have.