Google ADK & AWS Bedrock Agents
클라우드 네이티브 vs 자체 호스팅
섹션 제목: “클라우드 네이티브 vs 자체 호스팅”에이전트 인프라를 직접 구축할지, 클라우드 제공자의 관리형 서비스를 사용할지는 중요한 아키텍처 결정입니다.
| 항목 | 클라우드 네이티브 | 자체 호스팅 |
|---|---|---|
| 초기 구축 비용 | 낮음 | 높음 |
| 운영 부담 | 낮음 (벤더 관리) | 높음 |
| 커스터마이징 | 제한적 | 자유로움 |
| 벤더 종속성 | 있음 | 없음 |
| 데이터 주권 | 제한적 | 완전 통제 |
| 확장성 | 자동 (추가 비용) | 직접 관리 |
Google ADK (Agent Development Kit)
섹션 제목: “Google ADK (Agent Development Kit)”Google ADK는 Gemini 모델 최적화와 Google Cloud 서비스 통합을 중심으로 설계된 에이전트 프레임워크입니다.
멀티에이전트 구성
섹션 제목: “멀티에이전트 구성”from google.adk.agents import Agent, SequentialAgent, ParallelAgentfrom google.adk.tools import google_search, code_execution
# 개별 에이전트 정의researcher = Agent( name="researcher", model="gemini-2.0-flash", instruction="주어진 주제를 Google 검색으로 조사합니다", tools=[google_search],)
coder = Agent( name="coder", model="gemini-2.5-pro", instruction="조사 결과를 바탕으로 Python 코드를 작성합니다", tools=[code_execution],)
reviewer = Agent( name="reviewer", model="gemini-2.0-flash", instruction="작성된 코드를 리뷰하고 개선점을 제안합니다",)
# 순차 실행 파이프라인pipeline = SequentialAgent( name="dev_pipeline", sub_agents=[researcher, coder, reviewer],)
# 병렬 실행 (독립 작업)parallel_review = ParallelAgent( name="parallel_review", sub_agents=[ Agent(name="security_reviewer", ...), Agent(name="performance_reviewer", ...), ],)Vertex AI 통합
섹션 제목: “Vertex AI 통합”from google.adk.runners import VertexAIRunner
runner = VertexAIRunner( project="my-gcp-project", location="us-central1",)
# Cloud Run에 에이전트 배포await runner.deploy( agent=pipeline, service_name="dev-pipeline-agent",)핵심 특징
섹션 제목: “핵심 특징”| 기능 | 설명 |
|---|---|
| Gemini 최적화 | Gemini 2.0/2.5 모델 네이티브 지원 |
| 도구 내장 | Google Search, Code Execution, Maps 등 |
| Vertex AI 배포 | Google Cloud에 원클릭 배포 |
| 멀티모달 | 텍스트, 이미지, 오디오, 비디오 처리 |
AWS Bedrock Agents
섹션 제목: “AWS Bedrock Agents”AWS Bedrock Agents는 완전 관리형 에이전트 서비스입니다. 인프라 없이 API만으로 에이전트를 생성하고 운영할 수 있습니다.
핵심 구성 요소
섹션 제목: “핵심 구성 요소”┌─────────────────────────────────────────────┐│ Bedrock Agent │├─────────────┬───────────────────────────────┤│ Foundation │ Action Groups ││ Model │ (Lambda 함수로 구현된 도구) ││ (Claude, ├───────────────────────────────┤│ Llama 등) │ Knowledge Bases ││ │ (S3 + OpenSearch RAG) │└─────────────┴───────────────────────────────┘Action Groups — 에이전트 도구
섹션 제목: “Action Groups — 에이전트 도구”# Lambda 함수로 에이전트 도구 구현import json
def lambda_handler(event, context): """Bedrock Agent가 호출하는 Lambda 함수""" action_group = event.get('actionGroup') function = event.get('function') params = event.get('parameters', [])
# 파라미터 파싱 param_dict = {p['name']: p['value'] for p in params}
if function == 'get_order_status': order_id = param_dict['order_id'] status = get_order_from_db(order_id) return { 'response': { 'actionGroup': action_group, 'function': function, 'functionResponse': { 'responseBody': { 'TEXT': {'body': json.dumps(status)} } } } }# Bedrock Agent 생성 (AWS SDK)import boto3
bedrock_agent = boto3.client('bedrock-agent', region_name='us-east-1')
agent = bedrock_agent.create_agent( agentName='order-assistant', agentResourceRoleArn='arn:aws:iam::123456789:role/BedrockAgentRole', foundationModel='anthropic.claude-opus-4-5-v1', instruction=""" 당신은 주문 관리 어시스턴트입니다. 고객의 주문 상태를 조회하고 문제를 해결합니다. """,)Knowledge Bases — RAG 통합
섹션 제목: “Knowledge Bases — RAG 통합”# 지식 베이스 생성 (S3 문서 → OpenSearch 벡터 DB)knowledge_base = bedrock_agent.create_knowledge_base( name='product-docs', roleArn='arn:aws:iam::123456789:role/BedrockKBRole', knowledgeBaseConfiguration={ 'type': 'VECTOR', 'vectorKnowledgeBaseConfiguration': { 'embeddingModelArn': 'amazon.titan-embed-text-v2:0' } }, storageConfiguration={ 'type': 'OPENSEARCH_SERVERLESS', 'opensearchServerlessConfiguration': { 'collectionArn': 'arn:aws:aoss:...', 'vectorIndexName': 'product-index', 'fieldMapping': { 'vectorField': 'embedding', 'textField': 'content', 'metadataField': 'metadata', } } })Vercel AI SDK — 스트리밍 우선 설계
섹션 제목: “Vercel AI SDK — 스트리밍 우선 설계”Vercel AI SDK는 프론트엔드와 에이전트의 통합에 특화된 라이브러리입니다. React 훅과 스트리밍 응답이 핵심입니다.
// 서버: 에이전트 API 라우트import { streamText, tool } from 'ai';import { anthropic } from '@ai-sdk/anthropic';import { z } from 'zod';
export async function POST(req: Request) { const { messages } = await req.json();
const result = streamText({ model: anthropic('claude-opus-4-5'), messages, tools: { searchCode: tool({ description: '코드베이스를 검색합니다', parameters: z.object({ query: z.string() }), execute: async ({ query }) => searchCodebase(query), }), }, maxSteps: 10, // 에이전트 루프 최대 스텝 });
return result.toDataStreamResponse();}// 클라이언트: React 컴포넌트import { useChat } from 'ai/react';
export function AgentChat() { const { messages, input, handleInputChange, handleSubmit, isLoading } = useChat({ api: '/api/agent' });
return ( <div> {messages.map((m) => ( <div key={m.id}> <strong>{m.role}:</strong> {m.content} </div> ))} <form onSubmit={handleSubmit}> <input value={input} onChange={handleInputChange} /> <button disabled={isLoading}>전송</button> </form> </div> );}플랫폼 선택 가이드
섹션 제목: “플랫폼 선택 가이드”| 상황 | 권장 플랫폼 |
|---|---|
| Google Cloud 기반 인프라 + Gemini 활용 | Google ADK |
| AWS 기반 인프라 + 완전 관리형 원함 | AWS Bedrock Agents |
| Next.js/React 프론트엔드 + 스트리밍 UI | Vercel AI SDK |
| 벤더 종속 없이 자체 제어 | LangGraph / OpenAI Agents SDK |
| 데이터 온프레미스 필수 | 자체 호스팅 프레임워크 |
Google ADK는 Gemini 최적화와 Vertex AI 통합으로 Google Cloud 환경에서 강력한 멀티에이전트 파이프라인을 제공합니다. AWS Bedrock Agents는 Lambda 기반 Action Groups와 Knowledge Bases RAG를 통해 완전 관리형 에이전트 서비스를 제공합니다. Vercel AI SDK는 React 훅과 스트리밍 설계로 프론트엔드와 에이전트의 통합에 특화되어 있습니다. 클라우드 네이티브 서비스는 운영 부담을 줄이는 대신 벤더 종속성과 커스터마이징 제한을 감수해야 합니다.