Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 33 additions & 10 deletions src/assets/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,47 @@

This directory stores:

- Template assets for agents written in different Languages, SDKs and having different configurations
- Template assets for agents written in different languages, SDKs, and configurations
- Container templates (`container/python/`) with `Dockerfile` and `.dockerignore` for Container build agents
- Vended documentation (`README.md`, `agents/AGENTS.md`) copied into user projects at create time
- CDK project template (`cdk/`) using `@aws/agentcore-cdk` L3 constructs
- Evaluator templates (`evaluators/`) for code-based evaluators
- MCP tool templates (`mcp/`) for Lambda and AgentCoreRuntime compute

### Directory Layout

```
assets/
├── python/ # Framework templates (one per SDK)
│ ├── strands/
│ ├── langchain_langgraph/
│ ├── googleadk/
│ ├── openaiagents/
│ └── autogen/
├── README.md # Vended to project root as project README
├── AGENTS.md # This file — internal dev context
├── agents/
│ └── AGENTS.md # Vended to project root for AI coding assistants
├── python/ # Framework templates (one per SDK per protocol)
│ ├── http/ # HTTP protocol agents
│ │ ├── strands/
│ │ ├── langchain_langgraph/
│ │ ├── googleadk/
│ │ ├── openaiagents/
│ │ └── autogen/
│ ├── mcp/ # MCP protocol agents
│ │ └── standalone/
│ └── a2a/ # A2A protocol agents
│ ├── strands/
│ ├── langchain_langgraph/
│ └── googleadk/
├── typescript/ # TypeScript agent templates
├── container/ # Container build templates
│ └── python/
│ ├── Dockerfile
│ └── dockerignore.template
└── agents/ # AGENTS.md vended to user projects
├── cdk/ # CDK project template (@aws/agentcore-cdk)
├── evaluators/ # Code-based evaluator templates
└── mcp/ # MCP tool templates (Lambda + AgentCoreRuntime)
├── python/
└── python-lambda/
```

The rendering logic is rooted in the `AgentEnvSpec` and must ALWAYS respect the configuration in the Spec.
The rendering logic is rooted in the `AgentEnvSpec` and must ALWAYS respect the configuration in the spec.

For Container builds, `BaseRenderer.render()` automatically copies the `container/<language>/` templates (Dockerfile,
.dockerignore) into the agent directory when `buildType === 'Container'`.
Expand All @@ -31,7 +51,10 @@ For Container builds, `BaseRenderer.render()` automatically copies the `containe

- Always make sure the templates are as close to working code as possible
- AVOID as much as possible using any conditionals within the templates
- Test template rendering with `agentcore add agent` for each framework/protocol combination

## How to use the assets in this directory

- These assets are rendered by the CLI's template renderer in `src/cli/templates/`.
- These assets are rendered by the CLI's template renderer in `src/cli/templates/`
- The `README.md` and `agents/AGENTS.md` are copied verbatim (no template rendering) during project creation
- The `.llm-context/` files are sourced from `src/schema/llm-compacted/` and written during init
87 changes: 56 additions & 31 deletions src/assets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,29 @@ This project was created with the [AgentCore CLI](https://github.com/aws/agentco
## Project Structure

```
.
my-project/
├── AGENTS.md # AI coding assistant context
├── agentcore/
│ ├── .env.local # API keys (gitignored)
│ ├── agentcore.json # Resource specifications
│ ├── aws-targets.json # Deployment targets
│ └── cdk/ # CDK infrastructure
├── app/ # Application code
│ ├── agentcore.json # Project config (agents, memories, credentials, gateways, evaluators)
│ ├── aws-targets.json # Deployment targets (account + region)
│ ├── .env.local # Secrets — API keys (gitignored)
│ ├── .llm-context/ # TypeScript type definitions for AI assistants
│ │ ├── agentcore.ts # AgentCoreProjectSpec types
│ │ ├── aws-targets.ts # Deployment target types
│ │ └── mcp.ts # Gateway and MCP tool types
│ └── cdk/ # CDK infrastructure (@aws/agentcore-cdk)
├── app/ # Agent application code
└── evaluators/ # Custom evaluator code (if any)
```

## Getting Started

### Prerequisites

- **Node.js** 20.x or later
- **uv** for Python agents ([install](https://docs.astral.sh/uv/getting-started/installation/))
- **Python 3.10+** and **uv** for Python agents ([install uv](https://docs.astral.sh/uv/getting-started/installation/))
- **AWS credentials** configured (`aws configure` or environment variables)
- **Docker** (only for Container build agents)

### Development

Expand All @@ -38,42 +45,60 @@ Deploy to AWS:
agentcore deploy
```

Or use CDK directly:
## Commands

```bash
cd agentcore/cdk
npx cdk deploy
```
| Command | Description |
| --- | --- |
| `agentcore create` | Create a new AgentCore project |
| `agentcore add` | Add resources (agent, memory, credential, gateway, evaluator, policy) |
| `agentcore remove` | Remove resources |
| `agentcore dev` | Run agent locally with hot-reload |
| `agentcore deploy` | Deploy to AWS via CDK |
| `agentcore status` | Show deployment status |
| `agentcore invoke` | Invoke agent (local or deployed) |
| `agentcore logs` | View agent logs |
| `agentcore traces` | View agent traces |
| `agentcore eval` | Run evaluations |
| `agentcore package` | Package agent artifacts |
| `agentcore validate` | Validate configuration |
| `agentcore pause` | Pause a deployed agent |
| `agentcore resume` | Resume a paused agent |
| `agentcore fetch` | Fetch remote resource definitions |
| `agentcore import` | Import existing resources |
| `agentcore update` | Check for CLI updates |

## Configuration

Edit the JSON files in `agentcore/` to configure your agents, memory, and credentials. See `agentcore/.llm-context/` for
type definitions and validation constraints.
Edit the JSON files in `agentcore/` to configure your project. See `agentcore/.llm-context/` for type definitions and validation constraints.

The project uses a **flat resource model** where agents, memories, and credentials are top-level arrays in
`agentcore.json`.
The project uses a **flat resource model** — agents, memories, credentials, gateways, evaluators, and policies are top-level arrays in `agentcore.json`. Resources are independent; agents discover memories and credentials at runtime via environment variables or SDK calls.

## Commands
## Resources

| Command | Description |
| -------------------- | ----------------------------------------------- |
| `agentcore create` | Create a new AgentCore project |
| `agentcore add` | Add resources (agent, memory, credential, target) |
| `agentcore remove` | Remove resources |
| `agentcore dev` | Run agent locally |
| `agentcore deploy` | Deploy to AWS |
| `agentcore status` | Show deployment status |
| `agentcore invoke` | Invoke agent (local or deployed) |
| `agentcore package` | Package agent artifacts |
| `agentcore validate` | Validate configuration |
| `agentcore update` | Check for CLI updates |
| Resource | Purpose |
| --- | --- |
| Agent (runtime) | HTTP, MCP, or A2A agent deployed to AgentCore Runtime |
| Memory | Persistent context storage with configurable strategies |
| Credential | API key or OAuth credential providers |
| Gateway | MCP gateway that routes tool calls to targets |
| Gateway Target | Tool implementation (Lambda, MCP server, OpenAPI, Smithy, API Gateway) |
| Evaluator | Custom LLM-as-a-Judge or code-based evaluation |
| Online Eval Config | Continuous evaluation pipeline for deployed agents |
| Policy | Cedar authorization policies for gateway tools |

### Agent Types

- **Template agents**: Created from framework templates (Strands, LangChain_LangGraph, CrewAI, GoogleADK, OpenAIAgents)
- **Template agents**: Created from framework templates (Strands, LangChain/LangGraph, GoogleADK, OpenAI Agents, Autogen)
- **BYO agents**: Bring your own code with `agentcore add agent --type byo`
- **Import agents**: Import existing Bedrock agents with `agentcore import`

### Build Types

- **CodeZip**: Python source packaged as a zip and deployed directly to AgentCore Runtime
- **Container**: Docker image built via CodeBuild (ARM64), pushed to ECR, and deployed to AgentCore Runtime

## Documentation

- [AgentCore CLI Documentation](https://github.com/aws/agentcore-cli)
- [AgentCore CLI](https://github.com/aws/agentcore-cli)
- [AgentCore CDK Constructs](https://github.com/aws/agentcore-l3-cdk-constructs)
- [Amazon Bedrock AgentCore](https://aws.amazon.com/bedrock/agentcore/)
Loading
Loading