Pular para o conteúdo

Connection

Este gerador é usado para conectar projetos entre si, como sites chamando APIs. Basta selecionar o projeto de origem (por exemplo, o projeto que chamará sua API) e o projeto de destino (por exemplo, seu projeto de API), e este gerador cuidará da integração dos dois.

Terminal window
pnpm nx g @aws/nx-plugin:connection
Você também pode realizar uma execução simulada para ver quais arquivos seriam alterados
Terminal window
pnpm nx g @aws/nx-plugin:connection --dry-run
ParâmetroTipoPadrãoDescrição
sourceProject Obrigatóriostring-O projeto de origem
targetProject Obrigatóriostring-O projeto de destino para conectar
sourceComponent string-O componente de origem para conectar (nome do componente, caminho relativo à raiz do projeto de origem, ou id do gerador). Use '.' para selecionar explicitamente o projeto como origem.
targetComponent string-O componente de destino para conectar (nome do componente, caminho relativo à raiz do projeto de destino, ou id do gerador). Use '.' para selecionar explicitamente o projeto como destino.
preferInstallDependencies booleantrueSe deve preferir instalar dependências após a execução do gerador. Defina como false para adiar a instalação ao executar múltiplos geradores em lote (uma instalação ainda é executada se necessário para que os geradores subsequentes possam calcular o grafo de projetos Nx); instale uma vez no final.

O gerador Connection suporta as seguintes conexões:

tRPC
React to tRPCCall a tRPC API from a React website
FastAPI
React to FastAPICall a Python FastAPI from a React website
Smithy
React to Smithy APICall a Smithy API from a React website
Strands AgentsPython
React to Python AgentCall a Python Agent from a React website
Strands AgentsTypeScript
React to TypeScript AgentCall a TypeScript Agent from a React website
CopilotKit
React to AG-UI AgentCall an Agent exposing the AG-UI protocol from a React website via CopilotKit
Strands AgentsPythonModel Context Protocol
Python Agent to MCPConnect a Python Agent to an MCP server
Strands AgentsTypeScriptModel Context Protocol
TypeScript Agent to MCPConnect a TypeScript Agent to an MCP server
Strands AgentsPythonAgent2Agent
Python Agent to A2A AgentConnect a Python Agent to a remote A2A agent
Strands AgentsTypeScriptAgent2Agent
TypeScript Agent to A2A AgentConnect a TypeScript Agent to a remote A2A agent
tRPCAmazon Aurora
tRPC API to Relational DatabaseConnect a tRPC API to an Aurora relational database
SmithyAmazon Aurora
Smithy API to Relational DatabaseConnect a Smithy API to an Aurora relational database
Strands AgentsTypeScriptAmazon Aurora
TypeScript Agent to Relational DatabaseConnect a TypeScript Agent to an Aurora relational database
Model Context ProtocolTypeScriptAmazon Aurora
TypeScript MCP Server to Relational DatabaseConnect a TypeScript MCP Server to an Aurora relational database
FastAPIAmazon AuroraPython
FastAPI to Python Relational DatabaseConnect a FastAPI to a Python Aurora relational database
Strands AgentsPythonAmazon AuroraPython
Python Agent to Python Relational DatabaseConnect a Python Agent to a Python Aurora relational database
Model Context ProtocolPythonAmazon AuroraPython
Python MCP Server to Python Relational DatabaseConnect a Python MCP Server to a Python Aurora relational database
tRPCAmazon DynamoDB
tRPC API to TypeScript DynamoDBConnect a tRPC API to a DynamoDB table
SmithyAmazon DynamoDB
Smithy API to TypeScript DynamoDBConnect a Smithy API to a DynamoDB table
Strands AgentsTypeScriptAmazon DynamoDB
TypeScript Agent to TypeScript DynamoDBConnect a TypeScript Agent to a DynamoDB table
Model Context ProtocolAmazon DynamoDB
MCP Server to TypeScript DynamoDBConnect a TypeScript MCP Server to a DynamoDB table
FastAPIAmazon DynamoDBPython
FastAPI to Python DynamoDBConnect a FastAPI to a DynamoDB table
Strands AgentsPythonAmazon DynamoDBPython
Python Agent to Python DynamoDBConnect a Python Agent to a DynamoDB table
Model Context ProtocolPythonAmazon DynamoDBPython
Python MCP Server to Python DynamoDBConnect a Python MCP Server to a DynamoDB table
Amazon Bedrock AgentCore GatewayModel Context Protocol
AgentCore Gateway to MCP ServerAggregate an MCP server behind an AgentCore Gateway
Amazon Bedrock AgentCore GatewayAmazon Bedrock AgentCore Gateway
AgentCore Gateway to AgentCore GatewayAggregate an AgentCore Gateway behind another AgentCore Gateway
Strands AgentsTypeScriptAmazon Bedrock AgentCore Gateway
TypeScript Agent to AgentCore GatewayConnect a TypeScript Agent to an AgentCore Gateway
Strands AgentsPythonAmazon Bedrock AgentCore Gateway
Python Agent to AgentCore GatewayConnect a Python Agent to an AgentCore Gateway
Amazon Bedrock AgentCore GatewayStrands Agents
AgentCore Gateway to AgentFront an agent with an AgentCore Gateway as a runtime target
Amazon Bedrock AgentCore Gateway
React Website to AgentCore GatewayConnect a React website to agents through an AgentCore Gateway