@aws/nx-plugin-mcp 1.0.0-rc.21 → 1.0.0-rc.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,9 @@ description: Create an AgentCore Gateway project
4
4
  generator: agentcore-gateway
5
5
  ---
6
6
 
7
- import { FileTree } from '@astrojs/starlight/components';
7
+ import { FileTree, CardGrid } from '@astrojs/starlight/components';
8
+ import Astro from '@astrojs/react';
9
+ import ConnectionCard from '@components/connection-card.astro';
8
10
  import RunGenerator from '@components/run-generator.astro';
9
11
  import GeneratorParameters from '@components/generator-parameters.astro';
10
12
  import Infrastructure from '@components/infrastructure.astro';
@@ -232,9 +234,39 @@ The generator adds a `<name>-serve-local` target to the Gateway project, which r
232
234
 
233
235
  See the connection guide for the full local development story.
234
236
 
235
- ## Next steps
236
-
237
- - Connect an MCP server: <Link path="guides/connection/agentcore-gateway-mcp">`agentcore-gateway#mcp-connection`</Link>
238
- - Connect another Gateway: <Link path="guides/connection/agentcore-gateway-gateway">`agentcore-gateway#gateway-connection`</Link>
239
- - Connect a TypeScript Agent: <Link path="guides/connection/ts-agent-gateway">`ts#agent#gateway-connection`</Link>
240
- - Connect a Python Agent: <Link path="guides/connection/py-agent-gateway">`py#agent#gateway-connection`</Link>
237
+ ## Connections
238
+
239
+ Use the <Link path="guides/connection">`connection`</Link> generator to integrate this project with others in your workspace. The following connections involve this project:
240
+
241
+ <CardGrid>
242
+ <ConnectionCard
243
+ title="AgentCore Gateway to MCP Server"
244
+ description="Aggregate an MCP server behind an AgentCore Gateway"
245
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/agentcore-gateway-mcp`}
246
+ source="agentcore"
247
+ target="mcp"
248
+ />
249
+ <ConnectionCard
250
+ title="AgentCore Gateway to AgentCore Gateway"
251
+ description="Aggregate an AgentCore Gateway behind another AgentCore Gateway"
252
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/agentcore-gateway-gateway`}
253
+ source="agentcore"
254
+ target="agentcore"
255
+ />
256
+ <ConnectionCard
257
+ title="TypeScript Agent to AgentCore Gateway"
258
+ description="Connect a TypeScript Agent to an AgentCore Gateway"
259
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-agent-gateway`}
260
+ source="strands"
261
+ sourceBadge="typescript"
262
+ target="agentcore"
263
+ />
264
+ <ConnectionCard
265
+ title="Python Agent to AgentCore Gateway"
266
+ description="Connect a Python Agent to an AgentCore Gateway"
267
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-agent-gateway`}
268
+ source="strands"
269
+ sourceBadge="python"
270
+ target="agentcore"
271
+ />
272
+ </CardGrid>
@@ -7,7 +7,7 @@ when:
7
7
  - ts#agent
8
8
  - py#agent
9
9
  ---
10
- import { FileTree } from '@astrojs/starlight/components';
10
+ import { FileTree, Tabs, TabItem } from '@astrojs/starlight/components';
11
11
  import Link from '@components/link.astro';
12
12
  import RunGenerator from '@components/run-generator.astro';
13
13
  import GeneratorParameters from '@components/generator-parameters.astro';
@@ -22,7 +22,7 @@ The generator sets up all the necessary wiring so your agent can discover and in
22
22
 
23
23
  Before using this generator, ensure you have:
24
24
 
25
- 1. A Python project with a <Link path="guides/py-agent">Strands Agent</Link> component (any protocol)
25
+ 1. A Python project with a <Link path="guides/py-agent">Python Agent</Link> component (Strands or LangChain)
26
26
  2. A project with an Agent component generated with `--protocol=A2A` and `--auth=IAM` (either <Link path="guides/ts-agent">`ts#agent`</Link> or <Link path="guides/py-agent">`py#agent`</Link>)
27
27
  3. Both components created with `infra: agentcore`
28
28
 
@@ -50,13 +50,15 @@ The generator creates a shared `agent_connection` Python project at `packages/co
50
50
  - core
51
51
  - agentcore\_endpoints.py Framework-agnostic ARN/URL resolution
52
52
  - agentcore\_a2a\_client\_config.py Framework-agnostic A2A client config (signed `ClientConfig`)
53
- - agentcore\_a2a\_client\_strands.py Strands A2A client wrapping the config
53
+ - agentcore\_a2a\_client\_\<framework>.py A2A client wrapping the config for your agent's framework
54
54
  - auth/ Framework-agnostic SigV4 / session-forwarding `httpx.Auth`
55
55
  - app
56
- - \<target\_agent\_name>\_client\_strands.py Per-connection Strands client for each A2A agent
56
+ - \<target\_agent\_name>\_client\_\<framework>.py Per-connection A2A client for each A2A agent
57
57
 
58
58
  </FileTree>
59
59
 
60
+ The client suffix matches your agent's framework (`_strands` or `_langchain`). Both wrap the same framework-agnostic signed `ClientConfig`: the Strands client wraps a Strands `A2AAgent`, while the LangChain client drives the [a2a SDK](https://pypi.org/project/a2a-sdk/) directly.
61
+
60
62
  Additionally, the generator:
61
63
  - Transforms your agent's `agent.py` to register the remote A2A agent as a tool using `@tool`
62
64
  - Adds the `agent_connection` project as a workspace dependency of your agent project
@@ -64,17 +66,19 @@ Additionally, the generator:
64
66
 
65
67
  ## Using the Connected A2A Agent
66
68
 
67
- The generator transforms your agent's `agent.py` to wrap the remote A2A agent as a tool:
69
+ The generator transforms your agent's `agent.py` to wrap the remote A2A agent as a tool. The remote agent is registered with a `@tool`-decorated delegate — the decorator's import and the agent constructor differ by framework:
68
70
 
69
- ```python title="packages/my-project/my_module/agent/agent.py" {4,9-15,21}
71
+ <Tabs syncKey="agent-framework">
72
+ <TabItem label="Strands" _filter={{ framework: 'strands' }}>
73
+ ```python title="packages/my-project/my_module/agent/agent.py" {4,8-13,15}
70
74
  from contextlib import contextmanager
71
75
  from strands import Agent, tool
72
76
 
73
77
  from my_scope_agent_connection import RemoteAgentClientStrands
74
78
 
75
79
  @contextmanager
76
- def get_agent(session_id: str):
77
- remote_agent = RemoteAgentClientStrands.create(session_id=session_id)
80
+ def get_agent():
81
+ remote_agent = RemoteAgentClientStrands.create()
78
82
 
79
83
  @tool
80
84
  def ask_remote_agent(prompt: str) -> str:
@@ -86,10 +90,35 @@ def get_agent(session_id: str):
86
90
  tools=[ask_remote_agent],
87
91
  )
88
92
  ```
93
+ </TabItem>
94
+ <TabItem label="LangChain" _filter={{ framework: 'langchain' }}>
95
+ ```python title="packages/my-project/my_module/agent/agent.py" {4,7-12,14}
96
+ from langchain.agents import create_agent
97
+ from langchain_aws import ChatBedrockConverse
98
+ from langchain_core.tools import tool
99
+
100
+ from my_scope_agent_connection import RemoteAgentClientLangChain
101
+
102
+ def get_agent():
103
+ remote_agent = RemoteAgentClientLangChain.create()
104
+
105
+ @tool
106
+ def ask_remote_agent(prompt: str) -> str:
107
+ """Delegate a question to the remote RemoteAgent A2A agent and return its reply."""
108
+ return str(remote_agent(prompt))
109
+
110
+ return create_agent(
111
+ model=ChatBedrockConverse(model=MODEL_ID, region_name=REGION),
112
+ system_prompt="...",
113
+ tools=[ask_remote_agent],
114
+ )
115
+ ```
116
+ </TabItem>
117
+ </Tabs>
89
118
 
90
- The `session_id` parameter is plumbed through from the caller, ensuring consistency for [Bedrock AgentCore Observability](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability.html).
119
+ Both clients are directly callable, returning the remote agent's reply, and wrap an `httpx.AsyncClient` that signs requests with SigV4 when deployed to AWS and uses a plain `http://localhost:<port>/` endpoint when `SERVE_LOCAL=true`. The Strands client wraps a Strands `A2AAgent`; the LangChain client drives the a2a SDK directly.
91
120
 
92
- Under the hood, `RemoteAgentClientStrands.create(session_id=...)` returns a Strands `A2AAgent` configured with an `httpx.AsyncClient` that signs requests with SigV4 when deployed to AWS, and a plain `http://localhost:<port>/` endpoint when `SERVE_LOCAL=true`.
121
+ The AgentCore session ID is propagated to the remote agent automatically via the `X-Amzn-Bedrock-AgentCore-Runtime-Session-Id` header, regardless of framework: the agent server binds the inbound request's session into an async context, and the connection client's signed `httpx.Auth` stamps it on every outbound call ensuring consistency for [Bedrock AgentCore Observability](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability.html).
93
122
 
94
123
  ## Infrastructure
95
124
 
@@ -5,7 +5,7 @@ when:
5
5
  sourceType: py#agent
6
6
  targetType: agentcore-gateway
7
7
  ---
8
- import { FileTree } from '@astrojs/starlight/components';
8
+ import { FileTree, Tabs, TabItem } from '@astrojs/starlight/components';
9
9
  import Link from '@components/link.astro';
10
10
  import RunGenerator from '@components/run-generator.astro';
11
11
  import GeneratorParameters from '@components/generator-parameters.astro';
@@ -46,17 +46,19 @@ The generator emits shared core-gateway modules into your `agent_connection` Pyt
46
46
  - core/
47
47
  - agentcore\_endpoints.py Framework-agnostic ARN/URL resolution
48
48
  - agentcore\_gateway\_mcp\_transport.py Framework-agnostic Gateway MCP transport
49
- - agentcore\_gateway\_mcp\_client\_strands.py Strands MCP client for the deployed Gateway
49
+ - agentcore\_gateway\_mcp\_client\_\<framework>.py Gateway MCP client for your agent's framework
50
50
  - auth/ Framework-agnostic SigV4 / session-forwarding `httpx.Auth`
51
51
  - app/
52
- - \<gateway\_snake>\_client\_strands.py Per-Gateway Strands client wrapper
52
+ - \<gateway\_snake>\_client\_\<framework>.py Per-Gateway client wrapper
53
53
  - \_\_init\_\_.py Re-exports the Gateway client
54
54
 
55
55
  </FileTree>
56
56
 
57
+ The client suffix matches your agent's framework (`_strands` or `_langchain`).
58
+
57
59
  Additionally, the generator:
58
60
 
59
- - Modifies your agent's `agent.py` to import the Gateway client, enter it via a `with` block, and register its tools in `tools`
61
+ - Modifies your agent's `agent.py` to import the Gateway client and register its tools in `tools`
60
62
  - Adds `agent_connection` as a workspace dependency of the agent
61
63
  - Wires the agent's `<agent>-serve-local` target to depend on the Gateway's `<gateway>-serve-local` aggregator
62
64
 
@@ -64,6 +66,8 @@ Additionally, the generator:
64
66
 
65
67
  The generator transforms your agent's `agent.py` to use the Gateway client:
66
68
 
69
+ <Tabs syncKey="agent-framework">
70
+ <TabItem label="Strands" _filter={{ framework: 'strands' }}>
67
71
  ```python title="packages/example/example/my_agent/agent.py" {4,8,9-13}
68
72
  from contextlib import contextmanager
69
73
  from strands import Agent
@@ -82,10 +86,32 @@ def get_agent():
82
86
  )
83
87
  ```
84
88
 
85
- `MyGatewayClientStrands.create()` returns a single context-manageable client whose `list_tools_sync()` yields every tool available through the Gateway:
89
+ `MyGatewayClientStrands.create()` returns a single context-manageable `MCPClient` whose `list_tools_sync()` yields every tool available through the Gateway.
90
+ </TabItem>
91
+ <TabItem label="LangChain" _filter={{ framework: 'langchain' }}>
92
+ ```python title="packages/example/example/my_agent/agent.py" {4,8,12}
93
+ from langchain.agents import create_agent
94
+ from langchain_aws import ChatBedrockConverse
95
+
96
+ from my_scope_agent_connection import MyGatewayClientLangChain
97
+
98
+ def get_agent():
99
+ my_gateway = MyGatewayClientLangChain.create()
100
+ return create_agent(
101
+ model=ChatBedrockConverse(model=MODEL_ID, region_name=REGION),
102
+ system_prompt="...",
103
+ tools=[*my_gateway],
104
+ )
105
+ ```
106
+
107
+ `MyGatewayClientLangChain.create()` returns a list of tools loaded via [`langchain-mcp-adapters`](https://docs.langchain.com/oss/python/langchain/mcp). Each tool opens a fresh session per call, so no `with` block is needed.
108
+ </TabItem>
109
+ </Tabs>
110
+
111
+ In both cases the client behaves the same way per mode:
86
112
 
87
- - **Deployed mode** (`SERVE_LOCAL` unset): a single `MCPClient` pointed at the Gateway's MCP endpoint, SigV4-signed.
88
- - **Local mode** (`SERVE_LOCAL=true`): a plain-HTTP `MCPClient` pointed at the local gateway started by the Gateway project's `serve-local` target.
113
+ - **Deployed mode** (`SERVE_LOCAL` unset): tools pointed at the Gateway's MCP endpoint, SigV4-signed.
114
+ - **Local mode** (`SERVE_LOCAL=true`): plain-HTTP tools pointed at the local gateway started by the Gateway project's `serve-local` target.
89
115
 
90
116
  The session ID is propagated to downstream MCP servers automatically via the `X-Amzn-Bedrock-AgentCore-Runtime-Session-Id` header.
91
117
 
@@ -7,7 +7,7 @@ when:
7
7
  - ts#mcp-server
8
8
  - py#mcp-server
9
9
  ---
10
- import { FileTree } from '@astrojs/starlight/components';
10
+ import { FileTree, Tabs, TabItem } from '@astrojs/starlight/components';
11
11
  import Link from '@components/link.astro';
12
12
  import RunGenerator from '@components/run-generator.astro';
13
13
  import GeneratorParameters from '@components/generator-parameters.astro';
@@ -22,7 +22,7 @@ The generator sets up all the necessary wiring so your agent can discover and in
22
22
 
23
23
  Before using this generator, ensure you have:
24
24
 
25
- 1. A Python project with a <Link path="guides/py-agent">Strands Agent</Link> component
25
+ 1. A Python project with a <Link path="guides/py-agent">Python Agent</Link> component (Strands or LangChain)
26
26
  2. A project with an MCP server component (either <Link path="guides/ts-mcp-server">`ts#mcp-server`</Link> or <Link path="guides/py-mcp-server">`py#mcp-server`</Link>)
27
27
  3. Both components created with `infra: agentcore`
28
28
 
@@ -50,13 +50,15 @@ The generator creates a shared `agent_connection` Python project at `packages/co
50
50
  - core
51
51
  - agentcore\_endpoints.py Framework-agnostic ARN/URL resolution
52
52
  - agentcore\_mcp\_transport.py Framework-agnostic MCP transport
53
- - agentcore\_mcp\_client\_strands.py Strands MCP client wrapping the transport
53
+ - agentcore\_mcp\_client\_\<framework>.py MCP client wrapping the transport for your agent's framework
54
54
  - auth/ Framework-agnostic SigV4 / session-forwarding `httpx.Auth`
55
55
  - app
56
- - \<mcp\_server\_name>\_client\_strands.py Per-connection Strands client for each MCP server
56
+ - \<mcp\_server\_name>\_client\_\<framework>.py Per-connection client for each MCP server
57
57
 
58
58
  </FileTree>
59
59
 
60
+ The client suffix matches your agent's framework (`_strands` or `_langchain`).
61
+
60
62
  Additionally, the generator:
61
63
  - Transforms your agent's `agent.py` to import and use the MCP server's tools via a class-based client
62
64
  - Adds the `agent_connection` project as a workspace dependency of your agent project
@@ -66,15 +68,17 @@ Additionally, the generator:
66
68
 
67
69
  The generator transforms your agent's `agent.py` to use the MCP server's tools:
68
70
 
69
- ```python title="packages/my-project/my_module/agent/agent.py" {4,10-14}
71
+ <Tabs syncKey="agent-framework">
72
+ <TabItem label="Strands" _filter={{ framework: 'strands' }}>
73
+ ```python title="packages/my-project/my_module/agent/agent.py" {4,9-13}
70
74
  from contextlib import contextmanager
71
75
  from strands import Agent
72
76
 
73
77
  from my_scope_agent_connection import MyMcpServerClientStrands
74
78
 
75
79
  @contextmanager
76
- def get_agent(session_id: str):
77
- my_mcp_server = MyMcpServerClientStrands.create(session_id=session_id)
80
+ def get_agent():
81
+ my_mcp_server = MyMcpServerClientStrands.create()
78
82
  with (
79
83
  my_mcp_server,
80
84
  ):
@@ -84,7 +88,29 @@ def get_agent(session_id: str):
84
88
  )
85
89
  ```
86
90
 
87
- The `session_id` parameter is plumbed through from the caller, ensuring consistency for [Bedrock AgentCore Observability](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability.html).
91
+ The Strands client is a context manager, entered in a `with` block around the agent.
92
+ </TabItem>
93
+ <TabItem label="LangChain" _filter={{ framework: 'langchain' }}>
94
+ ```python title="packages/my-project/my_module/agent/agent.py" {4,8,13}
95
+ from langchain.agents import create_agent
96
+ from langchain_aws import ChatBedrockConverse
97
+
98
+ from my_scope_agent_connection import MyMcpServerClientLangChain
99
+
100
+ def get_agent():
101
+ my_mcp_server = MyMcpServerClientLangChain.create()
102
+ return create_agent(
103
+ model=ChatBedrockConverse(model=MODEL_ID, region_name=REGION),
104
+ system_prompt="...",
105
+ tools=[*my_mcp_server],
106
+ )
107
+ ```
108
+
109
+ The LangChain client returns a list of tools loaded via [`langchain-mcp-adapters`](https://docs.langchain.com/oss/python/langchain/mcp). Each tool opens a fresh MCP session per call, so the tools stay usable for the agent's lifetime — no `with` block is needed.
110
+ </TabItem>
111
+ </Tabs>
112
+
113
+ The AgentCore session ID is propagated to the MCP server automatically via the `X-Amzn-Bedrock-AgentCore-Runtime-Session-Id` header for both frameworks, ensuring consistency for [Bedrock AgentCore Observability](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/observability.html).
88
114
 
89
115
  ## Infrastructure
90
116
 
@@ -6,7 +6,9 @@ when:
6
6
  framework: [fastapi]
7
7
  ---
8
8
 
9
- import { FileTree, Tabs, TabItem } from '@astrojs/starlight/components';
9
+ import { FileTree, Tabs, TabItem, CardGrid } from '@astrojs/starlight/components';
10
+ import Astro from '@astrojs/react';
11
+ import ConnectionCard from '@components/connection-card.astro';
10
12
  import Link from '@components/link.astro';
11
13
  import RunGenerator from '@components/run-generator.astro';
12
14
  import GeneratorParameters from '@components/generator-parameters.astro';
@@ -719,3 +721,25 @@ This starts a local FastAPI development server with:
719
721
  ## Invoking your FastAPI
720
722
 
721
723
  To invoke your API from a React website, you can use the <Link path="guides/connection/react-fastapi">`connection` generator</Link>.
724
+
725
+ ## Connections
726
+
727
+ Use the <Link path="guides/connection">`connection`</Link> generator to integrate this project with others in your workspace. The following connections involve this project:
728
+
729
+ <CardGrid>
730
+ <ConnectionCard
731
+ title="React to FastAPI"
732
+ description="Call a Python FastAPI from a React website"
733
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-fastapi`}
734
+ source="react"
735
+ target="fastapi"
736
+ />
737
+ <ConnectionCard
738
+ title="FastAPI to Python DynamoDB"
739
+ description="Connect a FastAPI to a DynamoDB table"
740
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-fast-api-dynamodb`}
741
+ source="fastapi"
742
+ target="dynamodb"
743
+ targetBadge="python"
744
+ />
745
+ </CardGrid>
@@ -4,7 +4,9 @@ description: Generate a Python Agent for building AI agents with tools and deplo
4
4
  generator: py#agent
5
5
  ---
6
6
 
7
- import { FileTree, Tabs, TabItem } from '@astrojs/starlight/components';
7
+ import { FileTree, Tabs, TabItem, CardGrid } from '@astrojs/starlight/components';
8
+ import Astro from '@astrojs/react';
9
+ import ConnectionCard from '@components/connection-card.astro';
8
10
  import RunGenerator from '@components/run-generator.astro';
9
11
  import NxCommands from '@components/nx-commands.astro';
10
12
  import Link from '@components/link.astro';
@@ -14,18 +16,9 @@ import GeneratorParameters from '@components/generator-parameters.astro';
14
16
  import Drawer from '@components/drawer.astro';
15
17
  import OptionFilter from '@components/option-filter.astro';
16
18
 
17
- Generate a Python [Strands Agent](https://strandsagents.com/) for building AI agents with tools, and optionally deploy it to [Amazon Bedrock AgentCore Runtime](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/). By default, the generator uses [FastAPI](https://fastapi.tiangolo.com/) to expose an HTTP server. Alternatively, you can choose the [Agent-to-Agent (A2A)](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-a2a.html) protocol for interoperability with other A2A-compatible agents, or the [AG-UI](https://docs.ag-ui.com/) protocol for direct frontend integration via [CopilotKit](https://docs.copilotkit.ai/aws-strands).
19
+ Generate a Python AI agent for building agents with tools, and optionally deploy it to [Amazon Bedrock AgentCore Runtime](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/). Choose the agent framework with the `framework` option: [Strands](https://strandsagents.com/) (the default) or [LangChain](https://docs.langchain.com/oss/python/langchain/overview) (built on [LangGraph](https://docs.langchain.com/oss/python/langgraph/overview)).
18
20
 
19
- ## What is Strands?
20
-
21
- [Strands](https://strandsagents.com/docs/user-guide/quickstart/overview/) is a lightweight, production-ready Python framework for building AI agents. Key features include:
22
-
23
- - **Lightweight and customizable**: Simple agent loop that gets out of your way
24
- - **Production ready**: Full observability, tracing, and deployment options for scale
25
- - **Model and provider agnostic**: Supports many different models from various providers
26
- - **Community-driven tools**: Powerful set of community-contributed tools
27
- - **Multi-agent support**: Advanced techniques like agent teams and autonomous agents
28
- - **Flexible interaction modes**: Conversational, streaming, and non-streaming support
21
+ The generator exposes your agent over a server `protocol`. Both frameworks support [HTTP](https://fastapi.tiangolo.com/) (the default), the [Agent-to-Agent (A2A)](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-a2a.html) protocol for interoperability with other A2A-compatible agents, and the [AG-UI](https://docs.ag-ui.com/) protocol for direct frontend integration via [CopilotKit](https://docs.copilotkit.ai/).
29
22
 
30
23
  ## Usage
31
24
 
@@ -64,10 +57,10 @@ The generator will add the following files to your existing Python project. The
64
57
  </FileTree>
65
58
  </OptionFilter>
66
59
 
67
- <OptionFilter when={{ protocol: 'a2a' }} description="Strands A2A server layout">
60
+ <OptionFilter when={{ protocol: 'a2a' }} description="A2A server layout">
68
61
  ### A2A Protocol
69
62
 
70
- The entry point uses the [Strands A2A Server](https://strandsagents.com/docs/user-guide/concepts/multi-agent/agent-to-agent) instead of FastAPI:
63
+ The entry point exposes your agent over the A2A protocol (Strands uses the [Strands A2A Server](https://strandsagents.com/docs/user-guide/concepts/multi-agent/agent-to-agent); LangChain wraps the graph in an [`a2a-sdk`](https://a2a-protocol.org/) executor), mounted onto a FastAPI app:
71
64
 
72
65
  <FileTree>
73
66
  - your-project/
@@ -77,7 +70,7 @@ The entry point uses the [Strands A2A Server](https://strandsagents.com/docs/use
77
70
  - agent.py Main agent definition with sample tools
78
71
  - main.py A2A server entry point
79
72
  - Dockerfile Entry point for hosting your agent (excluded when `infra` is set to `None`)
80
- - pyproject.toml Updated with Strands dependencies
73
+ - pyproject.toml Updated with framework and A2A dependencies
81
74
  - project.json Updated with agent serve targets
82
75
  </FileTree>
83
76
  </OptionFilter>
@@ -85,7 +78,7 @@ The entry point uses the [Strands A2A Server](https://strandsagents.com/docs/use
85
78
  <OptionFilter when={{ protocol: 'ag-ui' }} description="AG-UI / CopilotKit server layout">
86
79
  ### AG-UI Protocol
87
80
 
88
- The entry point uses the [ag-ui-strands](https://docs.ag-ui.com/) integration, which exposes your agent via the AG-UI protocol for direct frontend integration with [CopilotKit](https://docs.copilotkit.ai/aws-strands):
81
+ The entry point exposes your agent via the [AG-UI](https://docs.ag-ui.com/) protocol for direct frontend integration with [CopilotKit](https://docs.copilotkit.ai/). Strands agents use the [ag-ui-strands](https://docs.ag-ui.com/) integration; LangChain agents use [ag-ui-langgraph](https://docs.ag-ui.com/):
89
82
 
90
83
  <FileTree>
91
84
  - your-project/
@@ -93,14 +86,14 @@ The entry point uses the [ag-ui-strands](https://docs.ag-ui.com/) integration, w
93
86
  - agent/ (or custom name if specified)
94
87
  - \_\_init\_\_.py Python package initialization
95
88
  - agent.py Main agent definition with sample tools
96
- - main.py AG-UI server entry point using ag-ui-strands
89
+ - main.py AG-UI server entry point
97
90
  - Dockerfile Entry point for hosting your agent (excluded when `infra` is set to `None`)
98
- - pyproject.toml Updated with Strands and AG-UI dependencies
91
+ - pyproject.toml Updated with framework and AG-UI dependencies
99
92
  - project.json Updated with agent serve targets
100
93
  </FileTree>
101
94
 
102
95
  :::tip[Connect to a React website]
103
- AG-UI agents can be connected to a React frontend using the <Link path="/guides/connection/react-agui">`connection` generator</Link>, which will set up [CopilotKit](https://docs.copilotkit.ai/aws-strands) components for a rich chat experience.
96
+ AG-UI agents can be connected to a React frontend using the <Link path="/guides/connection/react-agui">`connection` generator</Link>, which will set up [CopilotKit](https://docs.copilotkit.ai/) components for a rich chat experience.
104
97
  :::
105
98
  </OptionFilter>
106
99
 
@@ -146,12 +139,14 @@ If you selected `none` for `infra`, no CDK constructs or Terraform modules are g
146
139
 
147
140
  ## Working with Your Agent
148
141
 
149
- ### Adding Tools
142
+ You can edit `agent.py` to add tools, configure the model and customize the system prompt. The API depends on the framework you chose.
150
143
 
151
- Tools are functions that the AI agent can call to perform actions. The Strands framework uses a simple decorator-based approach for defining tools.
144
+ ### Adding Tools
152
145
 
153
- You can add new tools in the `agent.py` file:
146
+ Tools are functions that the AI agent can call to perform actions. Both frameworks use a decorator-based approach for defining tools, derive the tool name and description from the function name and docstring, and generate the input schema from your type hints.
154
147
 
148
+ <Tabs syncKey="agent-framework">
149
+ <TabItem label="Strands" _filter={{ framework: 'strands' }}>
155
150
  ```python
156
151
  from strands import Agent, tool
157
152
 
@@ -172,14 +167,38 @@ agent = Agent(
172
167
  tools=[calculate_sum, get_weather],
173
168
  )
174
169
  ```
170
+ </TabItem>
171
+ <TabItem label="LangChain" _filter={{ framework: 'langchain' }}>
172
+ ```python
173
+ from langchain.agents import create_agent
174
+ from langchain_aws import ChatBedrockConverse
175
+ from langchain_core.tools import tool
176
+
177
+ @tool
178
+ def calculate_sum(numbers: list[int]) -> int:
179
+ """Calculate the sum of a list of numbers"""
180
+ return sum(numbers)
175
181
 
176
- The Strands framework automatically handles:
177
- - Type validation based on your function's type hints
178
- - JSON schema generation for tool calling
179
- - Error handling and response formatting
182
+ @tool
183
+ def get_weather(city: str) -> str:
184
+ """Get weather information for a city"""
185
+ # Your weather API integration here
186
+ return f"Weather in {city}: Sunny, 25°C"
187
+
188
+ # Add tools to your agent
189
+ agent = create_agent(
190
+ model=ChatBedrockConverse(model=MODEL_ID, region_name=REGION),
191
+ tools=[calculate_sum, get_weather],
192
+ system_prompt="You are a helpful assistant with access to various tools.",
193
+ )
194
+ ```
195
+ </TabItem>
196
+ </Tabs>
180
197
 
181
198
  ### Using Pre-built Tools
182
199
 
200
+ <Tabs syncKey="agent-framework">
201
+ <TabItem label="Strands" _filter={{ framework: 'strands' }}>
183
202
  Strands provides a collection of pre-built tools through the `strands-tools` package:
184
203
 
185
204
  ```python
@@ -190,9 +209,26 @@ agent = Agent(
190
209
  tools=[current_time, http_request, file_read],
191
210
  )
192
211
  ```
212
+ </TabItem>
213
+ <TabItem label="LangChain" _filter={{ framework: 'langchain' }}>
214
+ LangChain provides a large ecosystem of [tools and integrations](https://docs.langchain.com/oss/python/integrations/tools). Install the relevant integration package, then pass the tools to `create_agent`:
215
+
216
+ ```python
217
+ from langchain_community.tools import DuckDuckGoSearchRun
218
+
219
+ agent = create_agent(
220
+ model=ChatBedrockConverse(model=MODEL_ID, region_name=REGION),
221
+ tools=[DuckDuckGoSearchRun()],
222
+ system_prompt="You are a helpful assistant.",
223
+ )
224
+ ```
225
+ </TabItem>
226
+ </Tabs>
193
227
 
194
228
  ### Model Configuration
195
229
 
230
+ <Tabs syncKey="agent-framework">
231
+ <TabItem label="Strands" _filter={{ framework: 'strands' }}>
196
232
  By default, Strands agents use Claude 4 Sonnet, but you can customize the model provider. See the [Strands documentation on model providers](https://strandsagents.com/docs/user-guide/concepts/model-providers/) for configuration options:
197
233
 
198
234
  ```python
@@ -208,30 +244,45 @@ bedrock_model = BedrockModel(
208
244
 
209
245
  agent = Agent(model=bedrock_model)
210
246
  ```
247
+ </TabItem>
248
+ <TabItem label="LangChain" _filter={{ framework: 'langchain' }}>
249
+ LangChain agents use a [`ChatBedrockConverse`](https://docs.langchain.com/oss/python/integrations/chat/bedrock_converse) model. The generated agent reads the model id and region from the `MODEL_ID` and `AWS_REGION` environment variables, but you can configure the model directly in `agent.py`:
211
250
 
212
- ### Consuming MCP Servers
251
+ ```python
252
+ from langchain_aws import ChatBedrockConverse
253
+
254
+ model = ChatBedrockConverse(
255
+ model="anthropic.claude-sonnet-4-20250514-v1:0",
256
+ region_name="us-west-2",
257
+ temperature=0.3,
258
+ )
259
+ ```
260
+ </TabItem>
261
+ </Tabs>
213
262
 
214
- You can [add tools from MCP servers](https://strandsagents.com/docs/user-guide/concepts/tools/mcp-tools/) to your Strands agent.
263
+ ### Consuming MCP Servers
215
264
 
216
- For consuming MCP Servers which you have created using the <Link path="/guides/py-mcp-server">`py#mcp-server`</Link> or <Link path="/guides/ts-mcp-server">`ts#mcp-server`</Link> generators you can make use of the <Link path="/guides/connection/py-agent-mcp">`connection` generator</Link>.
265
+ For consuming MCP Servers which you have created using the <Link path="/guides/py-mcp-server">`py#mcp-server`</Link> or <Link path="/guides/ts-mcp-server">`ts#mcp-server`</Link> generators you can make use of the <Link path="/guides/connection/py-agent-mcp">`connection` generator</Link>, which wires the MCP server's tools into your agent for both frameworks.
217
266
 
218
267
  <RunGenerator generator="connection" />
219
268
 
220
269
  Refer to the <Link path="/guides/connection/py-agent-mcp">`connection` generator guide</Link> for details about how the connection is set up.
221
270
 
222
- For other MCP servers, please refer to the [Strands Documentation](https://strandsagents.com/docs/user-guide/concepts/tools/mcp-tools/).
271
+ For other MCP servers, refer to the [Strands](https://strandsagents.com/docs/user-guide/concepts/tools/mcp-tools/) or [LangChain](https://docs.langchain.com/oss/python/langchain/mcp) MCP documentation.
223
272
 
224
273
  ### More
225
274
 
226
- For a more in-depth guide to writing Strands agents, refer to the [Strands documentation](https://strandsagents.com/docs/user-guide/quickstart/overview/).
275
+ For a more in-depth guide to writing agents, refer to the [Strands](https://strandsagents.com/docs/user-guide/quickstart/overview/) or [LangChain](https://docs.langchain.com/oss/python/langchain/overview) documentation.
227
276
 
228
277
  ## Protocol
229
278
 
230
279
  Your agent's server protocol determines how it communicates. All options are served by [FastAPI](https://fastapi.tiangolo.com/) — the entry point differs:
231
280
 
232
281
  - **HTTP** (default): A standard FastAPI server with a custom `/invocations` endpoint, CORS, and streaming. Best for custom client integrations.
233
- - **A2A**: The [Strands A2A Server](https://strandsagents.com/docs/user-guide/concepts/multi-agent/agent-to-agent) mounted onto a FastAPI app. Best when your agent needs to be discoverable and invokable by other A2A-compatible agents.
234
- - **AG-UI**: The [ag-ui-strands](https://docs.ag-ui.com/) integration, which exposes the [AG-UI protocol](https://docs.ag-ui.com/) over SSE. Best for direct frontend integration with [CopilotKit](https://docs.copilotkit.ai/aws-strands) in a React website.
282
+ - **A2A**: An [Agent-to-Agent](https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/runtime-a2a.html) server mounted onto a FastAPI app (Strands uses the [Strands A2A Server](https://strandsagents.com/docs/user-guide/concepts/multi-agent/agent-to-agent); LangChain uses the framework-agnostic [`a2a-sdk`](https://a2a-protocol.org/)). Best when your agent needs to be discoverable and invokable by other A2A-compatible agents.
283
+ - **AG-UI**: The [AG-UI protocol](https://docs.ag-ui.com/) over SSE (Strands uses `ag-ui-strands`; LangChain uses `ag-ui-langgraph`). Best for direct frontend integration with [CopilotKit](https://docs.copilotkit.ai/) in a React website.
284
+
285
+ The server entry point differs by framework (Strands yields a context-managed `Agent`, while LangChain drives a compiled `create_agent` graph), but the external contract for each protocol is the same.
235
286
 
236
287
  All protocols expose `/ping` for the AgentCore runtime health check contract. A2A agents listen on port `9000`; HTTP and AG-UI agents listen on port `8080`. The generated Dockerfile and infrastructure are configured for you.
237
288
 
@@ -322,20 +373,23 @@ Since the generator vends CDK or Terraform infrastructure which manages deployin
322
373
  <OptionFilter when={{ protocol: 'a2a' }} description="A2A server details">
323
374
  ## A2A Server (A2A protocol)
324
375
 
325
- The generated `main.py` mounts `A2AServer.to_fastapi_app()` onto a parent FastAPI app that also exposes `/ping`. When deployed to AgentCore, the entry point resolves the runtime's public ARN from AppConfig and advertises it in the agent card.
376
+ The generated `main.py` mounts an A2A server onto a parent FastAPI app that also exposes `/ping`. Strands agents use the Strands `A2AServer`; LangChain agents wrap the compiled graph in an [`a2a-sdk`](https://a2a-protocol.org/) `AgentExecutor`. When deployed to AgentCore, the entry point resolves the runtime's public ARN from AppConfig and advertises it in the agent card.
326
377
 
327
- Most users will not need to modify this file edit `agent.py` to change tools or the system prompt. The A2A server populates the agent card (`/.well-known/agent-card.json`) from the `Agent` constructor's `name` and `description`.
378
+ Most users will not need to modify this file; edit `agent.py` to change tools or the system prompt. The A2A server populates the agent card (`/.well-known/agent-card.json`) from the agent's `name` and `description`.
328
379
  </OptionFilter>
329
380
 
330
381
  <OptionFilter when={{ protocol: 'ag-ui' }} description="AG-UI / CopilotKit server details">
331
382
  ## AG-UI Server (AG-UI protocol)
332
383
 
333
- The generated `main.py` wraps your Strands `Agent` in an `ag_ui_strands.StrandsAgent` and creates a FastAPI app via `create_strands_app()`. The resulting app exposes a single POST endpoint that streams [AG-UI](https://docs.ag-ui.com/) events over Server-Sent Events (SSE), as well as `/ping` for the AgentCore runtime health check.
384
+ The generated `main.py` exposes a single POST endpoint that streams [AG-UI](https://docs.ag-ui.com/) events over Server-Sent Events (SSE), as well as `/ping` for the AgentCore runtime health check. The wiring depends on the framework:
385
+
386
+ - **Strands**: wraps your `Agent` in an `ag_ui_strands.StrandsAgent` and creates the FastAPI app via `create_strands_app()`.
387
+ - **LangChain**: wraps the compiled graph in an `ag_ui_langgraph.LangGraphAgent` and serves it from a hand-rolled FastAPI `/invocations` loop.
334
388
 
335
389
  Most users will not need to modify this file — edit `agent.py` to change tools or the system prompt.
336
390
 
337
391
  :::tip[Connecting to a React website]
338
- AG-UI agents are designed to be consumed directly by a frontend. Use the <Link path="/guides/connection/react-agui">`connection` generator</Link> to wire your React website up to the agent with a [CopilotKit](https://docs.copilotkit.ai/aws-strands) provider and [AG-UI HttpAgent](https://docs.ag-ui.com/) client.
392
+ AG-UI agents are designed to be consumed directly by a frontend. Use the <Link path="/guides/connection/react-agui">`connection` generator</Link> to wire your React website up to the agent with a [CopilotKit](https://docs.copilotkit.ai/) provider and [AG-UI HttpAgent](https://docs.ag-ui.com/) client.
339
393
  :::
340
394
  </OptionFilter>
341
395
 
@@ -514,9 +568,72 @@ Refer to the <Link path="/guides/connection/py-agent-a2a">`connection` generator
514
568
  <OptionFilter when={{ protocol: 'ag-ui' }} description="AG-UI / React connection details">
515
569
  ### Invoking an AG-UI Agent
516
570
 
517
- To invoke your AG-UI agent from a React website, use the <Link path="/guides/connection/react-agui">`connection` generator</Link>, which wires up a [CopilotKit](https://docs.copilotkit.ai/aws-strands) client configured for your deployed agent with the correct authentication (IAM or Cognito).
571
+ To invoke your AG-UI agent from a React website, use the <Link path="/guides/connection/react-agui">`connection` generator</Link>, which wires up a [CopilotKit](https://docs.copilotkit.ai/) client configured for your deployed agent with the correct authentication (IAM or Cognito).
518
572
 
519
573
  <RunGenerator generator="connection" />
520
574
 
521
575
  Refer to the <Link path="/guides/connection/react-agui">`connection` generator guide</Link> for details about how the connection is set up.
522
576
  </OptionFilter>
577
+
578
+ ## Connections
579
+
580
+ Use the <Link path="guides/connection">`connection`</Link> generator to integrate this project with others in your workspace. The following connections involve this project:
581
+
582
+ <CardGrid>
583
+ <ConnectionCard
584
+ title="React to Python Agent"
585
+ description="Call a Python Agent from a React website"
586
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-py-agent`}
587
+ source="react"
588
+ target="strands"
589
+ targetBadge="python"
590
+ />
591
+ <ConnectionCard
592
+ title="React to AG-UI Agent"
593
+ description="Call an Agent exposing the AG-UI protocol from a React website via CopilotKit"
594
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-agui`}
595
+ source="react"
596
+ target="copilotkit"
597
+ />
598
+ <ConnectionCard
599
+ title="Python Agent to MCP"
600
+ description="Connect a Python Agent to an MCP server"
601
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-agent-mcp`}
602
+ source="strands"
603
+ sourceBadge="python"
604
+ target="mcp"
605
+ />
606
+ <ConnectionCard
607
+ title="Python Agent to A2A Agent"
608
+ description="Connect a Python Agent to a remote A2A agent"
609
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-agent-a2a`}
610
+ source="strands"
611
+ sourceBadge="python"
612
+ target="a2a"
613
+ />
614
+ <ConnectionCard
615
+ title="TypeScript Agent to A2A Agent"
616
+ description="Connect a TypeScript Agent to a remote A2A agent"
617
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-agent-a2a`}
618
+ source="strands"
619
+ sourceBadge="typescript"
620
+ target="a2a"
621
+ />
622
+ <ConnectionCard
623
+ title="Python Agent to Python DynamoDB"
624
+ description="Connect a Python Agent to a DynamoDB table"
625
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-agent-dynamodb`}
626
+ source="strands"
627
+ sourceBadge="python"
628
+ target="dynamodb"
629
+ targetBadge="python"
630
+ />
631
+ <ConnectionCard
632
+ title="Python Agent to AgentCore Gateway"
633
+ description="Connect a Python Agent to an AgentCore Gateway"
634
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-agent-gateway`}
635
+ source="strands"
636
+ sourceBadge="python"
637
+ target="agentcore"
638
+ />
639
+ </CardGrid>
@@ -4,7 +4,9 @@ description: Create a Python DynamoDB project
4
4
  generator: py#dynamodb
5
5
  ---
6
6
 
7
- import { FileTree } from '@astrojs/starlight/components';
7
+ import { FileTree, CardGrid } from '@astrojs/starlight/components';
8
+ import Astro from '@astrojs/react';
9
+ import ConnectionCard from '@components/connection-card.astro';
8
10
  import Link from '@components/link.astro';
9
11
  import RunGenerator from '@components/run-generator.astro';
10
12
  import GeneratorParameters from '@components/generator-parameters.astro';
@@ -436,14 +438,39 @@ item = ExampleModel.get_by_id('123')
436
438
  When running in AWS, `get_table_name()` fetches the table name from AWS AppConfig using the `RUNTIME_CONFIG_APP_ID` environment variable. Projects built with this plugin already have this variable configured automatically. For other Python projects, ensure `RUNTIME_CONFIG_APP_ID` is set in the runtime environment with the AppConfig application ID provisioned by your infrastructure. For more information, see the <Link path="guides/runtime-config">Runtime Configuration guide</Link>.
437
439
  :::
438
440
 
439
- ### Connection Generators
440
-
441
- For specific project types, use the `connection` generator to automatically wire up local development dependencies so DynamoDB Local starts automatically alongside your project, and add the DynamoDB package as a workspace dependency:
442
-
443
- - <Link path="guides/connection/py-fast-api-dynamodb">FastAPI → DynamoDB</Link>
444
- - <Link path="guides/connection/py-agent-dynamodb">Python Agent → DynamoDB</Link>
445
- - <Link path="guides/connection/py-mcp-server-dynamodb">Python MCP Server → DynamoDB</Link>
446
-
447
441
  ## Deploying your Table
448
442
 
449
443
  <Snippet name="dynamodb/deploying-table" parentHeading="Deploying your Table" />
444
+
445
+ ## Connections
446
+
447
+ Use the <Link path="guides/connection">`connection`</Link> generator to integrate this project with others in your workspace. The following connections involve this project:
448
+
449
+ <CardGrid>
450
+ <ConnectionCard
451
+ title="FastAPI to Python DynamoDB"
452
+ description="Connect a FastAPI to a DynamoDB table"
453
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-fast-api-dynamodb`}
454
+ source="fastapi"
455
+ target="dynamodb"
456
+ targetBadge="python"
457
+ />
458
+ <ConnectionCard
459
+ title="Python Agent to Python DynamoDB"
460
+ description="Connect a Python Agent to a DynamoDB table"
461
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-agent-dynamodb`}
462
+ source="strands"
463
+ sourceBadge="python"
464
+ target="dynamodb"
465
+ targetBadge="python"
466
+ />
467
+ <ConnectionCard
468
+ title="Python MCP Server to Python DynamoDB"
469
+ description="Connect a Python MCP Server to a DynamoDB table"
470
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-mcp-server-dynamodb`}
471
+ source="mcp"
472
+ sourceBadge="python"
473
+ target="dynamodb"
474
+ targetBadge="python"
475
+ />
476
+ </CardGrid>
@@ -4,7 +4,9 @@ description: Generate a Python Model Context Protocol (MCP) server for providing
4
4
  generator: py#mcp-server
5
5
  ---
6
6
 
7
- import { FileTree } from '@astrojs/starlight/components';
7
+ import { FileTree, CardGrid } from '@astrojs/starlight/components';
8
+ import Astro from '@astrojs/react';
9
+ import ConnectionCard from '@components/connection-card.astro';
8
10
  import RunGenerator from '@components/run-generator.astro';
9
11
  import NxCommands from '@components/nx-commands.astro';
10
12
  import Link from '@components/link.astro';
@@ -163,3 +165,42 @@ A `docker` target specific to your MCP server is also added, which copies the `D
163
165
 
164
166
  <Snippet name="mcp/observability" parentHeading="Observability" />
165
167
  </OptionFilter>
168
+
169
+ ## Connections
170
+
171
+ Use the <Link path="guides/connection">`connection`</Link> generator to integrate this project with others in your workspace. The following connections involve this project:
172
+
173
+ <CardGrid>
174
+ <ConnectionCard
175
+ title="TypeScript Agent to MCP"
176
+ description="Connect a TypeScript Agent to an MCP server"
177
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-agent-mcp`}
178
+ source="strands"
179
+ sourceBadge="typescript"
180
+ target="mcp"
181
+ />
182
+ <ConnectionCard
183
+ title="Python Agent to MCP"
184
+ description="Connect a Python Agent to an MCP server"
185
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-agent-mcp`}
186
+ source="strands"
187
+ sourceBadge="python"
188
+ target="mcp"
189
+ />
190
+ <ConnectionCard
191
+ title="Python MCP Server to Python DynamoDB"
192
+ description="Connect a Python MCP Server to a DynamoDB table"
193
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-mcp-server-dynamodb`}
194
+ source="mcp"
195
+ sourceBadge="python"
196
+ target="dynamodb"
197
+ targetBadge="python"
198
+ />
199
+ <ConnectionCard
200
+ title="AgentCore Gateway to MCP Server"
201
+ description="Aggregate an MCP server behind an AgentCore Gateway"
202
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/agentcore-gateway-mcp`}
203
+ source="agentcore"
204
+ target="mcp"
205
+ />
206
+ </CardGrid>
@@ -6,7 +6,9 @@ when:
6
6
  framework:
7
7
  - react
8
8
  ---
9
- import { FileTree, Steps } from '@astrojs/starlight/components';
9
+ import { FileTree, Steps, CardGrid } from '@astrojs/starlight/components';
10
+ import Astro from '@astrojs/react';
11
+ import ConnectionCard from '@components/connection-card.astro';
10
12
  import Link from '@components/link.astro';
11
13
  import RunGenerator from '@components/run-generator.astro';
12
14
  import GeneratorParameters from '@components/generator-parameters.astro';
@@ -430,3 +432,53 @@ provider "aws" {
430
432
  </Fragment>
431
433
  </Infrastructure>
432
434
 
435
+ ## Connections
436
+
437
+ Use the <Link path="guides/connection">`connection`</Link> generator to integrate this project with others in your workspace. The following connections involve this project:
438
+
439
+ <CardGrid>
440
+ <ConnectionCard
441
+ title="React to tRPC"
442
+ description="Call a tRPC API from a React website"
443
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-trpc`}
444
+ source="react"
445
+ target="trpc"
446
+ />
447
+ <ConnectionCard
448
+ title="React to FastAPI"
449
+ description="Call a Python FastAPI from a React website"
450
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-fastapi`}
451
+ source="react"
452
+ target="fastapi"
453
+ />
454
+ <ConnectionCard
455
+ title="React to Smithy API"
456
+ description="Call a Smithy API from a React website"
457
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-smithy`}
458
+ source="react"
459
+ target="smithy"
460
+ />
461
+ <ConnectionCard
462
+ title="React to Python Agent"
463
+ description="Call a Python Agent from a React website"
464
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-py-agent`}
465
+ source="react"
466
+ target="strands"
467
+ targetBadge="python"
468
+ />
469
+ <ConnectionCard
470
+ title="React to TypeScript Agent"
471
+ description="Call a TypeScript Agent from a React website"
472
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-ts-agent`}
473
+ source="react"
474
+ target="strands"
475
+ targetBadge="typescript"
476
+ />
477
+ <ConnectionCard
478
+ title="React to AG-UI Agent"
479
+ description="Call an Agent exposing the AG-UI protocol from a React website via CopilotKit"
480
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-agui`}
481
+ source="react"
482
+ target="copilotkit"
483
+ />
484
+ </CardGrid>
@@ -6,7 +6,9 @@ when:
6
6
  framework: [trpc]
7
7
  infra: [rest-lambda, http-lambda]
8
8
  ---
9
- import { FileTree, Tabs, TabItem } from '@astrojs/starlight/components';
9
+ import { FileTree, Tabs, TabItem, CardGrid } from '@astrojs/starlight/components';
10
+ import Astro from '@astrojs/react';
11
+ import ConnectionCard from '@components/connection-card.astro';
10
12
  import Link from '@components/link.astro';
11
13
  import RunGenerator from '@components/run-generator.astro';
12
14
  import GeneratorParameters from '@components/generator-parameters.astro';
@@ -817,3 +819,31 @@ If you are calling your API from a React website, consider using the <Link path=
817
819
  ## More Information
818
820
 
819
821
  For more information about tRPC, please refer to the [tRPC documentation](https://trpc.io/docs).
822
+
823
+ ## Connections
824
+
825
+ Use the <Link path="guides/connection">`connection`</Link> generator to integrate this project with others in your workspace. The following connections involve this project:
826
+
827
+ <CardGrid>
828
+ <ConnectionCard
829
+ title="React to tRPC"
830
+ description="Call a tRPC API from a React website"
831
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-trpc`}
832
+ source="react"
833
+ target="trpc"
834
+ />
835
+ <ConnectionCard
836
+ title="tRPC API to Relational Database"
837
+ description="Connect a tRPC API to an Aurora relational database"
838
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/trpc-rdb`}
839
+ source="trpc"
840
+ target="aurora"
841
+ />
842
+ <ConnectionCard
843
+ title="tRPC API to TypeScript DynamoDB"
844
+ description="Connect a tRPC API to a DynamoDB table"
845
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/trpc-dynamodb`}
846
+ source="trpc"
847
+ target="dynamodb"
848
+ />
849
+ </CardGrid>
@@ -4,7 +4,9 @@ description: Generate a TypeScript Agent for building AI agents with tools and d
4
4
  generator: ts#agent
5
5
  ---
6
6
 
7
- import { FileTree, Tabs, TabItem } from '@astrojs/starlight/components';
7
+ import { FileTree, Tabs, TabItem, CardGrid } from '@astrojs/starlight/components';
8
+ import Astro from '@astrojs/react';
9
+ import ConnectionCard from '@components/connection-card.astro';
8
10
  import RunGenerator from '@components/run-generator.astro';
9
11
  import NxCommands from '@components/nx-commands.astro';
10
12
  import Link from '@components/link.astro';
@@ -472,3 +474,73 @@ To invoke your AG-UI agent from a React website, use the <Link path="/guides/con
472
474
 
473
475
  Refer to the <Link path="/guides/connection/react-agui">`connection` generator guide</Link> for details about how the connection is set up.
474
476
  </OptionFilter>
477
+
478
+ ## Connections
479
+
480
+ Use the <Link path="guides/connection">`connection`</Link> generator to integrate this project with others in your workspace. The following connections involve this project:
481
+
482
+ <CardGrid>
483
+ <ConnectionCard
484
+ title="React to TypeScript Agent"
485
+ description="Call a TypeScript Agent from a React website"
486
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-ts-agent`}
487
+ source="react"
488
+ target="strands"
489
+ targetBadge="typescript"
490
+ />
491
+ <ConnectionCard
492
+ title="React to AG-UI Agent"
493
+ description="Call an Agent exposing the AG-UI protocol from a React website via CopilotKit"
494
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-agui`}
495
+ source="react"
496
+ target="copilotkit"
497
+ />
498
+ <ConnectionCard
499
+ title="TypeScript Agent to MCP"
500
+ description="Connect a TypeScript Agent to an MCP server"
501
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-agent-mcp`}
502
+ source="strands"
503
+ sourceBadge="typescript"
504
+ target="mcp"
505
+ />
506
+ <ConnectionCard
507
+ title="TypeScript Agent to A2A Agent"
508
+ description="Connect a TypeScript Agent to a remote A2A agent"
509
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-agent-a2a`}
510
+ source="strands"
511
+ sourceBadge="typescript"
512
+ target="a2a"
513
+ />
514
+ <ConnectionCard
515
+ title="Python Agent to A2A Agent"
516
+ description="Connect a Python Agent to a remote A2A agent"
517
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-agent-a2a`}
518
+ source="strands"
519
+ sourceBadge="python"
520
+ target="a2a"
521
+ />
522
+ <ConnectionCard
523
+ title="TypeScript Agent to Relational Database"
524
+ description="Connect a TypeScript Agent to an Aurora relational database"
525
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-agent-rdb`}
526
+ source="strands"
527
+ sourceBadge="typescript"
528
+ target="aurora"
529
+ />
530
+ <ConnectionCard
531
+ title="TypeScript Agent to TypeScript DynamoDB"
532
+ description="Connect a TypeScript Agent to a DynamoDB table"
533
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-agent-dynamodb`}
534
+ source="strands"
535
+ sourceBadge="typescript"
536
+ target="dynamodb"
537
+ />
538
+ <ConnectionCard
539
+ title="TypeScript Agent to AgentCore Gateway"
540
+ description="Connect a TypeScript Agent to an AgentCore Gateway"
541
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-agent-gateway`}
542
+ source="strands"
543
+ sourceBadge="typescript"
544
+ target="agentcore"
545
+ />
546
+ </CardGrid>
@@ -4,7 +4,9 @@ description: Create a TypeScript DynamoDB project
4
4
  generator: ts#dynamodb
5
5
  ---
6
6
 
7
- import { FileTree } from '@astrojs/starlight/components';
7
+ import { FileTree, CardGrid } from '@astrojs/starlight/components';
8
+ import Astro from '@astrojs/react';
9
+ import ConnectionCard from '@components/connection-card.astro';
8
10
  import Link from '@components/link.astro';
9
11
  import RunGenerator from '@components/run-generator.astro';
10
12
  import GeneratorParameters from '@components/generator-parameters.astro';
@@ -144,15 +146,42 @@ const result = await entity.query.primary({ id: '123' }).go();
144
146
  When running in AWS, `resolveTableName()` fetches the table name from AWS AppConfig using the `RUNTIME_CONFIG_APP_ID` environment variable. Projects built with this plugin (tRPC APIs, Smithy APIs, agents, MCP servers) already have this variable configured automatically. For other TypeScript projects, ensure `RUNTIME_CONFIG_APP_ID` is set in the runtime environment with the AppConfig application ID provisioned by your infrastructure. For more information, see the <Link path="guides/runtime-config">Runtime Configuration guide</Link>.
145
147
  :::
146
148
 
147
- ### Connection Generators
148
-
149
- For specific project types, use the `connection` generator to automatically wire up local development dependencies so DynamoDB Local starts automatically alongside your project:
150
-
151
- - <Link path="guides/connection/trpc-dynamodb">tRPC API → DynamoDB</Link>
152
- - <Link path="guides/connection/smithy-dynamodb">Smithy API → DynamoDB</Link>
153
- - <Link path="guides/connection/ts-agent-dynamodb">TypeScript Agent → DynamoDB</Link>
154
- - <Link path="guides/connection/ts-mcp-server-dynamodb">MCP Server → DynamoDB</Link>
155
-
156
149
  ## Deploying your Table
157
150
 
158
151
  <Snippet name="dynamodb/deploying-table" parentHeading="Deploying your Table" />
152
+
153
+ ## Connections
154
+
155
+ Use the <Link path="guides/connection">`connection`</Link> generator to integrate this project with others in your workspace. The following connections involve this project:
156
+
157
+ <CardGrid>
158
+ <ConnectionCard
159
+ title="tRPC API to TypeScript DynamoDB"
160
+ description="Connect a tRPC API to a DynamoDB table"
161
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/trpc-dynamodb`}
162
+ source="trpc"
163
+ target="dynamodb"
164
+ />
165
+ <ConnectionCard
166
+ title="Smithy API to TypeScript DynamoDB"
167
+ description="Connect a Smithy API to a DynamoDB table"
168
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/smithy-dynamodb`}
169
+ source="smithy"
170
+ target="dynamodb"
171
+ />
172
+ <ConnectionCard
173
+ title="TypeScript Agent to TypeScript DynamoDB"
174
+ description="Connect a TypeScript Agent to a DynamoDB table"
175
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-agent-dynamodb`}
176
+ source="strands"
177
+ sourceBadge="typescript"
178
+ target="dynamodb"
179
+ />
180
+ <ConnectionCard
181
+ title="MCP Server to TypeScript DynamoDB"
182
+ description="Connect a TypeScript MCP Server to a DynamoDB table"
183
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-mcp-server-dynamodb`}
184
+ source="mcp"
185
+ target="dynamodb"
186
+ />
187
+ </CardGrid>
@@ -4,7 +4,9 @@ description: Generate a TypeScript Model Context Protocol (MCP) server for provi
4
4
  generator: ts#mcp-server
5
5
  ---
6
6
 
7
- import { FileTree } from '@astrojs/starlight/components';
7
+ import { FileTree, CardGrid } from '@astrojs/starlight/components';
8
+ import Astro from '@astrojs/react';
9
+ import ConnectionCard from '@components/connection-card.astro';
8
10
  import RunGenerator from '@components/run-generator.astro';
9
11
  import NxCommands from '@components/nx-commands.astro';
10
12
  import Link from '@components/link.astro';
@@ -171,3 +173,47 @@ A `docker` target is also generated which prepares the docker context for all MC
171
173
 
172
174
  <Snippet name="mcp/observability" parentHeading="Observability" />
173
175
  </OptionFilter>
176
+
177
+ ## Connections
178
+
179
+ Use the <Link path="guides/connection">`connection`</Link> generator to integrate this project with others in your workspace. The following connections involve this project:
180
+
181
+ <CardGrid>
182
+ <ConnectionCard
183
+ title="TypeScript Agent to MCP"
184
+ description="Connect a TypeScript Agent to an MCP server"
185
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-agent-mcp`}
186
+ source="strands"
187
+ sourceBadge="typescript"
188
+ target="mcp"
189
+ />
190
+ <ConnectionCard
191
+ title="Python Agent to MCP"
192
+ description="Connect a Python Agent to an MCP server"
193
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-agent-mcp`}
194
+ source="strands"
195
+ sourceBadge="python"
196
+ target="mcp"
197
+ />
198
+ <ConnectionCard
199
+ title="MCP Server to Relational Database"
200
+ description="Connect a TypeScript MCP Server to an Aurora relational database"
201
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-mcp-server-rdb`}
202
+ source="mcp"
203
+ target="aurora"
204
+ />
205
+ <ConnectionCard
206
+ title="MCP Server to TypeScript DynamoDB"
207
+ description="Connect a TypeScript MCP Server to a DynamoDB table"
208
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-mcp-server-dynamodb`}
209
+ source="mcp"
210
+ target="dynamodb"
211
+ />
212
+ <ConnectionCard
213
+ title="AgentCore Gateway to MCP Server"
214
+ description="Aggregate an MCP server behind an AgentCore Gateway"
215
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/agentcore-gateway-mcp`}
216
+ source="agentcore"
217
+ target="mcp"
218
+ />
219
+ </CardGrid>
@@ -4,7 +4,9 @@ description: Create a relational database project
4
4
  generator: ts#rdb
5
5
  ---
6
6
 
7
- import { FileTree } from '@astrojs/starlight/components';
7
+ import { FileTree, CardGrid } from '@astrojs/starlight/components';
8
+ import Astro from '@astrojs/react';
9
+ import ConnectionCard from '@components/connection-card.astro';
8
10
  import Link from '@components/link.astro';
9
11
  import RunGenerator from '@components/run-generator.astro';
10
12
  import GeneratorParameters from '@components/generator-parameters.astro';
@@ -243,15 +245,6 @@ const users = await prisma.user.findMany({ orderBy: { id: 'asc' } });
243
245
 
244
246
  The Prisma client exposes fully typed models derived from your `prisma/models/` schema, giving you end-to-end type safety from the database all the way through to your API response.
245
247
 
246
- ### Connection Generators
247
-
248
- For specific project types, use the `connection` generator to automatically wire up the database — it handles imports, context injection, and local development dependencies:
249
-
250
- - <Link path="guides/connection/trpc-rdb">tRPC API → Relational Database</Link>
251
- - <Link path="guides/connection/smithy-rdb">Smithy API → Relational Database</Link>
252
- - <Link path="guides/connection/ts-agent-rdb">TypeScript Agent → Relational Database</Link>
253
- - <Link path="guides/connection/ts-mcp-server-rdb">MCP Server → Relational Database</Link>
254
-
255
248
  ## Deploying your Database
256
249
 
257
250
  The relational database generator creates CDK or Terraform infrastructure based on your selected `iacProvider`.
@@ -805,3 +798,39 @@ Be cautious with tasks running longer than 15 minutes. If the MySQL client needs
805
798
  For long-running tasks such as batch jobs or data migrations, call `getPrisma()` at the start of each unit of work rather than once for the entire operation. Because `getPrisma()` always creates a fresh client and fetches a new IAM token for MySQL, this ensures each connection authenticates with a valid token.
806
799
 
807
800
  </OptionFilter>
801
+
802
+ ## Connections
803
+
804
+ Use the <Link path="guides/connection">`connection`</Link> generator to integrate this project with others in your workspace. The following connections involve this project:
805
+
806
+ <CardGrid>
807
+ <ConnectionCard
808
+ title="tRPC API to Relational Database"
809
+ description="Connect a tRPC API to an Aurora relational database"
810
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/trpc-rdb`}
811
+ source="trpc"
812
+ target="aurora"
813
+ />
814
+ <ConnectionCard
815
+ title="Smithy API to Relational Database"
816
+ description="Connect a Smithy API to an Aurora relational database"
817
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/smithy-rdb`}
818
+ source="smithy"
819
+ target="aurora"
820
+ />
821
+ <ConnectionCard
822
+ title="TypeScript Agent to Relational Database"
823
+ description="Connect a TypeScript Agent to an Aurora relational database"
824
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-agent-rdb`}
825
+ source="strands"
826
+ sourceBadge="typescript"
827
+ target="aurora"
828
+ />
829
+ <ConnectionCard
830
+ title="MCP Server to Relational Database"
831
+ description="Connect a TypeScript MCP Server to an Aurora relational database"
832
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-mcp-server-rdb`}
833
+ source="mcp"
834
+ target="aurora"
835
+ />
836
+ </CardGrid>
@@ -7,7 +7,9 @@ when:
7
7
  infra: [rest-lambda]
8
8
  ---
9
9
 
10
- import { FileTree } from '@astrojs/starlight/components';
10
+ import { FileTree, CardGrid } from '@astrojs/starlight/components';
11
+ import Astro from '@astrojs/react';
12
+ import ConnectionCard from '@components/connection-card.astro';
11
13
  import Link from '@components/link.astro';
12
14
  import RunGenerator from '@components/run-generator.astro';
13
15
  import GeneratorParameters from '@components/generator-parameters.astro';
@@ -807,3 +809,31 @@ resource "aws_iam_role_policy_attachment" "api_invoke_access" {
807
809
  ## Invoking your Smithy API
808
810
 
809
811
  To invoke your API from a React website, you can use the <Link path="guides/connection/react-smithy">`connection`</Link> generator, which provides type-safe client generation from your Smithy model.
812
+
813
+ ## Connections
814
+
815
+ Use the <Link path="guides/connection">`connection`</Link> generator to integrate this project with others in your workspace. The following connections involve this project:
816
+
817
+ <CardGrid>
818
+ <ConnectionCard
819
+ title="React to Smithy API"
820
+ description="Call a Smithy API from a React website"
821
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/react-smithy`}
822
+ source="react"
823
+ target="smithy"
824
+ />
825
+ <ConnectionCard
826
+ title="Smithy API to Relational Database"
827
+ description="Connect a Smithy API to an Aurora relational database"
828
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/smithy-rdb`}
829
+ source="smithy"
830
+ target="aurora"
831
+ />
832
+ <ConnectionCard
833
+ title="Smithy API to TypeScript DynamoDB"
834
+ description="Connect a Smithy API to a DynamoDB table"
835
+ href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/smithy-dynamodb`}
836
+ source="smithy"
837
+ target="dynamodb"
838
+ />
839
+ </CardGrid>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws/nx-plugin-mcp",
3
- "version": "1.0.0-rc.21",
3
+ "version": "1.0.0-rc.22",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/awslabs/nx-plugin-for-aws.git",
@@ -19,7 +19,7 @@
19
19
  "type": "string",
20
20
  "description": "The agent SDK to use.",
21
21
  "x-prompt": "Which agent SDK would you like to use?",
22
- "enum": ["strands"],
22
+ "enum": ["strands", "langchain"],
23
23
  "default": "strands",
24
24
  "x-priority": "important"
25
25
  },