@aws/nx-plugin-mcp 1.0.0-rc.11 → 1.0.0-rc.13
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.
- package/bin/aws-nx-mcp.js +2426 -2393
- package/docs/guides/agentcore-gateway.mdx +239 -0
- package/docs/guides/connection/agentcore-gateway-mcp.mdx +134 -0
- package/docs/guides/connection/py-agent-gateway.mdx +158 -0
- package/docs/guides/connection/ts-agent-gateway.mdx +150 -0
- package/docs/guides/connection.mdx +23 -0
- package/docs/guides/nx-generator.mdx +1 -0
- package/docs/guides/py-agent.mdx +42 -3
- package/docs/guides/ts-agent.mdx +40 -2
- package/generators.json +31 -1
- package/package.json +1 -1
- package/src/agentcore-gateway/mcp-connection/schema.json +26 -0
- package/src/agentcore-gateway/schema.json +65 -0
- package/src/py/agent/gateway-connection/schema.json +26 -0
- package/src/ts/agent/gateway-connection/schema.json +26 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: TypeScript Agent to Gateway
|
|
3
|
+
description: Connect a TypeScript Agent to an AgentCore Gateway
|
|
4
|
+
when:
|
|
5
|
+
sourceType: ts#agent
|
|
6
|
+
targetType: agentcore-gateway
|
|
7
|
+
---
|
|
8
|
+
import { FileTree } from '@astrojs/starlight/components';
|
|
9
|
+
import Link from '@components/link.astro';
|
|
10
|
+
import RunGenerator from '@components/run-generator.astro';
|
|
11
|
+
import GeneratorParameters from '@components/generator-parameters.astro';
|
|
12
|
+
import NxCommands from '@components/nx-commands.astro';
|
|
13
|
+
import Infrastructure from '@components/infrastructure.astro';
|
|
14
|
+
|
|
15
|
+
The `connection` generator can connect your <Link path="guides/ts-agent">TypeScript Agent</Link> to an <Link path="guides/agentcore-gateway">AgentCore Gateway</Link>.
|
|
16
|
+
|
|
17
|
+
The generator wires the agent so it authenticates to the Gateway with IAM SigV4 when deployed, and connects to the local gateway started by the Gateway project when running locally.
|
|
18
|
+
|
|
19
|
+
## Prerequisites
|
|
20
|
+
|
|
21
|
+
Before using this generator, ensure you have:
|
|
22
|
+
|
|
23
|
+
1. A TypeScript project with a <Link path="guides/ts-agent">Agent</Link> component (`infra: agentcore`)
|
|
24
|
+
2. A <Link path="guides/agentcore-gateway">`agentcore-gateway`</Link> project
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
### Run the Generator
|
|
29
|
+
|
|
30
|
+
<RunGenerator generator="connection" />
|
|
31
|
+
|
|
32
|
+
Select the agent project as the source and the Gateway project as the target.
|
|
33
|
+
|
|
34
|
+
### Options
|
|
35
|
+
|
|
36
|
+
<GeneratorParameters generator="connection" />
|
|
37
|
+
|
|
38
|
+
## Generator Output
|
|
39
|
+
|
|
40
|
+
The generator emits shared core client files into your `agent-connection` package, plus a per-Gateway wrapper, and modifies your agent:
|
|
41
|
+
|
|
42
|
+
<FileTree>
|
|
43
|
+
|
|
44
|
+
- packages/common/agent-connection
|
|
45
|
+
- src
|
|
46
|
+
- core/
|
|
47
|
+
- agentcore-gateway-mcp-client.ts SigV4 MCP client for the deployed Gateway
|
|
48
|
+
- app/
|
|
49
|
+
- \<gateway-kebab>-client.ts Per-Gateway client wrapper
|
|
50
|
+
- index.ts Re-exports the Gateway client
|
|
51
|
+
|
|
52
|
+
</FileTree>
|
|
53
|
+
|
|
54
|
+
Additionally, the generator:
|
|
55
|
+
|
|
56
|
+
- Modifies your agent's `agent.ts` to import the Gateway client class, call `<Gateway>Client.create()`, and register the returned client in the `tools` array
|
|
57
|
+
- Wires the agent's `<agent>-serve-local` target to depend on the Gateway's `<gateway>-serve-local` aggregator
|
|
58
|
+
- Installs the required SigV4 / MCP dependencies
|
|
59
|
+
|
|
60
|
+
## Using the connected Gateway
|
|
61
|
+
|
|
62
|
+
The generator transforms your agent's `agent.ts` to use the Gateway client:
|
|
63
|
+
|
|
64
|
+
```ts title="packages/example/src/my-agent/agent.ts" {2,5,8}
|
|
65
|
+
import { Agent } from '@strands-agents/sdk';
|
|
66
|
+
import { MyGatewayClient } from ':my-scope/agent-connection';
|
|
67
|
+
|
|
68
|
+
export const getAgent = async () => {
|
|
69
|
+
const myGateway = await MyGatewayClient.create();
|
|
70
|
+
return new Agent({
|
|
71
|
+
systemPrompt: '...',
|
|
72
|
+
tools: [myGateway],
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
When deployed (`SERVE_LOCAL` unset), the client points at the Gateway's MCP endpoint and authenticates with SigV4. When `SERVE_LOCAL=true`, it points at the local gateway started by the Gateway project's `serve-local` target, so the same `agent.ts` works uniformly in both modes.
|
|
78
|
+
|
|
79
|
+
The session ID is propagated to downstream MCP servers automatically via the `X-Amzn-Bedrock-AgentCore-Runtime-Session-Id` header.
|
|
80
|
+
|
|
81
|
+
## Infrastructure
|
|
82
|
+
|
|
83
|
+
After running the generator you must grant the agent permission to invoke the Gateway.
|
|
84
|
+
|
|
85
|
+
<Infrastructure>
|
|
86
|
+
<Fragment slot="cdk">
|
|
87
|
+
```ts title="packages/infra/src/stacks/application-stack.ts" {5}
|
|
88
|
+
const gateway = new MyGateway(this, 'MyGateway');
|
|
89
|
+
const myAgent = new MyAgent(this, 'MyAgent');
|
|
90
|
+
|
|
91
|
+
// Grant the agent permissions to invoke the Gateway
|
|
92
|
+
gateway.grantInvokeAccess(myAgent);
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
The Gateway URL is automatically registered in the `agentcore.gateways.<ClassName>` namespace of <Link path="guides/runtime-config">Runtime Configuration</Link> by the generated CDK construct, so the agent can discover it at runtime.
|
|
96
|
+
</Fragment>
|
|
97
|
+
<Fragment slot="terraform">
|
|
98
|
+
```hcl title="packages/infra/src/main.tf" {12-24}
|
|
99
|
+
module "my_gateway" {
|
|
100
|
+
source = "../../common/terraform/src/app/gateways/my-gateway"
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
module "my_agent" {
|
|
104
|
+
source = "../../common/terraform/src/app/agents/my-agent"
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
# Grant the agent permission to invoke the Gateway
|
|
108
|
+
resource "aws_iam_policy" "agent_invoke_gateway" {
|
|
109
|
+
name = "AgentInvokeGatewayPolicy"
|
|
110
|
+
policy = jsonencode({
|
|
111
|
+
Version = "2012-10-17"
|
|
112
|
+
Statement = [{
|
|
113
|
+
Effect = "Allow"
|
|
114
|
+
Action = "bedrock-agentcore:InvokeGateway"
|
|
115
|
+
Resource = module.my_gateway.gateway_arn
|
|
116
|
+
}]
|
|
117
|
+
})
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
resource "aws_iam_role_policy_attachment" "agent_invoke_gateway" {
|
|
121
|
+
role = module.my_agent.agent_core_runtime_role_arn
|
|
122
|
+
policy_arn = aws_iam_policy.agent_invoke_gateway.arn
|
|
123
|
+
}
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
The Gateway URL is automatically registered in the `agentcore.gateways.<ClassName>` namespace of <Link path="guides/runtime-config">Runtime Configuration</Link> by the generated Terraform module, so the agent can discover it at runtime.
|
|
127
|
+
</Fragment>
|
|
128
|
+
</Infrastructure>
|
|
129
|
+
|
|
130
|
+
## Local Development
|
|
131
|
+
|
|
132
|
+
The generator configures the agent's `serve-local` target to:
|
|
133
|
+
|
|
134
|
+
1. Start the connected Gateway's local gateway and every attached MCP server
|
|
135
|
+
2. Set `SERVE_LOCAL=true` so the generated client points at the local gateway instead of the deployed Gateway
|
|
136
|
+
|
|
137
|
+
Run the agent locally with:
|
|
138
|
+
|
|
139
|
+
<NxCommands commands={["<agent-name>-serve-local <project-name>"]} />
|
|
140
|
+
|
|
141
|
+
To run the agent locally **against the deployed Gateway** instead (for example, to exercise Cedar policies), use the agent's `serve` target. Without `SERVE_LOCAL` set, the client resolves the deployed Gateway URL from runtime configuration and SigV4-signs requests with your local AWS credentials:
|
|
142
|
+
|
|
143
|
+
<NxCommands commands={["<agent-name>-serve <project-name>"]} />
|
|
144
|
+
|
|
145
|
+
### Local fidelity
|
|
146
|
+
|
|
147
|
+
The local gateway stands in for the deployed Gateway, so:
|
|
148
|
+
|
|
149
|
+
- **No Cedar policy evaluation.** Every tool is visible to the agent regardless of policies. Use the `serve` target to exercise policies against the deployed Gateway.
|
|
150
|
+
- **Tool-name prefixing is preserved.** Each local MCP server's tools are wrapped to expose names of the form `<target-name>___<tool-name>`, matching what the deployed Gateway emits. This keeps an agent's system prompt and the Cedar action names you reference consistent across local and deployed runs.
|
|
@@ -148,6 +148,29 @@ The Connection generator supports the following connections:
|
|
|
148
148
|
source="mcp"
|
|
149
149
|
target="dynamodb"
|
|
150
150
|
/>
|
|
151
|
+
<ConnectionCard
|
|
152
|
+
title="AgentCore Gateway to MCP Server"
|
|
153
|
+
description="Aggregate an MCP server behind an AgentCore Gateway"
|
|
154
|
+
href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/agentcore-gateway-mcp`}
|
|
155
|
+
source="agentcore"
|
|
156
|
+
target="mcp"
|
|
157
|
+
/>
|
|
158
|
+
<ConnectionCard
|
|
159
|
+
title="TypeScript Agent to AgentCore Gateway"
|
|
160
|
+
description="Connect a TypeScript Agent to an AgentCore Gateway"
|
|
161
|
+
href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/ts-agent-gateway`}
|
|
162
|
+
source="strands"
|
|
163
|
+
sourceBadge="typescript"
|
|
164
|
+
target="agentcore"
|
|
165
|
+
/>
|
|
166
|
+
<ConnectionCard
|
|
167
|
+
title="Python Agent to AgentCore Gateway"
|
|
168
|
+
description="Connect a Python Agent to an AgentCore Gateway"
|
|
169
|
+
href={`/nx-plugin-for-aws/${Astro.currentLocale || 'en'}/guides/connection/py-agent-gateway`}
|
|
170
|
+
source="strands"
|
|
171
|
+
sourceBadge="python"
|
|
172
|
+
target="agentcore"
|
|
173
|
+
/>
|
|
151
174
|
</CardGrid>
|
|
152
175
|
|
|
153
176
|
:::note[Runtime Configuration]
|
|
@@ -583,6 +583,7 @@ When this generator is run in our repository, it'll generate the following files
|
|
|
583
583
|
- docs/src/content/docs/guides/
|
|
584
584
|
- \<name>.mdx Documentation page for your generator
|
|
585
585
|
- packages/nx-plugin/generators.json Updated to include your generator
|
|
586
|
+
- packages/nx-plugin/sdk/\<prefix>.ts Updated to expose your generator from the SDK (for `ts#` and `py#` generators)
|
|
586
587
|
</FileTree>
|
|
587
588
|
|
|
588
589
|
You can then start to implement your generator.
|
package/docs/guides/py-agent.mdx
CHANGED
|
@@ -351,19 +351,58 @@ This command uses `uv run` to execute your Agent using the [Bedrock AgentCore Py
|
|
|
351
351
|
|
|
352
352
|
### Chat with Your Agent
|
|
353
353
|
|
|
354
|
-
The generator configures a `<your-agent-name>-chat` Nx target that
|
|
354
|
+
The generator configures a `<your-agent-name>-chat` Nx target that drops you into an interactive terminal chat with your agent.
|
|
355
|
+
|
|
356
|
+
The chat target runs standalone. By default it connects to your locally running agent, so start `<your-agent-name>-serve-local` first (in a separate terminal):
|
|
357
|
+
|
|
358
|
+
<NxCommands commands={['run your-project:agent-serve-local']} />
|
|
359
|
+
|
|
360
|
+
Then, in another terminal, start the chat:
|
|
355
361
|
|
|
356
362
|
<NxCommands commands={['run your-project:agent-chat']} />
|
|
357
363
|
|
|
358
|
-
|
|
364
|
+
The generator emits a `scripts/<your-agent-name>/chat.ts` for every protocol. It connects to the local agent by default, or to your deployed agent when `RUNTIME_CONFIG_APP_ID` is set (see [Chat with your deployed agent](#chat-with-your-deployed-agent) below).
|
|
365
|
+
|
|
366
|
+
For **HTTP** agents, the chat script uses a type-safe TypeScript client generated from the agent's OpenAPI spec. The generator also emits:
|
|
359
367
|
|
|
360
368
|
- `scripts/<your-agent-name>_openapi.py` — a small script that exports the agent's OpenAPI spec
|
|
361
369
|
- An `<your-agent-name>-openapi` Nx target that runs it
|
|
362
370
|
- An `<your-agent-name>-generate-client` Nx target that produces a type-safe TypeScript client under `scripts/<your-agent-name>/generated/`
|
|
363
|
-
- `scripts/<your-agent-name>/chat.ts` — a thin wrapper around the generated client
|
|
364
371
|
|
|
365
372
|
When you customize the agent's input shape (e.g. add new fields to `InvokeInput`), update `chat.ts` to pass the new fields when invoking the agent and the rest works automatically.
|
|
366
373
|
|
|
374
|
+
<OptionFilter when={{ infra: 'agentcore' }} description="Deployed agent chat details">
|
|
375
|
+
#### Chat with your deployed agent
|
|
376
|
+
|
|
377
|
+
To chat with your agent deployed to Bedrock AgentCore, set the `RUNTIME_CONFIG_APP_ID` environment variable to the AppConfig application id of the deployment (output as `RuntimeConfigApplicationId` by the deployed stack). The chat script resolves your agent's runtime ARN from runtime configuration and connects to the deployed endpoint:
|
|
378
|
+
|
|
379
|
+
<Tabs syncKey="auth">
|
|
380
|
+
<TabItem label="IAM" _filter={{ auth: 'iam' }}>
|
|
381
|
+
For IAM-authenticated agents, requests are signed with [SigV4](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html) using your default AWS credentials. Ensure the environment has AWS credentials with permission to invoke the runtime:
|
|
382
|
+
|
|
383
|
+
<NxCommands commands={['run your-project:agent-chat']} env={{ RUNTIME_CONFIG_APP_ID: '<app-id>' }} />
|
|
384
|
+
</TabItem>
|
|
385
|
+
|
|
386
|
+
<TabItem label="Cognito" _filter={{ auth: 'cognito' }}>
|
|
387
|
+
For Cognito-authenticated agents, provide a Cognito access token via the `AGENT_ACCESS_TOKEN` environment variable, which is sent as a bearer token:
|
|
388
|
+
|
|
389
|
+
<NxCommands commands={['run your-project:agent-chat']} env={{ RUNTIME_CONFIG_APP_ID: '<app-id>', AGENT_ACCESS_TOKEN: '<access-token>' }} />
|
|
390
|
+
|
|
391
|
+
You can obtain an access token using the AWS CLI's `cognito-idp admin-initiate-auth` command, for example:
|
|
392
|
+
|
|
393
|
+
```bash
|
|
394
|
+
aws cognito-idp admin-initiate-auth \
|
|
395
|
+
--user-pool-id <user-pool-id> \
|
|
396
|
+
--client-id <user-pool-client-id> \
|
|
397
|
+
--auth-flow ADMIN_NO_SRP_AUTH \
|
|
398
|
+
--auth-parameters USERNAME=<username>,PASSWORD=<password> \
|
|
399
|
+
--query 'AuthenticationResult.AccessToken' \
|
|
400
|
+
--output text
|
|
401
|
+
```
|
|
402
|
+
</TabItem>
|
|
403
|
+
</Tabs>
|
|
404
|
+
</OptionFilter>
|
|
405
|
+
|
|
367
406
|
<OptionFilter when={{ infra: 'agentcore' }} description="Bedrock AgentCore Runtime deployment details">
|
|
368
407
|
## Deploying Your Agent to Bedrock AgentCore Runtime
|
|
369
408
|
|
package/docs/guides/ts-agent.mdx
CHANGED
|
@@ -269,11 +269,49 @@ This command uses `tsx --watch` to automatically restart the server when files c
|
|
|
269
269
|
|
|
270
270
|
### Chat with Your Agent
|
|
271
271
|
|
|
272
|
-
The generator configures a `<your-agent-name>-chat` Nx target that
|
|
272
|
+
The generator configures a `<your-agent-name>-chat` Nx target that drops you into an interactive terminal chat with your agent.
|
|
273
|
+
|
|
274
|
+
The chat target runs standalone. By default it connects to your locally running agent, so start `<your-agent-name>-serve-local` first (in a separate terminal):
|
|
275
|
+
|
|
276
|
+
<NxCommands commands={['run your-project:agent-serve-local']} />
|
|
277
|
+
|
|
278
|
+
Then, in another terminal, start the chat:
|
|
273
279
|
|
|
274
280
|
<NxCommands commands={['run your-project:agent-chat']} />
|
|
275
281
|
|
|
276
|
-
|
|
282
|
+
The generator emits a `scripts/<your-agent-name>/chat.ts` for every protocol. You can customize it as you evolve the agent's input shape. It connects to the local agent by default, or to your deployed agent when `RUNTIME_CONFIG_APP_ID` is set (see [Chat with your deployed agent](#chat-with-your-deployed-agent) below).
|
|
283
|
+
|
|
284
|
+
<OptionFilter when={{ infra: 'agentcore' }} description="Deployed agent chat details">
|
|
285
|
+
#### Chat with your deployed agent
|
|
286
|
+
|
|
287
|
+
To chat with your agent deployed to Bedrock AgentCore, set the `RUNTIME_CONFIG_APP_ID` environment variable to the AppConfig application id of the deployment (output as `RuntimeConfigApplicationId` by the deployed stack). The chat script resolves your agent's runtime ARN from runtime configuration and connects to the deployed endpoint:
|
|
288
|
+
|
|
289
|
+
<Tabs syncKey="auth">
|
|
290
|
+
<TabItem label="IAM" _filter={{ auth: 'iam' }}>
|
|
291
|
+
For IAM-authenticated agents, requests are signed with [SigV4](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_sigv.html) using your default AWS credentials. Ensure the environment has AWS credentials with permission to invoke the runtime:
|
|
292
|
+
|
|
293
|
+
<NxCommands commands={['run your-project:agent-chat']} env={{ RUNTIME_CONFIG_APP_ID: '<app-id>' }} />
|
|
294
|
+
</TabItem>
|
|
295
|
+
|
|
296
|
+
<TabItem label="Cognito" _filter={{ auth: 'cognito' }}>
|
|
297
|
+
For Cognito-authenticated agents, provide a Cognito access token via the `AGENT_ACCESS_TOKEN` environment variable, which is sent as a bearer token:
|
|
298
|
+
|
|
299
|
+
<NxCommands commands={['run your-project:agent-chat']} env={{ RUNTIME_CONFIG_APP_ID: '<app-id>', AGENT_ACCESS_TOKEN: '<access-token>' }} />
|
|
300
|
+
|
|
301
|
+
You can obtain an access token using the AWS CLI's `cognito-idp admin-initiate-auth` command, for example:
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
aws cognito-idp admin-initiate-auth \
|
|
305
|
+
--user-pool-id <user-pool-id> \
|
|
306
|
+
--client-id <user-pool-client-id> \
|
|
307
|
+
--auth-flow ADMIN_NO_SRP_AUTH \
|
|
308
|
+
--auth-parameters USERNAME=<username>,PASSWORD=<password> \
|
|
309
|
+
--query 'AuthenticationResult.AccessToken' \
|
|
310
|
+
--output text
|
|
311
|
+
```
|
|
312
|
+
</TabItem>
|
|
313
|
+
</Tabs>
|
|
314
|
+
</OptionFilter>
|
|
277
315
|
|
|
278
316
|
<OptionFilter when={{ infra: 'agentcore' }} description="Bedrock AgentCore Runtime deployment details">
|
|
279
317
|
## Deploying Your Agent to Bedrock AgentCore Runtime
|
package/generators.json
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
"name": "@aws/nx-plugin",
|
|
4
4
|
"version": "0.0.1",
|
|
5
5
|
"generators": {
|
|
6
|
+
"agentcore-gateway": {
|
|
7
|
+
"factory": "./src/agentcore-gateway/generator",
|
|
8
|
+
"schema": "./src/agentcore-gateway/schema.json",
|
|
9
|
+
"description": "Generate an AgentCore Gateway project",
|
|
10
|
+
"metric": "g48"
|
|
11
|
+
},
|
|
12
|
+
"agentcore-gateway#mcp-connection": {
|
|
13
|
+
"factory": "./src/agentcore-gateway/mcp-connection/generator",
|
|
14
|
+
"schema": "./src/agentcore-gateway/mcp-connection/schema.json",
|
|
15
|
+
"description": "Connect an AgentCore Gateway to an MCP server",
|
|
16
|
+
"metric": "g49",
|
|
17
|
+
"hidden": true
|
|
18
|
+
},
|
|
6
19
|
"connection": {
|
|
7
20
|
"factory": "./src/connection/generator",
|
|
8
21
|
"schema": "./src/connection/schema.json",
|
|
@@ -23,7 +36,10 @@
|
|
|
23
36
|
"connection/trpc-rdb",
|
|
24
37
|
"connection/smithy-rdb",
|
|
25
38
|
"connection/ts-mcp-server-rdb",
|
|
26
|
-
"connection/ts-agent-rdb"
|
|
39
|
+
"connection/ts-agent-rdb",
|
|
40
|
+
"connection/ts-agent-gateway",
|
|
41
|
+
"connection/py-agent-gateway",
|
|
42
|
+
"connection/agentcore-gateway-mcp"
|
|
27
43
|
]
|
|
28
44
|
},
|
|
29
45
|
"license": {
|
|
@@ -279,6 +295,13 @@
|
|
|
279
295
|
"metric": "g35",
|
|
280
296
|
"hidden": true
|
|
281
297
|
},
|
|
298
|
+
"ts#agent#gateway-connection": {
|
|
299
|
+
"factory": "./src/ts/agent/gateway-connection/generator",
|
|
300
|
+
"schema": "./src/ts/agent/gateway-connection/schema.json",
|
|
301
|
+
"description": "Connect a TypeScript Agent to an AgentCore Gateway",
|
|
302
|
+
"metric": "g50",
|
|
303
|
+
"hidden": true
|
|
304
|
+
},
|
|
282
305
|
"py#agent#a2a-connection": {
|
|
283
306
|
"factory": "./src/py/agent/a2a-connection/generator",
|
|
284
307
|
"schema": "./src/py/agent/a2a-connection/schema.json",
|
|
@@ -286,6 +309,13 @@
|
|
|
286
309
|
"metric": "g36",
|
|
287
310
|
"hidden": true
|
|
288
311
|
},
|
|
312
|
+
"py#agent#gateway-connection": {
|
|
313
|
+
"factory": "./src/py/agent/gateway-connection/generator",
|
|
314
|
+
"schema": "./src/py/agent/gateway-connection/schema.json",
|
|
315
|
+
"description": "Connect a Python Agent to an AgentCore Gateway",
|
|
316
|
+
"metric": "g51",
|
|
317
|
+
"hidden": true
|
|
318
|
+
},
|
|
289
319
|
"ts#sync": {
|
|
290
320
|
"factory": "./src/ts/sync/generator",
|
|
291
321
|
"schema": "./src/ts/sync/schema.json",
|
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "agentcore-gateway#mcp-connection",
|
|
4
|
+
"title": "agentcore-gateway#mcp-connection",
|
|
5
|
+
"description": "Connect an AgentCore Gateway to an MCP server",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"sourceProject": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The gateway project"
|
|
11
|
+
},
|
|
12
|
+
"targetProject": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The MCP server project"
|
|
15
|
+
},
|
|
16
|
+
"sourceComponent": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The gateway component in the source project"
|
|
19
|
+
},
|
|
20
|
+
"targetComponent": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The MCP server component in the target project"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["sourceProject", "targetProject"]
|
|
26
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "agentcore-gateway",
|
|
4
|
+
"title": "agentcore-gateway",
|
|
5
|
+
"description": "Generate an AgentCore Gateway project",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"name": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The name of your AgentCore Gateway project",
|
|
11
|
+
"$default": {
|
|
12
|
+
"$source": "argv",
|
|
13
|
+
"index": 0
|
|
14
|
+
},
|
|
15
|
+
"x-prompt": "What would you like to call your AgentCore Gateway?",
|
|
16
|
+
"x-priority": "important"
|
|
17
|
+
},
|
|
18
|
+
"directory": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Parent directory where the gateway project is placed.",
|
|
21
|
+
"default": "packages"
|
|
22
|
+
},
|
|
23
|
+
"subDirectory": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"description": "The sub directory the project is placed in. By default this is the project name."
|
|
26
|
+
},
|
|
27
|
+
"protocol": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "The inbound protocol exposed by your gateway. Only mcp is supported today; additional protocols may be added in future.",
|
|
30
|
+
"enum": ["mcp"],
|
|
31
|
+
"default": "mcp",
|
|
32
|
+
"x-priority": "important"
|
|
33
|
+
},
|
|
34
|
+
"auth": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "The method used to authenticate inbound requests to your gateway. Only iam is supported today; cognito and custom-jwt may be added in future.",
|
|
37
|
+
"enum": ["iam"],
|
|
38
|
+
"default": "iam",
|
|
39
|
+
"x-priority": "important"
|
|
40
|
+
},
|
|
41
|
+
"cedarPolicy": {
|
|
42
|
+
"type": "boolean",
|
|
43
|
+
"description": "Whether to include a Cedar policy engine enforcing fine-grained authorization on the gateway.",
|
|
44
|
+
"default": true,
|
|
45
|
+
"x-priority": "important"
|
|
46
|
+
},
|
|
47
|
+
"infra": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "The type of infrastructure to host your gateway. Select none for no hosting.",
|
|
50
|
+
"x-prompt": "How would you like to host your gateway?",
|
|
51
|
+
"enum": ["agentcore", "none"],
|
|
52
|
+
"default": "agentcore",
|
|
53
|
+
"x-priority": "important"
|
|
54
|
+
},
|
|
55
|
+
"iac": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"description": "The preferred IaC provider. By default this is inherited from your initial selection.",
|
|
58
|
+
"enum": ["inherit", "cdk", "terraform"],
|
|
59
|
+
"x-priority": "important",
|
|
60
|
+
"default": "inherit",
|
|
61
|
+
"x-prompt": "Which provider would you like to manage your infrastructure? (default: inherit)"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": ["name"]
|
|
65
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "py#agent#gateway-connection",
|
|
4
|
+
"title": "py#agent#gateway-connection",
|
|
5
|
+
"description": "Connect a Python Agent to an AgentCore Gateway",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"sourceProject": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The Python Agent project"
|
|
11
|
+
},
|
|
12
|
+
"targetProject": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The AgentCore Gateway project"
|
|
15
|
+
},
|
|
16
|
+
"sourceComponent": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The agent component in the source project"
|
|
19
|
+
},
|
|
20
|
+
"targetComponent": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The gateway component in the target project"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["sourceProject", "targetProject"]
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/schema",
|
|
3
|
+
"$id": "ts#agent#gateway-connection",
|
|
4
|
+
"title": "ts#agent#gateway-connection",
|
|
5
|
+
"description": "Connect a TypeScript Agent to an AgentCore Gateway",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"sourceProject": {
|
|
9
|
+
"type": "string",
|
|
10
|
+
"description": "The TypeScript Agent project"
|
|
11
|
+
},
|
|
12
|
+
"targetProject": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "The AgentCore Gateway project"
|
|
15
|
+
},
|
|
16
|
+
"sourceComponent": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "The agent component in the source project"
|
|
19
|
+
},
|
|
20
|
+
"targetComponent": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "The gateway component in the target project"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"required": ["sourceProject", "targetProject"]
|
|
26
|
+
}
|