Join our Newsletter — 33% off our NHI Course

Notifications
Clear all

PostgresFS vs SQL skills: do AI agents need a filesystem?


(@nhi-mgmt-group)
Member Moderator
Joined: 1 year ago
Posts: 18004
Topic starter  

TL;DR: A filesystem-like abstraction was competitive on simple reads, but the SQL workflow won on overall accuracy, composability, and maintenance burden because it let the agent materialize data locally and use real shell tools, according to Arize. The lesson is that locality, not interface familiarity, is the governing design choice for agent harnesses.

NHIMG editorial — based on content published by Arize: PostgresFS vs. SQL skills: should AI agents fake a filesystem?

Questions worth separating out

Q: How should security teams govern AI agents that query databases and then analyse data locally?

A: Give the agent a narrow retrieval role, materialize only the required slice of data, and keep local analysis in a separate, controlled workspace.

Q: Why does locality matter so much for AI agent risk and performance?

A: Locality matters because it lets the agent reuse data without round-tripping to the source system for every read or transformation.

Q: What do teams get wrong about virtual filesystem interfaces for agents?

A: They often assume a familiar interface is the same thing as a good execution model.

Practitioner guidance

  • Define the agent execution boundary Separate database retrieval from local analysis so the agent only receives the minimum dataset needed for the task, then works from a controlled local workspace.
  • Restrict agent database access to query-only roles Use narrowly scoped service accounts or delegated tokens for retrieval, and prevent the agent from gaining broad write or administrative permissions just to support convenience abstractions.
  • Audit every translation layer in the toolchain Review adapters that turn shell-like commands into backend calls, because each layer can obscure logging, rate limits, and the true path taken by agent requests.

What's in the full report

Arize's full analysis covers the implementation details this post intentionally leaves at the architectural level:

  • The exact benchmark setup, including the agent loop, judge model, and evaluation rubric used to compare the two approaches.
  • Question-by-question performance tables showing where each architecture won, lost, or tied on latency and accuracy.
  • The full explanation of how the PostgresFS adapter translated shell verbs into database reads and where that design introduced friction.
  • The skill workflow details that show how SQL plus local Bash handled intermediate reuse and multi-step analysis.

👉 Read Arize’s comparison of PostgresFS and SQL skills for AI agent workflows →

PostgresFS vs SQL skills: do AI agents need a filesystem?

Explore further

View Full Forum →  |  NHI Foundation Course →



   
Quote
(@mr-nhi)
Member Moderator
Joined: 3 months ago
Posts: 17593
 

Local execution boundaries matter more than surface familiarity for AI agent governance. The article shows that mimicking a filesystem can make an agent look comfortable, but it does not remove the architectural cost of every read crossing a database boundary. For identity and security teams, the lesson is that tooling ergonomics can hide access and audit complexity. The control question is not whether the agent can use familiar verbs, but whether its runtime identity is constrained to the minimum execution surface needed.

A question worth separating out:

Q: How do you decide between a SQL skill and a filesystem abstraction for an AI agent?

A: Use a SQL skill when the task needs targeted retrieval followed by iterative analysis, reuse of intermediates, or real shell tooling. Use a filesystem abstraction only when exploration is simple and read patterns are shallow. If the workflow needs branching, staging, or a second pass, the abstraction usually becomes the weaker control model.

👉 Read our full editorial: AI agents perform better with local SQL than fake filesystems



   
ReplyQuote
Share: