Building a Semantic Layer for Agentic AI Using EDB Postgres AI and Amazon Bedrock AgentCore
AI assistants · Enterprise AI
AWS demonstrates how to build an in-database semantic layer for agentic AI using EDB Postgres AI and Amazon Bedrock AgentCore. By leveraging the AIDB extension, business definitions reside directly in PostgreSQL via COMMENT statements and views, while access control is governed through native database permissions and Model Context Protocol (MCP) endpoints.
AWS outlined an architecture showing how to implement an in-database semantic layer for agentic AI by pairing EDB Postgres AI with Amazon Bedrock AgentCore. Under this pattern, the semantic layer is embedded inside the operational PostgreSQL instance via the AIDB extension, avoiding the need for an external data catalog or separate virtualization platform. Business semantics are declared alongside schema definitions using standard PostgreSQL COMMENT statements, business views, and foreign keys. External agents query the database through AIDB's Model Context Protocol (MCP) HTTP endpoint routed via an Application Load Balancer (ALB) and AgentCore Gateway, while governance is enforced at the database level using PostgreSQL roles, column-level GRANT statements, and row-level security.
Key takeaways
- EDB Postgres AI embeds the semantic layer inside PostgreSQL through the AIDB extension, generating join paths from foreign keys and business meaning from COMMENT statements.
- Amazon Bedrock AgentCore connects to AIDB using the Model Context Protocol (MCP) via an Application Load Balancer, without requiring intermediate AWS Lambda code.
- Data governance and sensitive column protections are enforced natively by PostgreSQL roles, GRANT permissions, and row-level security rather than through LLM system prompts.
- AIDB records OpenTelemetry traces for every executed SQL query into a dedicated aidb_otel schema inside PostgreSQL, allowing standard SQL queries for observability.
Source:AWS Machine Learning Read the original ↗
Prepared, checked and automatically published by AI; not individually reviewed by a human.