Skip to content

Commit 6e56498

Browse files
Merge branch 'main' into refactor/unify-cli-naming-breaking
2 parents 97eb9cd + 9783cf7 commit 6e56498

47 files changed

Lines changed: 318 additions & 142 deletions

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: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,28 @@ src/
2121

2222
Note: CDK L3 constructs are in a separate package `@aws/agentcore-cdk`.
2323

24+
## Global Options
25+
26+
These options are available on all commands:
27+
28+
- `-h, --help` - Show help for any command
29+
- `--version` - Print CLI version (root command only)
30+
2431
## CLI Commands
2532

2633
- `create` - Create new AgentCore project
27-
- `add` - Add resources (agent, memory, identity, evaluator, online-eval, target)
28-
- `remove` - Remove resources (agent, memory, identity, evaluator, online-eval, target, all)
34+
- `add` - Add resources (agent, memory, identity, evaluator, online-eval, gateway, gateway-target, policy-engine,
35+
policy)
36+
- `remove` - Remove resources (agent, memory, identity, evaluator, online-eval, gateway, gateway-target, policy-engine,
37+
policy, all)
2938
- `deploy` - Deploy infrastructure to AWS
3039
- `status` - Check deployment status
3140
- `dev` - Local development server (CodeZip: uvicorn with hot-reload; Container: Docker build + run with volume mount)
3241
- `invoke` - Invoke agents (local or deployed)
3342
- `run eval` - Run on-demand evaluation against agent sessions
3443
- `evals history` - View past eval run results
44+
- `fetch access` - Fetch access info for a deployed gateway or agent
45+
- `import` - Import resources from a Bedrock AgentCore Starter Toolkit project
3546
- `pause online-eval` - Pause (disable) a deployed online eval config
3647
- `resume online-eval` - Resume (enable) a paused online eval config
3748
- `logs` - Stream or search agent runtime logs
@@ -45,8 +56,7 @@ Note: CDK L3 constructs are in a separate package `@aws/agentcore-cdk`.
4556

4657
### Agent Types
4758

48-
- **Template agents**: Created from framework templates (Strands, LangChain_LangGraph, CrewAI, GoogleADK, OpenAIAgents,
49-
AutoGen)
59+
- **Template agents**: Created from framework templates (Strands, LangChain_LangGraph, GoogleADK, OpenAIAgents)
5060
- **BYO agents**: Bring your own code with `agentcore add agent --type byo`
5161
- **Imported agents**: Import from Bedrock Agents with `agentcore add agent --type import`
5262

@@ -58,10 +68,10 @@ Note: CDK L3 constructs are in a separate package `@aws/agentcore-cdk`.
5868

5969
## Primitives Architecture
6070

61-
All resource types (agent, memory, identity, evaluator, online-eval, gateway, mcp-tool) are modeled as **primitives** --
62-
self-contained classes in `src/cli/primitives/` that own the full add/remove lifecycle for their resource type.
63-
Resources support config-driven tagging via `agentcore.json` and `mcp.json`, with tags flowing through to deployed
64-
CloudFormation resources.
71+
All resource types (agent, memory, identity, evaluator, online-eval, gateway, gateway-target, policy-engine, policy) are
72+
modeled as **primitives** -- self-contained classes in `src/cli/primitives/` that own the full add/remove lifecycle for
73+
their resource type. Resources support config-driven tagging via `agentcore.json` and `mcp.json`, with tags flowing
74+
through to deployed CloudFormation resources.
6575

6676
Each primitive extends `BasePrimitive` and implements: `add()`, `remove()`, `previewRemove()`, `getRemovable()`,
6777
`registerCommands()`, and `addScreen()`.
@@ -73,8 +83,10 @@ Current primitives:
7383
- `CredentialPrimitive` — credential/identity creation, .env management, removal
7484
- `EvaluatorPrimitive` — custom evaluator creation/removal with cross-reference validation
7585
- `OnlineEvalConfigPrimitive` — online eval config creation/removal
76-
- `GatewayPrimitive` — MCP gateway creation/removal
77-
- `GatewayTargetPrimitive` — MCP tool creation/removal with code generation
86+
- `GatewayPrimitive` — gateway creation/removal
87+
- `GatewayTargetPrimitive` — gateway target creation/removal with code generation
88+
- `PolicyEnginePrimitive` — Cedar policy engine creation/removal
89+
- `PolicyPrimitive` — Cedar policy creation/removal within policy engines
7890

7991
Singletons are created in `registry.ts` and wired into CLI commands via `cli.ts`. See `src/cli/AGENTS.md` for details on
8092
adding new primitives.

docs/commands.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Run `agentcore` without arguments to launch the interactive TUI. Flags marked `[
99

1010
| Command | Alias |
1111
| --------- | ----- |
12-
| `deploy` | `p` |
12+
| `deploy` | `dp` |
1313
| `dev` | `d` |
1414
| `invoke` | `i` |
1515
| `status` | `s` |
@@ -65,30 +65,30 @@ agentcore create \
6565
--memory none
6666
```
6767

68-
| Flag | Description |
69-
| ------------------------- | -------------------------------------------------------------------------------- |
70-
| `--name <name>` | Project name (alphanumeric, starts with letter, max 23 chars) |
71-
| `--defaults` | Use defaults (Python, Strands, Bedrock, no memory) |
72-
| `--no-agent` | Skip agent creation |
73-
| `--type <type>` | `create` (default) or `import` |
74-
| `--language <lang>` | `Python` (default) |
75-
| `--framework <fw>` | `Strands`, `LangChain_LangGraph`, `CrewAI`, `GoogleADK`, `OpenAIAgents` |
76-
| `--model-provider <p>` | `Bedrock`, `Anthropic`, `OpenAI`, `Gemini` |
77-
| `--build <type>` | `CodeZip` (default) or `Container` (see [Container Builds](container-builds.md)) |
78-
| `--api-key <key>` | API key for non-Bedrock providers |
79-
| `--memory <opt>` | `none`, `shortTerm`, `longAndShortTerm` |
80-
| `--protocol <protocol>` | `HTTP` (default), `MCP`, `A2A` |
81-
| `--network-mode <mode>` | `PUBLIC` (default) or `VPC` |
82-
| `--subnets <ids>` | Comma-separated subnet IDs (required for VPC mode) |
83-
| `--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) |
87-
| `--output-dir <dir>` | Output directory |
88-
| `--skip-git` | Skip git initialization |
89-
| `--skip-python-setup` | Skip venv setup |
90-
| `--dry-run` | Preview without creating |
91-
| `--json` | JSON output |
68+
| Flag | Description |
69+
| ------------------------- | -------------------------------------------------------------------------------------------------------------- |
70+
| `--name <name>` | Project name (alphanumeric, starts with letter, max 23 chars) |
71+
| `--defaults` | Use defaults (Python, Strands, Bedrock, no memory) |
72+
| `--no-agent` | Skip agent creation |
73+
| `--type <type>` | `create` (default) or `import` |
74+
| `--language <lang>` | `Python` (default) |
75+
| `--framework <fw>` | `Strands`, `LangChain_LangGraph`, `CrewAI`, `GoogleADK`, `OpenAIAgents` |
76+
| `--model-provider <p>` | `Bedrock`, `Anthropic`, `OpenAI`, `Gemini` |
77+
| `--build <type>` | `CodeZip` (default) or `Container` (see [Container Builds](container-builds.md)) |
78+
| `--api-key <key>` | API key for non-Bedrock providers |
79+
| `--memory <opt>` | `none`, `shortTerm`, `longAndShortTerm` (see [Memory Shorthand Mapping](memory.md#--memory-shorthand-mapping)) |
80+
| `--protocol <protocol>` | `HTTP` (default), `MCP`, `A2A` |
81+
| `--network-mode <mode>` | `PUBLIC` (default) or `VPC` |
82+
| `--subnets <ids>` | Comma-separated subnet IDs (required for VPC mode) |
83+
| `--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) |
87+
| `--output-dir <dir>` | Output directory |
88+
| `--skip-git` | Skip git initialization |
89+
| `--skip-python-setup` | Skip venv setup |
90+
| `--dry-run` | Preview without creating |
91+
| `--json` | JSON output |
9292

9393
### deploy
9494

@@ -193,26 +193,26 @@ agentcore add agent \
193193
--memory none
194194
```
195195

196-
| Flag | Description |
197-
| ------------------------- | -------------------------------------------------------------------------------- |
198-
| `--name <name>` | Agent name (alphanumeric, starts with letter, max 64 chars) |
199-
| `--type <type>` | `create` (default), `byo`, or `import` |
200-
| `--build <type>` | `CodeZip` (default) or `Container` (see [Container Builds](container-builds.md)) |
201-
| `--language <lang>` | `Python` (create); `Python`, `TypeScript`, `Other` (BYO) |
202-
| `--framework <fw>` | `Strands`, `LangChain_LangGraph`, `CrewAI`, `GoogleADK`, `OpenAIAgents` |
203-
| `--model-provider <p>` | `Bedrock`, `Anthropic`, `OpenAI`, `Gemini` |
204-
| `--api-key <key>` | API key for non-Bedrock providers |
205-
| `--memory <opt>` | `none`, `shortTerm`, `longAndShortTerm` (create and import) |
206-
| `--protocol <protocol>` | `HTTP` (default), `MCP`, `A2A` |
207-
| `--code-location <path>` | Path to existing code (BYO only) |
208-
| `--entrypoint <file>` | Entry file relative to code-location (BYO, default: `main.py`) |
209-
| `--network-mode <mode>` | `PUBLIC` (default) or `VPC` |
210-
| `--subnets <ids>` | Comma-separated subnet IDs (required for VPC mode) |
211-
| `--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) |
215-
| `--json` | JSON output |
196+
| Flag | Description |
197+
| ------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
198+
| `--name <name>` | Agent name (alphanumeric, starts with letter, max 64 chars) |
199+
| `--type <type>` | `create` (default), `byo`, or `import` |
200+
| `--build <type>` | `CodeZip` (default) or `Container` (see [Container Builds](container-builds.md)) |
201+
| `--language <lang>` | `Python` (create); `Python`, `TypeScript`, `Other` (BYO) |
202+
| `--framework <fw>` | `Strands`, `LangChain_LangGraph`, `CrewAI`, `GoogleADK`, `OpenAIAgents` |
203+
| `--model-provider <p>` | `Bedrock`, `Anthropic`, `OpenAI`, `Gemini` |
204+
| `--api-key <key>` | API key for non-Bedrock providers |
205+
| `--memory <opt>` | `none`, `shortTerm`, `longAndShortTerm` (create and import; see [Memory Shorthand Mapping](memory.md#--memory-shorthand-mapping)) |
206+
| `--protocol <protocol>` | `HTTP` (default), `MCP`, `A2A` |
207+
| `--code-location <path>` | Path to existing code (BYO only) |
208+
| `--entrypoint <file>` | Entry file relative to code-location (BYO, default: `main.py`) |
209+
| `--network-mode <mode>` | `PUBLIC` (default) or `VPC` |
210+
| `--subnets <ids>` | Comma-separated subnet IDs (required for VPC mode) |
211+
| `--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) |
215+
| `--json` | JSON output |
216216

217217
### add memory
218218

@@ -542,7 +542,7 @@ agentcore logs --json # JSON Lines output
542542
| `--since <time>` | Start time (defaults to 1h ago in search mode; e.g. `1h`, `30m`, `2d`, ISO 8601) |
543543
| `--until <time>` | End time (defaults to now in search mode; e.g. `now`, ISO 8601) |
544544
| `--level <level>` | Filter by log level: `error`, `warn`, `info`, `debug` |
545-
| `-n, --lines <n>` | Maximum number of log lines to return |
545+
| `-n, --limit <n>` | Maximum number of log lines to return |
546546
| `--query <text>` | Server-side text filter |
547547
| `--json` | Output as JSON Lines |
548548

@@ -675,7 +675,7 @@ agentcore logs evals --follow --json
675675
| `-a, --agent <name>` | Filter by agent |
676676
| `--since <time>` | Start time (e.g. `1h`, `30m`, `2d`, ISO 8601) |
677677
| `--until <time>` | End time |
678-
| `-n, --lines <count>` | Maximum log lines |
678+
| `-n, --limit <count>` | Maximum log lines |
679679
| `-f, --follow` | Stream in real-time |
680680
| `--json` | JSON Lines output |
681681

docs/memory.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,23 @@ async def invoke(payload, context):
149149
agentcore deploy
150150
```
151151

152+
## `--memory` Shorthand Mapping
153+
154+
The `create` and `add agent` commands accept a `--memory` flag with one of three shorthand values. Each maps to a
155+
specific memory configuration:
156+
157+
| Shorthand | Strategies Created |
158+
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
159+
| `none` | No memory resource created |
160+
| `shortTerm` | Memory with no strategies (session context via event expiry only, default 30 days) |
161+
| `longAndShortTerm` | Memory with four strategies: `SEMANTIC` (`/users/{actorId}/facts`), `USER_PREFERENCE` (`/users/{actorId}/preferences`), `SUMMARIZATION` (`/summaries/{actorId}/{sessionId}`), `EPISODIC` (`/episodes/{actorId}/{sessionId}`, reflection: `/episodes/{actorId}`) |
162+
163+
**Short-term memory** provides basic conversation context within a session — events are stored and expire after the
164+
configured duration, but no long-term extraction or search is performed.
165+
166+
**Long-and-short-term memory** adds persistent strategies that extract facts, preferences, summaries, and episodes from
167+
conversations, enabling cross-session recall via semantic search.
168+
152169
## Memory Strategies
153170

154171
| Strategy | Description |

0 commit comments

Comments
 (0)