Skip to content

Commit b29c40b

Browse files
committed
Merge branch 'main' into fix/old-cli-conflict-detection
Resolve package-lock.json conflict.
2 parents 84a0d0c + dd9716c commit b29c40b

105 files changed

Lines changed: 8785 additions & 811 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ Note: CDK L3 constructs are in a separate package `@aws/agentcore-cdk`.
3939
- `traces list` - List recent traces for a deployed agent
4040
- `traces get` - Download a trace to a JSON file
4141
- `package` - Package agent artifacts without deploying (zip for CodeZip, container image build for Container)
42+
- `tag` - Manage resource tags (list, add, remove, set-defaults, remove-defaults)
4243
- `validate` - Validate configuration files
4344
- `update` - Check for CLI updates
4445
- `help` - Display help information
@@ -48,6 +49,7 @@ Note: CDK L3 constructs are in a separate package `@aws/agentcore-cdk`.
4849
- **Template agents**: Created from framework templates (Strands, LangChain_LangGraph, CrewAI, GoogleADK, OpenAIAgents,
4950
AutoGen)
5051
- **BYO agents**: Bring your own code with `agentcore add agent --type byo`
52+
- **Imported agents**: Import from Bedrock Agents with `agentcore add agent --type import`
5153

5254
### Build Types
5355

docs/commands.md

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,24 @@ agentcore create --name MyProject --no-agent
5353

5454
# Preview without creating
5555
agentcore create --name MyProject --defaults --dry-run
56+
57+
# Import from Bedrock Agents
58+
agentcore create \
59+
--name MyImportedAgent \
60+
--type import \
61+
--agent-id AGENT123 \
62+
--agent-alias-id ALIAS456 \
63+
--region us-east-1 \
64+
--framework Strands \
65+
--memory none
5666
```
5767

5868
| Flag | Description |
5969
| ------------------------- | -------------------------------------------------------------------------------- |
6070
| `--name <name>` | Project name (alphanumeric, starts with letter, max 23 chars) |
6171
| `--defaults` | Use defaults (Python, Strands, Bedrock, no memory) |
6272
| `--no-agent` | Skip agent creation |
73+
| `--type <type>` | `create` (default) or `import` |
6374
| `--language <lang>` | `Python` (default) |
6475
| `--framework <fw>` | `Strands`, `LangChain_LangGraph`, `CrewAI`, `GoogleADK`, `OpenAIAgents` |
6576
| `--model-provider <p>` | `Bedrock`, `Anthropic`, `OpenAI`, `Gemini` |
@@ -70,6 +81,9 @@ agentcore create --name MyProject --defaults --dry-run
7081
| `--network-mode <mode>` | `PUBLIC` (default) or `VPC` |
7182
| `--subnets <ids>` | Comma-separated subnet IDs (required for VPC mode) |
7283
| `--security-groups <ids>` | Comma-separated security group IDs (required for VPC mode) |
84+
| `--agent-id <id>` | Bedrock Agent ID (import only) |
85+
| `--agent-alias-id <id>` | Bedrock Agent Alias ID (import only) |
86+
| `--region <region>` | AWS region for Bedrock Agent (import only) |
7387
| `--output-dir <dir>` | Output directory |
7488
| `--skip-git` | Skip git initialization |
7589
| `--skip-python-setup` | Skip venv setup |
@@ -167,24 +181,37 @@ agentcore add agent \
167181
--network-mode VPC \
168182
--subnets subnet-abc,subnet-def \
169183
--security-groups sg-123
184+
185+
# Import from Bedrock Agents
186+
agentcore add agent \
187+
--name MyAgent \
188+
--type import \
189+
--agent-id AGENT123 \
190+
--agent-alias-id ALIAS456 \
191+
--region us-east-1 \
192+
--framework Strands \
193+
--memory none
170194
```
171195

172196
| Flag | Description |
173197
| ------------------------- | -------------------------------------------------------------------------------- |
174198
| `--name <name>` | Agent name (alphanumeric, starts with letter, max 64 chars) |
175-
| `--type <type>` | `create` (default) or `byo` |
199+
| `--type <type>` | `create` (default), `byo`, or `import` |
176200
| `--build <type>` | `CodeZip` (default) or `Container` (see [Container Builds](container-builds.md)) |
177201
| `--language <lang>` | `Python` (create); `Python`, `TypeScript`, `Other` (BYO) |
178202
| `--framework <fw>` | `Strands`, `LangChain_LangGraph`, `CrewAI`, `GoogleADK`, `OpenAIAgents` |
179203
| `--model-provider <p>` | `Bedrock`, `Anthropic`, `OpenAI`, `Gemini` |
180204
| `--api-key <key>` | API key for non-Bedrock providers |
181-
| `--memory <opt>` | `none`, `shortTerm`, `longAndShortTerm` (create only) |
205+
| `--memory <opt>` | `none`, `shortTerm`, `longAndShortTerm` (create and import) |
182206
| `--protocol <protocol>` | `HTTP` (default), `MCP`, `A2A` |
183207
| `--code-location <path>` | Path to existing code (BYO only) |
184208
| `--entrypoint <file>` | Entry file relative to code-location (BYO, default: `main.py`) |
185209
| `--network-mode <mode>` | `PUBLIC` (default) or `VPC` |
186210
| `--subnets <ids>` | Comma-separated subnet IDs (required for VPC mode) |
187211
| `--security-groups <ids>` | Comma-separated security group IDs (required for VPC mode) |
212+
| `--agent-id <id>` | Bedrock Agent ID (import only) |
213+
| `--agent-alias-id <id>` | Bedrock Agent Alias ID (import only) |
214+
| `--region <region>` | AWS region for Bedrock Agent (import only) |
188215
| `--json` | JSON output |
189216

190217
### add memory
@@ -438,6 +465,46 @@ agentcore remove all --dry-run # Preview
438465

439466
---
440467

468+
## Tagging
469+
470+
### tag
471+
472+
Manage AWS resource tags on your AgentCore project. Tags are applied to deployed CloudFormation resources (agents,
473+
memories, gateways). Credentials are not taggable since they're deployed via the AgentCore Identity API.
474+
475+
```bash
476+
# List all tags (project defaults + per-resource)
477+
agentcore tag list
478+
agentcore tag list --json
479+
agentcore tag list --resource agent:MyAgent
480+
481+
# Add a tag to a specific resource
482+
agentcore tag add --resource agent:MyAgent --key environment --value prod
483+
484+
# Remove a tag from a resource
485+
agentcore tag remove --resource agent:MyAgent --key environment
486+
487+
# Set a project-level default tag (inherited by all resources)
488+
agentcore tag set-defaults --key team --value platform
489+
490+
# Remove a project-level default tag
491+
agentcore tag remove-defaults --key team
492+
```
493+
494+
Resource references use `type:name` format. Taggable types: `agent`, `memory`, `gateway`.
495+
496+
Per-resource tags override project-level defaults when keys conflict. Projects created with the CLI include
497+
`agentcore:created-by` and `agentcore:project-name` as defaults.
498+
499+
| Flag | Description |
500+
| ------------------ | ------------------------------ |
501+
| `--resource <ref>` | Resource reference (type:name) |
502+
| `--key <key>` | Tag key (max 128 chars) |
503+
| `--value <value>` | Tag value (max 256 chars) |
504+
| `--json` | JSON output |
505+
506+
---
507+
441508
## Development
442509

443510
### dev

docs/configuration.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ Main project configuration using a **flat resource model**. Agents, memories, an
2222
{
2323
"name": "MyProject",
2424
"version": 1,
25+
"tags": {
26+
"agentcore:created-by": "agentcore-cli",
27+
"agentcore:project-name": "MyProject",
28+
"environment": "dev"
29+
},
2530
"agents": [
2631
{
2732
"type": "AgentCoreRuntime",
@@ -75,6 +80,7 @@ Main project configuration using a **flat resource model**. Agents, memories, an
7580
| ------------------- | -------- | ----------------------------------------------------------- |
7681
| `name` | Yes | Project name (1-23 chars, alphanumeric, starts with letter) |
7782
| `version` | Yes | Schema version (integer, currently `1`) |
83+
| `tags` | No | Project-level default tags (inherited by all resources) |
7884
| `agents` | Yes | Array of agent specifications |
7985
| `memories` | Yes | Array of memory resources |
8086
| `credentials` | Yes | Array of credential providers (API key or OAuth) |
@@ -114,6 +120,7 @@ Main project configuration using a **flat resource model**. Agents, memories, an
114120
| `networkMode` | No | `"PUBLIC"` (default) or `"PRIVATE"` |
115121
| `envVars` | No | Custom environment variables |
116122
| `instrumentation` | No | OpenTelemetry settings |
123+
| `tags` | No | Per-agent tags (override project defaults) |
117124

118125
### Runtime Versions
119126

@@ -137,12 +144,13 @@ Main project configuration using a **flat resource model**. Agents, memories, an
137144
}
138145
```
139146

140-
| Field | Required | Description |
141-
| --------------------- | -------- | --------------------------------------- |
142-
| `type` | Yes | Always `"AgentCoreMemory"` |
143-
| `name` | Yes | Memory name (1-48 chars) |
144-
| `eventExpiryDuration` | Yes | Days until events expire (7-365) |
145-
| `strategies` | Yes | Array of memory strategies (at least 1) |
147+
| Field | Required | Description |
148+
| --------------------- | -------- | ------------------------------------------- |
149+
| `type` | Yes | Always `"AgentCoreMemory"` |
150+
| `name` | Yes | Memory name (1-48 chars) |
151+
| `eventExpiryDuration` | Yes | Days until events expire (7-365) |
152+
| `strategies` | Yes | Array of memory strategies (at least 1) |
153+
| `tags` | No | Per-memory tags (override project defaults) |
146154

147155
### Memory Strategies
148156

@@ -329,6 +337,7 @@ Gateway and MCP tool configuration. Gateways, their targets, and standalone MCP
329337
| `targets` | Yes | Array of gateway targets |
330338
| `authorizerType` | No | `"NONE"` (default), `"AWS_IAM"`, or `"CUSTOM_JWT"` |
331339
| `authorizerConfiguration` | No | Required when `authorizerType` is `"CUSTOM_JWT"` (see below) |
340+
| `tags` | No | Per-gateway tags (override project defaults) |
332341

333342
### CUSTOM_JWT Authorizer Configuration
334343

docs/frameworks.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,51 @@ OpenAI's native agent framework.
7676
agentcore create --framework OpenAIAgents --model-provider OpenAI --api-key sk-...
7777
```
7878

79+
## Import from Bedrock Agents
80+
81+
If you have an existing Bedrock Agent, you can import its configuration and translate it into runnable Strands or
82+
LangChain/LangGraph code. The imported agent preserves your Bedrock Agent's action groups, knowledge bases, multi-agent
83+
collaboration, guardrails, prompts, and memory configuration.
84+
85+
```bash
86+
# Interactive (select "Import from Bedrock Agents" in the wizard)
87+
agentcore add agent
88+
89+
# Non-interactive
90+
agentcore add agent \
91+
--name MyAgent \
92+
--type import \
93+
--agent-id AGENT123 \
94+
--agent-alias-id ALIAS456 \
95+
--region us-east-1 \
96+
--framework Strands \
97+
--memory none
98+
```
99+
100+
### What gets imported
101+
102+
The import process fetches your Bedrock Agent's full configuration and translates it into framework-specific Python code
103+
that runs on AgentCore:
104+
105+
- **Action groups** (function-schema and built-in) become `@tool` decorated functions
106+
- **Knowledge bases** become retrieval tool integrations
107+
- **Multi-agent collaboration** produces separate collaborator files with recursive translation
108+
- **Code interpreter** wires to AgentCore's `code_interpreter_client`
109+
- **Guardrails** are configured in the model initialization
110+
- **Prompt overrides** are preserved as template variables
111+
- **Memory** integrates with AgentCore's memory service when enabled
112+
113+
### Import options
114+
115+
| Flag | Description |
116+
| ----------------------- | ----------------------------------------- |
117+
| `--type import` | Use import mode (required) |
118+
| `--agent-id <id>` | Bedrock Agent ID |
119+
| `--agent-alias-id <id>` | Bedrock Agent Alias ID |
120+
| `--region <region>` | AWS region where the Bedrock Agent exists |
121+
| `--framework <fw>` | `Strands` or `LangChain_LangGraph` |
122+
| `--memory <opt>` | `none`, `shortTerm`, `longAndShortTerm` |
123+
79124
## Bring Your Own (BYO) Agent
80125

81126
For existing agent code or frameworks not listed above, use the BYO option:

0 commit comments

Comments
 (0)