Generator này được sử dụng để kết nối các dự án với nhau, chẳng hạn như các trang web gọi API. Chỉ cần chọn dự án nguồn (ví dụ: dự án sẽ gọi API của bạn) và dự án đích (ví dụ: dự án API của bạn), và generator này sẽ xử lý việc tích hợp cả hai.
Tùy chọn của generator5 tùy chọn
sourceProjectBắt buộcstringDự án nguồn
targetProjectBắt buộcstringDự án đích để kết nối tới
sourceComponentstringComponent nguồn để kết nối từ đó (tên component, đường dẫn tương đối so với thư mục gốc của dự án nguồn, hoặc id của generator). Sử dụng '.' để chọn rõ ràng dự án làm nguồn.
targetComponentstringComponent đích để kết nối tới (tên component, đường dẫn tương đối so với thư mục gốc của dự án đích, hoặc id của generator). Sử dụng '.' để chọn rõ ràng dự án làm đích.
preferInstallDependenciesbooleanMặc định: trueCó nên cài đặt các dependencies sau khi generator chạy hay không. Đặt thành false để trì hoãn việc cài đặt khi chạy nhiều generator liên tiếp (việc cài đặt vẫn sẽ chạy nếu cần thiết để các generator tiếp theo có thể tính toán Nx project graph); cài đặt một lần vào cuối.
Generator Connection hỗ trợ các kết nối sau:
React to tRPCCall a tRPC API from a React website React to FastAPICall a Python FastAPI from a React website React to Smithy APICall a Smithy API from a React website React to Python AgentCall a Python Agent from a React website React to TypeScript AgentCall a TypeScript Agent from a React website React to AG-UI AgentCall an Agent exposing the AG-UI protocol from a React website via CopilotKit Python Agent to MCPConnect a Python Agent to an MCP server TypeScript Agent to MCPConnect a TypeScript Agent to an MCP server Python Agent to A2A AgentConnect a Python Agent to a remote A2A agent TypeScript Agent to A2A AgentConnect a TypeScript Agent to a remote A2A agent tRPC API to Relational DatabaseConnect a tRPC API to an Aurora relational database Smithy API to Relational DatabaseConnect a Smithy API to an Aurora relational database TypeScript Agent to Relational DatabaseConnect a TypeScript Agent to an Aurora relational database TypeScript MCP Server to Relational DatabaseConnect a TypeScript MCP Server to an Aurora relational database FastAPI to Python Relational DatabaseConnect a FastAPI to a Python Aurora relational database Python Agent to Python Relational DatabaseConnect a Python Agent to a Python Aurora relational database Python MCP Server to Python Relational DatabaseConnect a Python MCP Server to a Python Aurora relational database tRPC API to TypeScript DynamoDBConnect a tRPC API to a DynamoDB table Smithy API to TypeScript DynamoDBConnect a Smithy API to a DynamoDB table TypeScript Agent to TypeScript DynamoDBConnect a TypeScript Agent to a DynamoDB table MCP Server to TypeScript DynamoDBConnect a TypeScript MCP Server to a DynamoDB table FastAPI to Python DynamoDBConnect a FastAPI to a DynamoDB table Python Agent to Python DynamoDBConnect a Python Agent to a DynamoDB table Python MCP Server to Python DynamoDBConnect a Python MCP Server to a DynamoDB table AgentCore Gateway to MCP ServerAggregate an MCP server behind an AgentCore Gateway AgentCore Gateway to AgentCore GatewayAggregate an AgentCore Gateway behind another AgentCore Gateway TypeScript Agent to AgentCore GatewayConnect a TypeScript Agent to an AgentCore Gateway Python Agent to AgentCore GatewayConnect a Python Agent to an AgentCore Gateway AgentCore Gateway to AgentFront an agent with an AgentCore Gateway as a runtime target React Website to AgentCore GatewayConnect a React website to agents through an AgentCore Gateway