Build a semantic layer for agentic AI with EDB Postgres AI and Amazon Bedrock AgentCore
Machine Learning Blog
This article demonstrates how to build a semantic layer for agentic AI using EDB Postgres AI and Amazon Bedrock AgentCore, enabling agents to answer business questions from live data with governed access.
- Create a semantic knowledge base (SemKB) inside Postgres using COMMENT ON statements and foreign keys to define business meaning alongside data
- Expose the AIDB tool catalog to external agents through an MCP endpoint fronted by an Application Load Balancer and registered with AgentCore Gateway
- Enforce access control using Postgres roles, column-level GRANT statements, and row-level security policies that apply to all agents uniformly
- Capture OpenTelemetry traces for every SQL execution as queryable rows in the aidb_otel schema for audit and observability
- Define recurring questions as semantic aliases and business terms as views with comments to improve agent accuracy and consistency
- Route requests from Cognito-authenticated users through AgentCore Gateway to the semantic layer with identity propagation via HTTP Basic auth
This architecture unifies the semantic layer, data, and governance in a single Postgres database, eliminating separate catalog systems and enabling reliable agentic analytics with built-in audit trails.
The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.
Related articles
2026
2026
2026
2026
The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.