在 AWS 上用 AtScale 与 Amazon Bedrock AgentCore 构建面向代理式 AI 的语义层
摘要
AWS 机器学习博客发布系列教程第三篇,演示如何用 AtScale 作为语义层,在 Amazon Redshift 上建模客户 360 领域,并通过 MCP 把模型暴露给运行在 Amazon Bedrock AgentCore 上的 Strands agent。
核心要点
- AtScale 的语义模型是维度式的(维度、层级、度量),与前两篇的 RDF 三元组图(Stardog)和视图集合(Denodo)在形态上不同。
- 模型用开放、基于 YAML 的 Semantic Modeling Language(SML)编写并在 Git 中版本化;单一部署模型同时通过 SQL、XMLA 和 Model Context Protocol(MCP)三种协议暴露,使 agent 与既有 BI 工具基于同一套定义得到相同答案。
- 演示链路中的基础模型为 Amazon Bedrock 上的 Anthropic Claude Sonnet 4.6,负责规划并撰写查询;Strands agent 由 Amazon Bedrock AgentCore 托管,并通过 AgentCore Gateway 注册 AtScale 的 MCP server。
- 连接关系、度量定义以及作用于调用者的行、列级过滤器都放在语义层而不是 prompt 中;查询时的 RBAC、行级安全与 perspectives 由 AtScale 强制执行。
- 用户身份从企业身份提供商经 AgentCore Identity 传递至 AtScale,实现端到端的用户级数据权限,而不是由 agent 以超级账号代查。
原文佐证
- AtScale authors the model in the Semantic Modeling Language , an open, YAML-based specification versioned in Git, and exposes it simultaneously, from a single deployed model, over three protocols: SQL, XML for Analysis (XMLA), and the Model Context Protocol (MCP).
- The joins, metric definitions, and row and column filters that apply to the caller live inside the semantic layer rather than the prompt.
- A foundation model on Amazon Bedrock (Anthropic Claude Sonnet 4.6 for the walkthrough) plans and writes queries.
AI 洞察
这篇教程的真正信号不是 AtScale 本身,而是 MCP 正在成为语义层的“第二接口”:同一份指标定义同时服务 BI 工具与 AI agent,意味着企业治理的重心从“约束 prompt”转向“在数据层定义并强制执行口径”。一旦身份可以通过 AgentCore Identity 这类机制透传到语义层,agent 就能以终端用户权限查询,这解决了企业 agent 落地中最难的一环——权限与口径一致性。对语义层厂商而言,竞争点将从“能否建模”转向“能否以多协议、可版本化的方式被 agent 消费”,而 text-to-SQL 直接打宽表的路线会越来越难通过审计。