@@ -151,21 +151,114 @@ agentcore add memory \
151151| ` --expiry <days> ` | Event expiry (default: 30) |
152152| ` --json ` | JSON output |
153153
154+ ### add gateway
155+
156+ Add a gateway to the project. Gateways act as MCP-compatible proxies that route agent requests to backend tools.
157+
158+ ``` bash
159+ # Interactive mode (select 'Gateway' from the menu)
160+ agentcore add
161+
162+ # No authorization (development/testing)
163+ agentcore add gateway --name MyGateway
164+
165+ # CUSTOM_JWT authorization (production)
166+ agentcore add gateway \
167+ --name MyGateway \
168+ --authorizer-type CUSTOM_JWT \
169+ --discovery-url https://idp.example.com/.well-known/openid-configuration \
170+ --allowed-audience my-api \
171+ --allowed-clients my-client-id \
172+ --agent-client-id agent-client-id \
173+ --agent-client-secret agent-client-secret
174+ ```
175+
176+ | Flag | Description |
177+ | -------------------------------- | ------------------------------------------------------------ |
178+ | ` --name <name> ` | Gateway name |
179+ | ` --description <desc> ` | Gateway description |
180+ | ` --authorizer-type <type> ` | ` NONE ` (default) or ` CUSTOM_JWT ` |
181+ | ` --discovery-url <url> ` | OIDC discovery URL (required for CUSTOM_JWT) |
182+ | ` --allowed-audience <values> ` | Comma-separated allowed audiences (required for CUSTOM_JWT) |
183+ | ` --allowed-clients <values> ` | Comma-separated allowed client IDs (required for CUSTOM_JWT) |
184+ | ` --allowed-scopes <scopes> ` | Comma-separated allowed scopes (optional for CUSTOM_JWT) |
185+ | ` --agent-client-id <id> ` | Agent OAuth client ID for Bearer token auth (CUSTOM_JWT) |
186+ | ` --agent-client-secret <secret> ` | Agent OAuth client secret (CUSTOM_JWT) |
187+ | ` --json ` | JSON output |
188+
189+ ### add gateway-target
190+
191+ Add a gateway target to the project. Targets are backend tools exposed through a gateway as an external MCP server
192+ endpoint.
193+
194+ ``` bash
195+ # Interactive mode (select 'Gateway Target' from the menu)
196+ agentcore add
197+
198+ # External MCP server endpoint
199+ agentcore add gateway-target \
200+ --name WeatherTools \
201+ --source existing-endpoint \
202+ --endpoint https://mcp.example.com/mcp \
203+ --gateway MyGateway
204+
205+ # External endpoint with OAuth outbound auth
206+ agentcore add gateway-target \
207+ --name SecureTools \
208+ --source existing-endpoint \
209+ --endpoint https://api.example.com/mcp \
210+ --gateway MyGateway \
211+ --outbound-auth oauth \
212+ --oauth-client-id my-client \
213+ --oauth-client-secret my-secret \
214+ --oauth-discovery-url https://auth.example.com/.well-known/openid-configuration
215+ ```
216+
217+ | Flag | Description |
218+ | -------------------------------- | ----------------------------------------------- |
219+ | ` --name <name> ` | Target name |
220+ | ` --description <desc> ` | Target description |
221+ | ` --source <source> ` | ` existing-endpoint ` |
222+ | ` --endpoint <url> ` | MCP server endpoint URL |
223+ | ` --gateway <name> ` | Gateway to attach target to |
224+ | ` --outbound-auth <type> ` | ` oauth ` , ` api-key ` , or ` none ` |
225+ | ` --credential-name <name> ` | Existing credential name for outbound auth |
226+ | ` --oauth-client-id <id> ` | OAuth client ID (creates credential inline) |
227+ | ` --oauth-client-secret <secret> ` | OAuth client secret (creates credential inline) |
228+ | ` --oauth-discovery-url <url> ` | OAuth discovery URL (creates credential inline) |
229+ | ` --oauth-scopes <scopes> ` | OAuth scopes, comma-separated |
230+ | ` --json ` | JSON output |
231+
154232### add identity
155233
156- Add a credential provider (API key). Credentials are top-level resources in the flat resource model .
234+ Add a credential to the project. Supports API key and OAuth credential types .
157235
158236``` bash
237+ # API key credential
159238agentcore add identity \
160239 --name OpenAI \
161240 --api-key sk-...
241+
242+ # OAuth credential
243+ agentcore add identity \
244+ --name MyOAuthProvider \
245+ --type oauth \
246+ --discovery-url https://idp.example.com/.well-known/openid-configuration \
247+ --client-id my-client-id \
248+ --client-secret my-client-secret \
249+ --scopes read,write
162250```
163251
164- | Flag | Description |
165- | ----------------- | --------------- |
166- | ` --name <name> ` | Credential name |
167- | ` --api-key <key> ` | API key value |
168- | ` --json ` | JSON output |
252+ | Flag | Description |
253+ | -------------------------- | -------------------------------- |
254+ | ` --name <name> ` | Credential name |
255+ | ` --type <type> ` | ` api-key ` (default) or ` oauth ` |
256+ | ` --api-key <key> ` | API key value (api-key type) |
257+ | ` --discovery-url <url> ` | OAuth discovery URL (oauth type) |
258+ | ` --client-id <id> ` | OAuth client ID (oauth type) |
259+ | ` --client-secret <secret> ` | OAuth client secret (oauth type) |
260+ | ` --scopes <scopes> ` | OAuth scopes, comma-separated |
261+ | ` --json ` | JSON output |
169262
170263### remove
171264
@@ -175,6 +268,8 @@ Remove resources from project.
175268agentcore remove agent --name MyAgent --force
176269agentcore remove memory --name SharedMemory
177270agentcore remove identity --name OpenAI
271+ agentcore remove gateway --name MyGateway
272+ agentcore remove gateway-target --name WeatherTools
178273
179274# Reset everything
180275agentcore remove all --force
@@ -281,6 +376,18 @@ agentcore add memory --name SharedMemory --strategies SEMANTIC
281376agentcore deploy -y
282377```
283378
379+ ### Gateway Setup
380+
381+ ``` bash
382+ agentcore add gateway --name MyGateway
383+ agentcore add gateway-target \
384+ --name WeatherTools \
385+ --source existing-endpoint \
386+ --endpoint https://mcp.example.com/mcp \
387+ --gateway MyGateway
388+ agentcore deploy -y
389+ ```
390+
284391### JSON Output for Automation
285392
286393All commands with ` --json ` output structured data:
0 commit comments