Contributor-focused guide for AI agents working on the AWS CDK codebase. AWS CDK is an open-source framework that lets developers define cloud infrastructure in code and provision it through AWS CloudFormation. This is a TypeScript monorepo that uses jsii to generate bindings for Python, Java, .NET, and Go. Constructs follow a layered model: L1 (auto-generated CloudFormation wrappers), L2 (intent-based APIs with smart defaults), and L3 (multi-resource patterns). See CONTRIBUTING.md for the full contributor guide. You are a CDK contributor. You…
Guidance for AI coding agents (Cursor, GitHub Copilot, Claude Code, Amazon Q Developer, Kiro, Codex, Gemini CLI, etc.) working in this repository. Follows the AGENTS.md convention (https://agents.md). This repository contains example notebooks for the Amazon SageMaker Python SDK v3. pip install sagemaker installs v3. SDK v3 is a modular redesign and is not backward compatible with v2. It is split into: Generate SageMaker Python SDK v3 code by default. Produce v2 code only when the user explicitly asks for "v2"…
Guidance for AI coding agents (Cursor, GitHub Copilot, Claude Code, Amazon Q Developer, Kiro, Codex, Gemini CLI, etc.) working in this repository — the source of the Amazon SageMaker Python SDK. Follows the AGENTS.md convention (https://agents.md). This file has two audiences: 1. Contributors' agents editing SDK source, tests, and docs in this repo. 2. Any agent that reads this repo as a reference for how to use the SDK — so the usage guidance (v3 by default) is stated here…
Correct behavior is necessary but not sufficient — structural quality is a hard requirement. Don't accept a messy implementation just because it passes tests. Read the relevant doc before working in that area:
This project contains configuration and infrastructure for an Amazon Bedrock AgentCore application. The agentcore/ directory is a declarative model of the project. The agentcore/cdk/ subdirectory uses the @aws/agentcore-cdk L3 constructs to deploy the configuration to AWS. The project uses a flat resource model. Agents, memories, credentials, gateways, evaluators, and policies are independent top-level arrays in agentcore.json. There is no binding between resources in the schema — each resource is provisioned independently. Agents discover memories and credentials at runtime via environment…
This project contains configuration and infrastructure for an Amazon Bedrock AgentCore application. The agentcore/ directory is a declarative model of the project. The agentcore/cdk/ subdirectory uses the @aws/agentcore-cdk L3 constructs to deploy the configuration to AWS. The project uses a flat resource model. Agents, memories, credentials, gateways, evaluators, and policies are independent top-level arrays in agentcore.json. There is no binding between resources in the schema — each resource is provisioned independently. Agents discover memories and credentials at runtime via environment…
This directory stores: 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'.
The cli module defines the terminal interface for Amazon AgentCore. Some functionalities are specifically tied to resource management, which is modeled in schemas and then implemented in CDK. Other functionalities are generic utilities like project template creation of application code and local development tooling are self-contained within the CLI. The TUI should feel streamlined, cohesive, and smooth. The important information should be highlighted and visual clutter should be avoided. Do not add descriptions which take up screen real-estate without offering…
This file defines context around specific commands surfaced by the CLI and related functionalities Each command directory follows a standardized structure: The command.tsx file must be boring Commander registration only: If removing a command file would remove behavior, the design is wrong. Some commands have additional files for their specific needs:
This directory contains the rendering logic for template processing. Template assets live in the assets/ directory at the repository root. The rendering logic is rooted in the AgentEnvSpec and must ALWAYS respect the configuration in the Spec. Tags defined in agentcore.json flow through to deployed CloudFormation resources. 1. createRenderer() selects a renderer based on framework/language 2. BaseRenderer.render() copies and renders the framework base template 3. If hasMemory, capability templates are layered on top 4. If buildType === 'Container', the container…
The TUI is defined using the ink npm package which converts React definitions to terminal output. The TUI layer defines a full immersive app that takes over the running shell process. To accomidate users running arbitrary commands while using the TUI, the ! input serves as an escape. At a high level, the TUI should be thought of more as a unified app than a CLI. Nevertheless, business logic, async work, and process orchestration must live outside the UI and…
The lib module contains functionalities and utilities that are used by both the cli and the cdk modules. This module serves the important goal of making sure that the CDK implementations don't take a direct dependency on the CLI. Packaging: Producing deployment artifacts for AgentCore runtimes. Two packagers are available: - PythonPackager / NodePackager (CodeZip): Installs dependencies and produces a .zip artifact targeting ARM64 architecture. - ContainerPackager (Container): Validates the Dockerfile exists, detects a local container runtime (Docker/Podman/Finch), builds the…
The schema module contains the high level schemas which serve as abstractions enabling a streamlined L3 implementation to model AgentCore resources. This module only houses schemas and zod validation logic. Schemas are modeled separately with types and interfaces for readability and clean imports. Zod validators take a dependency on the top level types and serve only validation. Schemas: The core interface for both CLI and the input props to the L3 CDK constructs. These schemas allow high-level definitions for agent…
This directory contains manually maintained TypeScript type definitions optimized for LLM consumption. When Zod schemas in schemas/ are updated, manually update the corresponding file here: Every enum (union type) and regex pattern MUST be exactly correct. On every update: Incorrect enums or regex will cause agents to generate invalid JSON that fails validation.
smithy-go is the Go code generator and runtime for Smithy. It has two major components: 1. Codegen (codegen/) — A Smithy build plugin written in Java that generates Go client/server/shape code from Smithy models. 2. Runtime (./, top-level Go module) — The Go packages that generated code depends on at runtime. The primary downstream consumer is aws-sdk-go-v2. The codegen artifact version is published to Maven Central and bumped on each release. For local development against unreleased codegen changes, use publishToMavenLocal…
AWS OFI NCCL is a plugin that enables NVIDIA NCCL, AMD RCCL, and AWS Neuron applications to use libfabric as a network provider. It maps NCCL's connection-oriented transport APIs to libfabric's connection-less reliable interface (FIEPRDM). The project uses GNU autotools (autoconf, automake, libtool). If a compilecommands.json file does not exist, you should run make clean ; bear -- make in order to generate a compilecommands.json to build a database for clangd. Unit tests are in tests/unit/. They run without special…