跳转到内容

Connection

此生成器用于将项目连接在一起,例如网站调用 API。只需选择源项目(例如将调用您的 API 的项目)和目标项目(例如您的 API 项目),此生成器将处理两者的集成。

Terminal window
pnpm nx g @aws/nx-plugin:connection
您还可以执行试运行以查看哪些文件会被更改
Terminal window
pnpm nx g @aws/nx-plugin:connection --dry-run
参数类型默认值描述
sourceProject 必需string-源项目
targetProject 必需string-要连接到的目标项目
sourceComponent string-要从其连接的源组件(组件名称、相对于源项目根目录的路径或生成器 ID)。使用 '.' 显式选择项目作为源。
targetComponent string-要连接到的目标组件(组件名称、相对于目标项目根目录的路径或生成器 ID)。使用 '.' 显式选择项目作为目标。
preferInstallDependencies booleantrue是否在生成器运行后优先安装依赖项。设置为 false 可在批量运行多个生成器时延迟安装(如果后续生成器需要计算 Nx 项目图,仍会运行安装);在最后统一安装一次。

Connection 生成器支持以下连接:

tRPC
React to tRPC从 React 网站调用 tRPC API
FastAPI
React to FastAPI从 React 网站调用 Python FastAPI
Smithy
React to Smithy API从 React 网站调用 Smithy API
Strands AgentsPython
React to Python Agent从 React 网站调用 Python Agent
Strands AgentsTypeScript
React to TypeScript Agent从 React 网站调用 TypeScript Agent
CopilotKit
React to AG-UI Agent通过 CopilotKit 从 React 网站调用公开 AG-UI 协议的 Agent
Strands AgentsPythonModel Context Protocol
Python Agent to MCP将 Python Agent 连接到 MCP 服务器
Strands AgentsTypeScriptModel Context Protocol
TypeScript Agent to MCP将 TypeScript Agent 连接到 MCP 服务器
Strands AgentsPythonAgent2Agent
Python Agent to A2A Agent将 Python Agent 连接到远程 A2A agent
Strands AgentsTypeScriptAgent2Agent
TypeScript Agent to A2A Agent将 TypeScript Agent 连接到远程 A2A agent
tRPCAmazon Aurora
tRPC API to Relational Database将 tRPC API 连接到 Aurora 关系数据库
SmithyAmazon Aurora
Smithy API to Relational Database将 Smithy API 连接到 Aurora 关系数据库
Strands AgentsTypeScriptAmazon Aurora
TypeScript Agent to Relational Database将 TypeScript Agent 连接到 Aurora 关系数据库
Model Context ProtocolTypeScriptAmazon Aurora
TypeScript MCP Server to Relational Database将 TypeScript MCP Server 连接到 Aurora 关系数据库
FastAPIAmazon AuroraPython
FastAPI to Python Relational Database将 FastAPI 连接到 Python Aurora 关系数据库
Strands AgentsPythonAmazon AuroraPython
Python Agent to Python Relational Database将 Python Agent 连接到 Python Aurora 关系数据库
Model Context ProtocolPythonAmazon AuroraPython
Python MCP Server to Python Relational Database将 Python MCP Server 连接到 Python Aurora 关系数据库
tRPCAmazon DynamoDB
tRPC API to TypeScript DynamoDB将 tRPC API 连接到 DynamoDB 表
SmithyAmazon DynamoDB
Smithy API to TypeScript DynamoDB将 Smithy API 连接到 DynamoDB 表
Strands AgentsTypeScriptAmazon DynamoDB
TypeScript Agent to TypeScript DynamoDB将 TypeScript Agent 连接到 DynamoDB 表
Model Context ProtocolAmazon DynamoDB
MCP Server to TypeScript DynamoDB将 TypeScript MCP Server 连接到 DynamoDB 表
FastAPIAmazon DynamoDBPython
FastAPI to Python DynamoDB将 FastAPI 连接到 DynamoDB 表
Strands AgentsPythonAmazon DynamoDBPython
Python Agent to Python DynamoDB将 Python Agent 连接到 DynamoDB 表
Model Context ProtocolPythonAmazon DynamoDBPython
Python MCP Server to Python DynamoDB将 Python MCP Server 连接到 DynamoDB 表
Amazon Bedrock AgentCore GatewayModel Context Protocol
AgentCore Gateway to MCP Server在 AgentCore Gateway 后面聚合 MCP 服务器
Amazon Bedrock AgentCore GatewayAmazon Bedrock AgentCore Gateway
AgentCore Gateway to AgentCore Gateway在另一个 AgentCore Gateway 后面聚合 AgentCore Gateway
Strands AgentsTypeScriptAmazon Bedrock AgentCore Gateway
TypeScript Agent to AgentCore Gateway将 TypeScript Agent 连接到 AgentCore Gateway
Strands AgentsPythonAmazon Bedrock AgentCore Gateway
Python Agent to AgentCore Gateway将 Python Agent 连接到 AgentCore Gateway
Amazon Bedrock AgentCore GatewayStrands Agents
AgentCore Gateway to Agent使用 AgentCore Gateway 作为运行时目标为 agent 提供前端
Amazon Bedrock AgentCore Gateway
React Website to AgentCore Gateway通过 AgentCore Gateway 将 React 网站连接到 agents