Skip to content

About

AWS Bedrock Multi-Agent Chatbot Template (React + FastAPI + strands-agents)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Bedrock Multi-Agent Chatbot Template

AWS Bedrock 기반 Multi-Agent 아키텍처 챗봇 템플릿입니다.

Chat Interface

Features

  • 실시간 스트리밍 응답 - SSE 기반 타이핑 효과
  • 파일 업로드 - Excel, PDF 파일 처리 지원
  • Multi-Agent 아키텍처 - Orchestrator + Sub-Agent 패턴
  • 다크 모드 - 시스템 설정 연동

파일 업로드 & 처리

File Upload

Excel/PDF 파일을 업로드하면 Agent가 자동으로 분석합니다.

Agent 도구 실행 시각화

Agent Tools

실행된 도구와 단계를 실시간으로 확인할 수 있습니다.

Tech Stack

Frontend

기술 버전 용도
React 19.x UI 프레임워크
TypeScript 5.9 타입 안전성
Zustand 5.x 상태 관리
Tailwind CSS 4.x 스타일링
Vite 7.x 빌드 도구

Backend

기술 버전 용도
FastAPI 0.115+ API 서버
strands-agents 0.1+ Agent 프레임워크
AWS Bedrock - LLM Provider
MCP 1.23+ 외부 도구 통합

Directory Structure

.
├── frontend/
│   ├── src/
│   │   ├── api/          # API 클라이언트
│   │   ├── components/   # React 컴포넌트
│   │   │   ├── Chat/     # 채팅 UI
│   │   │   ├── Estimate/ # 파일 업로드
│   │   │   └── Header/   # 헤더
│   │   ├── stores/       # Zustand 스토어
│   │   ├── types/        # TypeScript 타입
│   │   └── utils/        # 유틸리티
│   └── package.json
│
└── backend/
    ├── config/           # 설정 파일
    │   ├── prompts.yaml  # Agent 프롬프트
    │   └── settings.py   # 환경변수 설정
    ├── src/
    │   ├── api/          # FastAPI 엔드포인트
    │   ├── llm/          # Agent 및 도구
    │   │   ├── agents/   # Sub-Agent 정의
    │   │   ├── tools/    # 도구 구현
    │   │   └── handlers/ # 스트리밍 핸들러
    │   ├── estimate/     # 파일 처리 로직
    │   └── prompts/      # 프롬프트 로더
    └── requirements.txt

Getting Started

Prerequisites

  • Node.js 20+
  • Python 3.11+
  • AWS CLI (SSO 설정 완료)

Frontend Setup

cd frontend
npm install
npm run dev

Backend Setup

cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

# 환경변수 설정
cp .env.example .env
# .env 파일 편집

python -m uvicorn src.main:app --reload

Environment Variables

Backend (.env)

# AWS
AWS_REGION=ap-northeast-2
AWS_PROFILE=your-sso-profile  # 개발환경: SSO 프로필, 프로덕션: 미설정

# Bedrock
DEFAULT_MODEL_ID=global.anthropic.claude-sonnet-4-5-20250929-v1:0

# 파일 업로드 (선택)
ESTIMATE_S3_BUCKET=your-bucket-name

Frontend (.env)

VITE_API_URL=/api
VITE_DEFAULT_MODEL_ID=global.anthropic.claude-sonnet-4-5-20250929-v1:0

Architecture

┌─────────────────────────────────────────────────────────┐
│                      Frontend                           │
│  React + Zustand + SSE Streaming                       │
└─────────────────────┬───────────────────────────────────┘
                      │ HTTP/SSE
┌─────────────────────▼───────────────────────────────────┐
│                    FastAPI                              │
│  /chat (SSE) │ /estimate/upload │ /estimate/download   │
└─────────────────────┬───────────────────────────────────┘
                      │
┌─────────────────────▼───────────────────────────────────┐
│              Orchestrator Agent                         │
│  - 사용자 의도 분석                                      │
│  - Sub-Agent 라우팅                                     │
├─────────────────────┬───────────────────────────────────┤
│    QA Agent         │         Estimate Agent            │
│  ┌─────────────┐    │       ┌─────────────┐            │
│  │ AWS Docs    │    │       │ File Parser │            │
│  │ MCP Server  │    │       │ Pricing API │            │
│  │ Pricing     │    │       │ Excel Gen   │            │
│  └─────────────┘    │       └─────────────┘            │
└─────────────────────┴───────────────────────────────────┘

Customization

새 Agent 추가

  1. backend/src/llm/agents/에 Agent 파일 생성
  2. backend/config/prompts.yaml에 프롬프트 추가
  3. orchestration_agent.py에 라우팅 로직 추가

새 도구 추가

  1. backend/src/llm/tools/에 도구 파일 생성
  2. @tool 데코레이터로 함수 정의
  3. Agent에 도구 등록

License

MIT

About

AWS Bedrock Multi-Agent Chatbot Template (React + FastAPI + strands-agents)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages