Skip to content

feat: agentcore initial implementation #1191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,8 @@ node_modules

# MkDocs documentation
site*/
.cache
.cache

# Coding Asssitant
.kiro/settings
.kiro/specs
24 changes: 24 additions & 0 deletions .kiro/steering/product.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generative AI Use Cases (GenU)

GenU is a well-architected application implementation with business use cases for utilizing generative AI in business operations. It provides a platform for deploying and using various generative AI capabilities in a secure, enterprise-ready environment.

## Core Features

- **Multiple AI Use Cases**: Chat, Text Generation, Summarization, Meeting Minutes, Writing, Translation, Web Content Extraction, Image Generation, Video Generation, Video Analysis, Diagram Generation, Voice Chat
- **RAG (Retrieval Augmented Generation)**: Supports both Amazon Kendra and Knowledge Base for connecting AI to your organization's documents
- **Agent Support**: Integration with Bedrock Agents and Flows for specialized AI capabilities
- **Use Case Builder**: Create custom use cases with natural language prompt templates without coding
- **Security Features**: SAML authentication, IP restrictions, and other enterprise security controls
- **Multi-language Support**: Internationalization with multiple language interfaces

## Target Users

GenU is designed for organizations looking to implement generative AI capabilities in a secure, controlled environment with enterprise-grade features and customization options.

## Key Differentiators

- Well-architected AWS implementation following best practices
- Extensive customization options through configuration
- Support for multiple AI models and capabilities
- Enterprise security features
- No-code custom use case creation
105 changes: 105 additions & 0 deletions .kiro/steering/structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
# Project Structure

## Root Organization

The project follows a monorepo structure with workspaces:

```
generative-ai-use-cases/
├── docs/ # Documentation files (English and Japanese)
├── packages/ # Main code packages
│ ├── cdk/ # AWS CDK infrastructure code
│ ├── common/ # Shared utilities and types
│ ├── types/ # TypeScript type definitions
│ └── web/ # Frontend web application
├── browser-extension/ # Browser extension code
└── .husky/ # Git hooks
```

## Key Packages

### packages/cdk

Contains all AWS infrastructure code defined using CDK:

```
packages/cdk/
├── bin/ # CDK app entry point
├── lib/ # CDK constructs and stacks
│ ├── construct/ # Reusable CDK constructs
│ └── utils/ # Helper utilities
├── lambda/ # Lambda function code
├── lambda-python/ # Python Lambda functions
├── custom-resources/ # Custom CDK resources
│ ├── agent-core-runtime/
│ └── opensearch-index/
├── assets/ # Static assets for deployment
└── cdk.json # CDK configuration
```

### packages/web

Contains the React frontend application:

```
packages/web/
├── public/ # Static assets
├── src/
│ ├── components/ # Reusable UI components
│ ├── hooks/ # React hooks
│ ├── pages/ # Page components
│ ├── utils/ # Utility functions
│ ├── i18n/ # Internationalization
│ └── prompts/ # AI prompt templates
└── vite.config.ts # Vite configuration
```

### packages/types

Contains TypeScript type definitions shared across packages:

```
packages/types/src/
├── agent.d.ts # Agent-related types
├── chat.d.ts # Chat-related types
├── message.d.ts # Message-related types
├── agent-core.d.ts # Agent Core types
└── ... # Other type definitions
```

## Documentation

Documentation is available in both English and Japanese:

```
docs/
├── en/ # English documentation
├── ja/ # Japanese documentation
└── assets/ # Documentation assets and images
```

## Browser Extension

A browser extension is available for accessing GenU functionality:

```
browser-extension/
├── src/ # Extension source code
├── public/ # Static assets
└── tools/ # Build tools
```

## Code Conventions

1. **TypeScript**: The project uses TypeScript throughout for type safety
2. **React Components**: Functional components with hooks
3. **CDK Constructs**: Modular CDK constructs for infrastructure components
4. **Internationalization**: All user-facing text uses i18n for translation
5. **Testing**: Jest for unit tests

## Configuration Files

- `package.json`: Root package with workspace definitions and scripts
- `packages/cdk/cdk.json`: Main configuration for AWS deployment
- `packages/web/vite.config.ts`: Frontend build configuration
- `mkdocs.yml`: Documentation site configuration
123 changes: 123 additions & 0 deletions .kiro/steering/tech.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Technical Stack and Build System

## Core Technologies

- **Frontend**: React with TypeScript, Vite, TailwindCSS
- **Backend**: AWS CDK (Cloud Development Kit) for infrastructure as code
- **AI Services**: Amazon Bedrock, Amazon Kendra, Amazon Transcribe
- **Authentication**: Amazon Cognito with SAML support
- **Storage**: Amazon S3, DynamoDB
- **API**: AWS API Gateway, AWS Lambda

## Key Libraries and Frameworks

### Frontend

- React 18
- TypeScript
- Vite for build tooling
- TailwindCSS for styling
- i18next for internationalization
- SWR for data fetching
- Zustand for state management
- React Router for navigation
- AWS Amplify for AWS service integration

### Backend

- AWS CDK for infrastructure as code
- TypeScript
- AWS Lambda for serverless functions
- AWS SDK for JavaScript

## Project Build Commands

### Root Project Commands

```bash
# Install dependencies
npm ci

# Run linting
npm run lint

# Run tests
npm run test

# Deploy AWS resources
npm run cdk:deploy

# Fast deployment (without pre-checking)
npm run cdk:deploy:quick

# Delete AWS resources
npm run cdk:destroy

# Documentation development server
npm run docs:dev

# Build documentation
npm run docs:build
```

### Web Frontend Commands

```bash
# Start development server
npm run web:dev

# Build for production
npm run web:build

# Run linting
npm run web:lint

# Run tests
npm run web:test
```

### CDK Commands

```bash
# Bootstrap CDK (first-time setup)
npx -w packages/cdk cdk bootstrap

# Deploy CDK stacks
npm run cdk:deploy

# Run CDK tests
npm run cdk:test
```

### Browser Extension Commands

```bash
# Install extension dependencies
npm run extension:ci

# Start extension development
npm run extension:dev

# Build extension
npm run extension:build
```

## Environment Setup

Before deploying, ensure:

1. AWS CLI is configured with appropriate credentials
2. Node.js and npm are installed
3. Required Bedrock models are enabled in your AWS account
4. CDK is bootstrapped in your AWS environment (first-time only)

## Configuration

The main configuration file is `packages/cdk/cdk.json`, which controls:

- AWS region settings
- Enabled AI models and capabilities
- Security settings
- RAG configuration
- Agent and Flow settings
- UI customization options
43 changes: 43 additions & 0 deletions docs/en/DEPLOY_OPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,49 @@ const envs: Record<string, Partial<StackInput>> = {
}
```

### Enabling AgentCore Use Cases

This is a use case that integrates with agents created in AgentCore. (Experimental: Breaking changes may be made without notice)

Enabling `agentCoreEnabled` will deploy the default AgentCore Runtime and enable the use case.

You can use externally created AgentCore Runtime with `agentCoreExternalRuntimes`.

**Edit [parameter.ts](/packages/cdk/parameter.ts)**

```typescript
// parameter.ts
const envs: Record<string, Partial<StackInput>> = {
dev: {
agentCoreEnabled: true,
agentCoreExternalRuntimes: [
{
name: 'AgentCore1',
arn: 'arn:aws:bedrock-agentcore:us-west-2:<account>:runtime/agent-core1-xxxxxxxx',
},
],
},
};
```

**Edit [packages/cdk/cdk.json](/packages/cdk/cdk.json)**

```json
// cdk.json

{
"context": {
"agentCoreEnabled": true,
"agentCoreExternalRuntimes": [
{
"name": "AgentCore1",
"arn": "arn:aws:bedrock-agentcore:us-west-2:<account>:runtime/agent-core1-xxxxxxxx"
}
]
}
}
```

### Enabling Voice Chat Use Case

> [!NOTE]
Expand Down
43 changes: 43 additions & 0 deletions docs/ja/DEPLOY_OPTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,49 @@ const envs: Record<string, Partial<StackInput>> = {
}
```

### AgentCore ユースケースの有効化

AgentCore で作成したエージェントと連携するユースケースです。(Experimental: 予告なく破壊的変更を行うことがあります)

`agentCoreEnabled` を有効化するとデフォルトの AgentCore Runtime がデプロイされユースケースが有効化されます。

`agentCoreExternalRuntimes` で外部で作成した AgentCore Runtime を利用することが可能です。

**[parameter.ts](/packages/cdk/parameter.ts) を編集**

```typescript
// parameter.ts
const envs: Record<string, Partial<StackInput>> = {
dev: {
agentCoreEnabled: true,
agentCoreExternalRuntimes: [
{
name: 'AgentCore1',
arn: 'arn:aws:bedrock-agentcore:us-west-2:<account>:runtime/agent-core1-xxxxxxxx',
},
],
},
};
```

**[packages/cdk/cdk.json](/packages/cdk/cdk.json) を編集**

```json
// cdk.json

{
"context": {
"agentCoreEnabled": true,
"agentCoreExternalRuntimes": [
{
"name": "AgentCore1",
"arn": "arn:aws:bedrock-agentcore:us-west-2:<account>:runtime/agent-core1-xxxxxxxx"
}
]
}
}
```

### 音声チャットユースケースの有効化

> [!NOTE]
Expand Down
Loading