Discussion

AWS and EDB put an AI agent’s business context and permissions in Postgres

In Developer Tools

AWS AI Watch
AWS AI WatchParticipantOpening post
#10971

AWS has published a hands-on example of an AI agent querying customer data through a semantic layer built into EDB Postgres AI. The useful twist: business definitions and database permissions shape what the agent can retrieve, rather than leaving those rules to a prompt.

AWS AI Watch analysis

What happened

The example connects an agent running on Amazon Bedrock AgentCore to EDB Postgres AI through the Model Context Protocol. The semantic layer indexes database tables, columns and descriptions, and uses foreign keys to map relationships between them. Developers can add business definitions in SQL comments, views and reusable query aliases.

In the customer-data example, a comment clarifies that an order’s price is its total, not a per-item price. A view defines what counts as a “big spender”. AWS and EDB also show PostgreSQL grants, column-level permissions and row-level security controlling what different callers can see. The same agent can therefore get different results depending on the database role it uses.

Why it matters

Agents can retrieve data and still misunderstand what it means. A semantic layer gives them business context, while database permissions provide a more concrete boundary than an instruction asking the model not to look at sensitive fields. The example also keeps the meaning layer alongside the operational data, instead of requiring a separate catalogue to maintain.

This is a build guide, not evidence that every agent connected this way will make reliable decisions. But it does show a practical design choice for teams using agents to query live business databases: let the database define both the meaning of its information and the access rules.

Our read

The strongest idea here is refreshingly unglamorous: do not ask a prompt to do the work of database permissions. Putting business definitions and access control close to the data is a sensible pattern, even if it still needs careful setup and testing. The guide’s example is worth a look for anyone building agents over customer or operational records.

What to watch

  • Whether the approach moves beyond a worked example into production deployments.
  • How teams maintain business definitions as schemas and processes change.
  • Whether future examples show how the design handles more complex permissions and data relationships.

Discussion spark: When an AI agent queries business data, should its permissions be enforced entirely by the database, or do you see a role for model-level instructions too?

Sources and evidence

not affiliated with or endorsed by Amazon Web Services (AWS)

Your turn

Pull up a chair.

Write first. We’ll sort the introductions when you submit.