Amazon Bedrock AgentCore
Amazon Bedrock AgentCore คือชุดบริการระดับ enterprise สำหรับ deploy, จัดการ และ scale AI agents ใน production environment ครบวงจร ต่างจาก Amazon Bedrock Agents ทั่วไปที่เน้น orchestration logic, AgentCore เน้นที่โครงสร้างพื้นฐาน (infrastructure layer) ที่รองรับ agent ทุกประเภท ไม่ว่าจะสร้างด้วย Bedrock, LangGraph, CrewAI, AutoGen หรือ framework อื่นๆ
AgentCore แก้ปัญหาหลักที่ทีมมักเจอเมื่อนำ AI agent จาก prototype ไปสู่ production ได้แก่ การจัดการ session และ memory ข้ามการสนทนา, การยืนยันตัวตนกับบริการภายนอก, การ debug และ monitor พฤติกรรม agent, การรัน browser และโค้ดอย่างปลอดภัย รวมถึง auto-scaling รองรับ load ที่เพิ่มขึ้นโดยไม่ต้องดูแล server
AWS Docs: https://docs.aws.amazon.com/bedrock/latest/userguide/agentcore.html
สถาปัตยกรรม
ฟีเจอร์หลัก
AgentCore Runtime
Managed container runtime สำหรับ deploy agent code ใน production:
- รองรับ Python และ Node.js
- Auto-scaling ตาม workload อัตโนมัติ
- Session management: แต่ละ conversation มี isolated session context
- Timeout handling และ retry logic ในตัว
- Cold start optimization สำหรับ latency ต่ำ
- รองรับ custom dependencies ผ่าน Docker image หรือ Lambda layers
วิธีการทำงาน: นักพัฒนาเขียน agent logic และ package เป็น container image หรือ zip file จากนั้น AgentCore Runtime จัดการ deploy, routing request เข้าสู่ instance ที่พร้อม, scale up/down และ monitor health โดยอัตโนมัติ
AgentCore Memory
ระบบ persistent memory สำหรับ agents รองรับการจดจำข้อมูลข้ามหลาย session:
ประเภทหน่วยความจำ:
- Short-term memory (Session) — เก็บ context ในระหว่าง session ปัจจุบัน ล้างเมื่อ session จบ
- Long-term memory (Persistent) — เก็บข้อมูลสำคัญข้าม session เช่น preferences, ประวัติการใช้งาน, profile ผู้ใช้
วิธีการจัดเก็บ:
- Key-value store — เก็บข้อมูล structured เช่น user preferences, account info
- Semantic (vector) store — เก็บ conversation history ที่สามารถค้นหาด้วย natural language query ได้
การค้นหา Memory:
- Exact key lookup สำหรับ structured data
- Vector similarity search สำหรับ "จำบทสนทนาที่คล้ายกัน"
- Hybrid search รวม keyword และ semantic
AgentCore Identity
ระบบจัดการ authentication และ authorization สำหรับ agents ที่ต้องเชื่อมต่อกับบริการภายนอก:
- รองรับ OAuth 2.0 และ OIDC flows
- เชื่อมต่อกับ Identity Providers (IdPs) ยอดนิยม: Google Workspace, GitHub, Salesforce, Microsoft Entra ID (Azure AD), Okta, custom OAuth IdP
- Token management อัตโนมัติ: refresh, store, revoke tokens โดยไม่ต้องเขียนโค้ดเอง
- Agent-on-behalf-of-user: agent สามารถ authenticate กับบริการในนามผู้ใช้จริง
- Audit trail บันทึกว่า agent ทำอะไร ในนามใคร เมื่อไหร่
- เหมาะสำหรับ enterprise workflow ที่ agent ต้องเข้าถึงอีเมล, calendar, CRM หรือระบบ ERP ของผู้ใช้
AgentCore Gateway
API gateway สำหรับให้ agents เรียกบริการและระบบภายนอกได้อย่างปลอดภัย:
- REST API integration — agent เรียก REST endpoint ของระบบภายนอกได้
- GraphQL support — รองรับ GraphQL queries
- Lambda integration — เรียก Lambda functions เพื่อ execute custom logic
- Database access — เชื่อมต่อ Amazon RDS, Aurora, DynamoDB ผ่าน secure channel
- Auto-generate tool schemas — อ่าน OpenAPI/Swagger spec แล้วสร้าง tool definition สำหรับ LLM โดยอัตโนมัติ ไม่ต้องเขียน function description เอง
- Rate limiting และ circuit breaker — ป้องกัน agent เรียก API มากเกินไป
- Secret management — ดึง API keys จาก Secrets Manager โดยอัตโนมัติ
AgentCore Browser Tool
Headless Chromium browser ที่ให้ agents ท่องเว็บและโต้ตอบกับ web content ได้:
- นำทาง URL และอ่านเนื้อหาหน้าเว็บ
- คลิกปุ่ม, กรอกฟอร์ม, เลื่อนหน้า
- จับภาพหน้าจอ (screenshot)
- แยก structured data จากตาราง, รายการ
- รองรับ JavaScript-heavy sites (SPA, React, Vue)
- แต่ละ session รันใน isolated container เพื่อความปลอดภัย
- Auto-cleanup session เมื่อหมดเวลา
ข้อจำกัด: ไม่รองรับการ login ด้วย CAPTCHA อัตโนมัติ, บางเว็บอาจบล็อก bot
AgentCore Code Interpreter
Sandboxed Python execution environment สำหรับให้ agents รันโค้ดได้อย่างปลอดภัย:
- Isolated container — แต่ละ execution รันใน container แยกกัน ไม่สามารถ access ระบบภายนอกได้นอกจากที่อนุญาต
- Pre-installed libraries: pandas, numpy, matplotlib, scipy, scikit-learn, Pillow, openpyxl และอื่นๆ
- File I/O: รับไฟล์ input (CSV, Excel, JSON, image) และส่ง output กลับมา
- Visualization: สร้าง chart และ graph แล้วส่งเป็น base64 image
- Session persistence: ตัวแปรและ state คงอยู่ตลอด session เดียวกัน
- Timeout protection: execution ถูกหยุดอัตโนมัติหากใช้เวลาเกินกำหนด
- ไม่มี network access ภายใน sandbox (ยกเว้นที่ configure ไว้)
AgentCore Observability
ระบบ monitoring, tracing และ debugging สำหรับ agents:
- OpenTelemetry traces — ติดตามทุก step ของ agent: LLM call, tool call, memory access, external API call
- Token usage metrics — วัดการใช้ token ต่อ session, ต่อ agent, ต่อวัน
- Latency breakdown — เห็นว่าเวลาส่วนใหญ่หมดไปกับอะไร (LLM inference, tool execution, network latency)
- Visual debugger — ใน AWS Console มี trace visualizer แบบ timeline ให้เห็น flow ของ agent แต่ละ step
- Error tracking — บันทึก exception, timeout, tool failure พร้อม context
- CloudWatch integration — export metrics และ logs ไปยัง CloudWatch สำหรับ alerting และ dashboard
- Session replay — ดูการสนทนาและการตัดสินใจของ agent ย้อนหลังได้
การติดตั้งและการตั้งค่า
เปิดใช้งานใน AWS Console
- เข้า AWS Console ไปที่ Amazon Bedrock
- ในแถบเมนูซ้าย เลือก AgentCore
- เลือกคอมโพเนนต์ที่ต้องการ เช่น Runtime, Memory, Gateway
- คลิก Get started แล้วทำตามขั้นตอน setup wizard
- สร้าง IAM role ที่มี permissions ที่จำเป็น
ติดตั้ง SDK
Python
pip install boto3
# AgentCore ใช้ผ่าน boto3 เช่นเดียวกับ Bedrock services อื่นๆ
AWS CLI
aws configure --profile agentcore-dev
# ตั้งค่า region ที่รองรับ AgentCore เช่น us-east-1, us-west-2
IAM Permissions ที่จำเป็น
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"bedrock:CreateAgentRuntime",
"bedrock:InvokeAgentRuntime",
"bedrock:CreateMemoryStore",
"bedrock:PutMemory",
"bedrock:GetMemory",
"bedrock:SearchMemory",
"bedrock:CreateGateway",
"bedrock:InvokeGateway",
"bedrock:StartBrowserSession",
"bedrock:InvokeCodeInterpreter",
"bedrock:GetAgentTrace"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"secretsmanager:GetSecretValue"
],
"Resource": "arn:aws:secretsmanager:*:*:secret:bedrock-agentcore/*"
},
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": "arn:aws:logs:*:*:log-group:/aws/bedrock/agentcore/*"
}
]
}
วิธีใช้งาน
AgentCore Memory — บันทึกและดึงความจำ
import boto3
import json
# สร้าง client สำหรับ AgentCore Memory
bedrock_agentcore = boto3.client("bedrock-agentcore", region_name="us-east-1")
MEMORY_STORE_ID = "your-memory-store-id"
USER_ID = "user-12345"
# บันทึกข้อมูลเข้า memory
def save_user_preference(user_id: str, key: str, value: str):
bedrock_agentcore.put_memory(
memoryStoreId=MEMORY_STORE_ID,
namespace=f"user/{user_id}/preferences",
key=key,
value=json.dumps({"value": value, "updated_at": "2025-04-22"})
)
print(f"บันทึก preference: {key} = {value}")
# ดึงข้อมูลจาก memory
def get_user_preference(user_id: str, key: str):
response = bedrock_agentcore.get_memory(
memoryStoreId=MEMORY_STORE_ID,
namespace=f"user/{user_id}/preferences",
key=key
)
return json.loads(response["value"])["value"]
# ค้นหา memory ด้วย semantic search
def search_past_conversations(user_id: str, query: str):
response = bedrock_agentcore.search_memory(
memoryStoreId=MEMORY_STORE_ID,
namespace=f"user/{user_id}/conversations",
query=query,
maxResults=5
)
return response["results"]
# ตัวอย่างการใช้งาน
save_user_preference(USER_ID, "language", "Thai")
save_user_preference(USER_ID, "notification_channel", "LINE")
lang = get_user_preference(USER_ID, "language")
print(f"ภาษาที่ผู้ใช้ต้องการ: {lang}")
results = search_past_conversations(USER_ID, "ถามเรื่องการลงทุน")
for r in results:
print(f"พบบทสนทนาที่เกี่ยวข้อง: {r['content'][:100]}...")
AgentCore Code Interpreter — รันโค้ด Python ใน sandbox
import boto3
import base64
client = boto3.client("bedrock-agentcore", region_name="us-east-1")
# สร้าง Code Interpreter session
session = client.create_code_interpreter_session(
sessionTimeoutSeconds=300
)
session_id = session["sessionId"]
# รันโค้ดวิเคราะห์ข้อมูล
code = """
import pandas as pd
import matplotlib.pyplot as plt
import io, base64
# สร้างข้อมูลตัวอย่าง: ยอดขายรายเดือน
data = {
'เดือน': ['ม.ค.', 'ก.พ.', 'มี.ค.', 'เม.ย.', 'พ.ค.', 'มิ.ย.'],
'ยอดขาย': [120000, 135000, 98000, 156000, 142000, 178000]
}
df = pd.DataFrame(data)
# คำนวณสถิติ
print(f"ยอดขายเฉลี่ย: {df['ยอดขาย'].mean():,.0f} บาท")
print(f"ยอดขายสูงสุด: {df['ยอดขาย'].max():,.0f} บาท ({df.loc[df['ยอดขาย'].idxmax(), 'เดือน']})")
print(f"ยอดขายต่ำสุด: {df['ยอดขาย'].min():,.0f} บาท ({df.loc[df['ยอดขาย'].idxmin(), 'เดือน']})")
print(f"การเติบโต (ม.ค. ถึง มิ.ย.): {((df['ยอดขาย'].iloc[-1] - df['ยอดขาย'].iloc[0]) / df['ยอดขาย'].iloc[0] * 100):.1f}%")
# สร้าง bar chart
fig, ax = plt.subplots(figsize=(8, 4))
bars = ax.bar(df['เดือน'], df['ยอดขาย'], color='steelblue')
ax.set_title('ยอดขายรายเดือน 2025', fontsize=14)
ax.set_ylabel('บาท')
ax.yaxis.set_major_formatter(plt.FuncFormatter(lambda x, p: f'{x:,.0f}'))
plt.tight_layout()
buf = io.BytesIO()
plt.savefig(buf, format='png', dpi=100)
buf.seek(0)
chart_b64 = base64.b64encode(buf.read()).decode('utf-8')
print(f"CHART_DATA:{chart_b64}")
"""
response = client.invoke_code_interpreter(
sessionId=session_id,
code=code,
timeoutSeconds=60
)
output = response["output"]
print("ผลลัพธ์จากโค้ด:")
print(output["stdout"])
if response.get("outputFiles"):
for f in response["outputFiles"]:
print(f"ไฟล์ output: {f['name']} ({len(f['content'])} bytes)")
# ปิด session เมื่อเสร็จ
client.delete_code_interpreter_session(sessionId=session_id)
AgentCore Browser Tool — ให้ agent ท่องเว็บ
import boto3
import json
client = boto3.client("bedrock-agentcore", region_name="us-east-1")
# เริ่ม browser session
session = client.start_browser_session(
sessionTimeoutSeconds=120
)
session_id = session["sessionId"]
try:
# นำทางไปยัง URL
client.browser_navigate(
sessionId=session_id,
url="https://www.set.or.th/th/market/index/SET/overview"
)
# รอให้หน้าโหลด และดึงเนื้อหา
content = client.browser_get_content(
sessionId=session_id,
selector="main",
format="text"
)
print("เนื้อหาหน้าตลาดหลักทรัพย์:")
print(content["text"][:500])
# จับภาพหน้าจอ
screenshot = client.browser_screenshot(
sessionId=session_id
)
with open("/tmp/set_screenshot.png", "wb") as f:
f.write(screenshot["imageData"])
print("บันทึก screenshot สำเร็จ")
finally:
# ปิด browser session เสมอ
client.stop_browser_session(sessionId=session_id)
AgentCore Identity — จัดการ OAuth สำหรับ agent
import boto3
client = boto3.client("bedrock-agentcore", region_name="us-east-1")
# ลงทะเบียน OAuth credential สำหรับ Google Workspace
client.create_identity_credential(
name="google-workspace-cred",
identityProvider="GOOGLE",
clientId="YOUR_GOOGLE_CLIENT_ID",
clientSecretArn="arn:aws:secretsmanager:us-east-1:123456789:secret:google-oauth-secret",
scopes=["https://www.googleapis.com/auth/gmail.readonly",
"https://www.googleapis.com/auth/calendar"]
)
# เมื่อ agent ต้องการ token เพื่อเรียก Google API
def get_user_google_token(user_id: str) -> str:
response = client.get_identity_token(
credentialName="google-workspace-cred",
userId=user_id
)
return response["accessToken"]
# ใช้ token เรียก Gmail API
import urllib.request
def get_user_emails(user_id: str, max_results: int = 5):
token = get_user_google_token(user_id)
req = urllib.request.Request(
f"https://gmail.googleapis.com/gmail/v1/users/me/messages?maxResults={max_results}",
headers={"Authorization": f"Bearer {token}"}
)
with urllib.request.urlopen(req) as response:
return json.loads(response.read().decode())
AgentCore Observability — ดู traces
import boto3
client = boto3.client("bedrock-agentcore", region_name="us-east-1")
# ดึง traces ของ agent session
def get_agent_trace(trace_id: str):
response = client.get_agent_trace(traceId=trace_id)
trace = response["trace"]
print(f"Session ID: {trace['sessionId']}")
print(f"เริ่มต้น: {trace['startTime']}")
print(f"สิ้นสุด: {trace['endTime']}")
print(f"Total tokens: {trace['tokenUsage']['totalTokens']:,}")
print(f"Latency รวม: {trace['totalLatencyMs']} ms")
print()
for step in trace["steps"]:
print(f" [{step['type']}] {step['name']}")
print(f" เวลา: {step['latencyMs']} ms")
if step.get("tokenUsage"):
print(f" Tokens: {step['tokenUsage']['inputTokens']} in / {step['tokenUsage']['outputTokens']} out")
if step.get("error"):
print(f" ERROR: {step['error']['message']}")
# ดึง metrics รวมของ agent
def get_agent_metrics(agent_id: str, days: int = 7):
response = client.get_agent_metrics(
agentId=agent_id,
startTime=f"2025-04-{22 - days:02d}T00:00:00Z",
endTime="2025-04-22T23:59:59Z"
)
metrics = response["metrics"]
print(f"จำนวน session ทั้งหมด: {metrics['totalSessions']:,}")
print(f"Token ที่ใช้ทั้งหมด: {metrics['totalTokens']:,}")
print(f"ค่าใช้จ่ายรวม (USD): ${metrics['estimatedCostUsd']:.4f}")
print(f"Latency เฉลี่ย: {metrics['avgLatencyMs']} ms")
print(f"Error rate: {metrics['errorRate'] * 100:.2f}%")
ราคา (ประมาณการในบาท)
อัตราแลกเปลี่ยน: 1 USD = 35 บาท
AgentCore Runtime
| รายการ | ราคา USD | ราคาบาท (โดยประมาณ) |
|---|---|---|
| Compute time | $0.0000167/วินาที | ~0.00058 บาท/วินาที |
| ตัวอย่าง: agent รัน 10 วินาที | $0.000167 | ~0.006 บาท |
| ตัวอย่าง: 10,000 session/วัน x 10 วินาที | $1.67/วัน | ~58 บาท/วัน |
AgentCore Memory
| รายการ | ราคา USD | ราคาบาท |
|---|---|---|
| Key-value storage | $0.10/GB/เดือน | ~3.50 บาท/GB/เดือน |
| Vector storage | $0.10/GB/เดือน | ~3.50 บาท/GB/เดือน |
| Memory read operations | $0.0001/1,000 reads | ~0.0035 บาท/1,000 reads |
| ตัวอย่าง: user 1,000 คน x 1MB memory | $0.10/เดือน | ~3.50 บาท/เดือน |
AgentCore Gateway
| รายการ | ราคา USD | ราคาบาท |
|---|---|---|
| API calls | $3.50/1M calls | ~122.50 บาท/1M calls |
| ตัวอย่าง: 100,000 API calls/วัน | $0.35/วัน | ~12.25 บาท/วัน |
AgentCore Browser Tool
| รายการ | ราคา USD | ราคาบาท |
|---|---|---|
| Browser session time | $0.05/นาที | ~1.75 บาท/นาที |
| ตัวอย่าง: browsing 2 นาทีต่อ task | $0.10/task | ~3.50 บาท/task |
| ตัวอย่าง: 1,000 tasks/วัน | $100/วัน | ~3,500 บาท/วัน |
AgentCore Code Interpreter
| รายการ | ราคา USD | ราคาบาท |
|---|---|---|
| Execution time | $0.00003/วินาที | ~0.00105 บาท/วินาที |
| ตัวอย่าง: รันโค้ด 30 วินาที | $0.0009 | ~0.032 บาท |
| ตัวอย่าง: 10,000 executions x 30 วินาที | $9/วัน | ~315 บาท/วัน |
ตัวอย่างค่าใช้จ่ายรวม (Production Agent)
สมมติ agent สำหรับ customer support ที่มี 500 sessions/วัน แต่ละ session:
- Runtime: 30 วินาที
- Memory: 5 reads/writes
- Gateway: 3 API calls
- Code Interpreter: ไม่ใช้ในกรณีนี้
| รายการ | ค่าใช้จ่าย/วัน (USD) | ค่าใช้จ่าย/วัน (บาท) |
|---|---|---|
| Runtime (500 x 30s x $0.0000167) | $0.25 | ~8.75 บาท |
| Memory (500 x 5 x $0.0001/1K) | $0.00025 | ~0.01 บาท |
| Gateway (500 x 3 x $3.50/1M) | $0.0053 | ~0.18 บาท |
| LLM tokens (Claude 3.5 Haiku, ~2K tokens/session) | $0.80 | ~28 บาท |
| รวม | ~$1.06/วัน | ~37 บาท/วัน |
| ต่อเดือน (30 วัน) | ~$31.80/เดือน | ~1,113 บาท/เดือน |
เหมาะสำหรับ
- ทีม engineering ที่ต้องการ deploy AI agents ใน production โดยไม่ต้องสร้าง infrastructure เอง เช่น container orchestration, auto-scaling, session store
- องค์กร enterprise ที่ต้องการ governance, security controls และ audit trail สำหรับ AI agents ทุกตัว
- ทีมที่มี agent หลายตัว และต้องการ centralized management, monitoring และ cost tracking
- นักพัฒนาที่สร้าง agent ด้วย framework อื่น (LangGraph, CrewAI, AutoGen) แต่ต้องการ production infrastructure จาก AWS
- บริษัทที่ agent ต้องเชื่อมต่อกับบริการภายนอก เช่น Google Workspace, Salesforce, GitHub และต้องการ OAuth management ที่ปลอดภัย
- ทีม data และ analytics ที่ต้องการให้ agent วิเคราะห์ข้อมูลด้วยโค้ด Python อย่างปลอดภัย
- บริษัทที่มีข้อกำหนด compliance เช่น ต้องการ trace ทุก action ที่ agent ทำ พร้อม timestamp และ user attribution
ใช้ร่วมกับ AWS Services
| AWS Service | การเชื่อมต่อ |
|---|---|
| Amazon Bedrock Agents | ใช้ AgentCore เป็น runtime สำหรับ Bedrock Agents ที่สร้างใน console |
| Amazon CloudWatch | AgentCore Observability ส่ง metrics, logs และ traces ไปยัง CloudWatch โดยอัตโนมัติ |
| AWS Lambda | AgentCore Gateway เรียก Lambda functions เป็น tools ของ agent |
| Amazon RDS / Aurora | AgentCore Gateway เชื่อมต่อ agent กับฐานข้อมูล relational |
| Amazon DynamoDB | เก็บ session state เพิ่มเติมสำหรับ high-throughput applications |
| Amazon S3 | Code Interpreter อ่าน/เขียนไฟล์ผ่าน S3, Memory store backup |
| AWS Secrets Manager | เก็บ OAuth client secrets, API keys สำหรับ AgentCore Identity และ Gateway |
| Amazon OpenSearch Serverless | Vector store backend สำหรับ AgentCore Memory (semantic search) |
| AWS IAM | ควบคุม permissions ของ agent ด้วย IAM roles และ resource policies |
| Amazon EventBridge | Trigger agent workflows จาก events ของระบบอื่น |
| AWS X-Ray | ทำงานร่วมกับ AgentCore Observability สำหรับ distributed tracing ทั้งระบบ |
| Amazon VPC | Deploy AgentCore Runtime ภายใน VPC เพื่อเข้าถึง private resources |
Use Case ตัวอย่าง
Use Case 1: AI Financial Advisor Agent สำหรับแอปธนาคาร
ธนาคารไทยต้องการ agent ที่ช่วยลูกค้าวิเคราะห์การใช้จ่าย วางแผนการออม และแนะนำผลิตภัณฑ์ทางการเงิน โดย agent ต้องจำพฤติกรรมและเป้าหมายของลูกค้าแต่ละคนข้ามหลาย session
สถาปัตยกรรม:
- AgentCore Runtime — deploy agent Python code ที่เชื่อมต่อกับ Claude 3.5 Sonnet
- AgentCore Memory — เก็บ long-term memory ของลูกค้า: เป้าหมายทางการเงิน, risk profile, preference, ประวัติคำแนะนำที่เคยให้
- AgentCore Gateway — เชื่อมต่อกับ Core Banking API เพื่อดึงข้อมูลบัญชี, transaction history
- AgentCore Identity — OAuth กับ LINE Official Account เพื่อให้ agent ส่ง notification ในนามธนาคาร
- AgentCore Code Interpreter — agent รัน Python วิเคราะห์ spending pattern และสร้าง visualization แสดงให้ลูกค้าเห็น
- AgentCore Observability — monitor ทุก agent interaction ตรวจสอบ compliance และ audit trail
ตัวอย่าง flow:
ลูกค้า: "เดือนนี้ฉันใช้จ่ายเกิน budget ไหม?"
Agent:
1. ดึง memory: เป้าหมาย budget ของลูกค้า = 30,000 บาท/เดือน
2. เรียก Gateway: ดึง transactions เดือนนี้จาก Core Banking API
3. Code Interpreter: รัน pandas วิเคราะห์ categories การใช้จ่าย สร้าง pie chart
4. ตอบ: "เดือนนี้คุณใช้ไป 32,500 บาท เกิน budget 2,500 บาท
หมวดที่ใช้เกินมากที่สุดคืออาหาร (8,200 บาท, เกิน 23%)
[แนบ chart]"
5. บันทึก memory: อัปเดตว่าเดือนนี้เกิน budget
Use Case 2: Autonomous Research Agent สำหรับบริษัทวิจัยตลาด
บริษัทวิจัยต้องการ agent ที่สามารถรวบรวมข้อมูลจากเว็บ วิเคราะห์ข้อมูลจำนวนมาก และสร้างรายงานโดยอัตโนมัติ
สถาปัตยกรรม:
- AgentCore Browser Tool — agent ท่องเว็บ อ่าน news sites, SEC filings, social media เพื่อรวบรวมข้อมูลบริษัทเป้าหมาย
- AgentCore Code Interpreter — agent รัน Python วิเคราะห์ข้อมูลที่รวบรวมมา สร้างกราฟ, หา trend, คำนวณ financial ratios
- AgentCore Memory — เก็บ research findings ที่ผ่านมาเพื่อให้ agent เปรียบเทียบกับข้อมูลใหม่
- AgentCore Gateway — เรียก Bloomberg API, SET API สำหรับข้อมูลตลาดหลักทรัพย์
- AgentCore Observability — ติดตามว่า agent เข้าเว็บไหนบ้าง ใช้เวลาเท่าไหร่ ค่าใช้จ่ายรวม
ผลลัพธ์: รายงานวิเคราะห์หุ้นที่เคยใช้เวลา 2 วัน เหลือ 45 นาที ค่าใช้จ่ายต่อรายงาน ~500 บาท (เทียบกับ ~5,000 บาท ถ้าจ้าง analyst)
Use Case 3: HR Onboarding Agent สำหรับองค์กรขนาดใหญ่
บริษัทมีพนักงานใหม่เข้า 50-100 คนต่อเดือน ต้องการ agent ช่วยดูแล onboarding process ตั้งแต่วันแรก
สถาปัตยกรรม:
- AgentCore Runtime — deploy onboarding agent ที่รองรับ concurrent sessions สำหรับพนักงานใหม่หลายคนพร้อมกัน
- AgentCore Identity — OAuth กับ Microsoft Entra ID เพื่อให้ agent ตั้งค่า email, calendar, Teams account ในนามพนักงานใหม่
- AgentCore Gateway — เชื่อมต่อกับระบบ HR (Workday), IT Service Desk (ServiceNow), Active Directory เพื่อ provision accounts และ equipment
- AgentCore Memory — จำ progress ของพนักงานแต่ละคนว่า complete task ไหนแล้วบ้าง ยังเหลืออะไร
- AgentCore Browser Tool — กรอกแบบฟอร์มภาษีออนไลน์, ลงทะเบียน benefits portal แทนพนักงาน
Flow ตัวอย่าง:
- วันที่ 1: Agent ส่ง welcome message, ตรวจสอบว่า laptop, badge, parking ถูก setup แล้ว, สร้าง calendar invites สำหรับ orientation sessions
- วันที่ 3: Agent ติดตามว่า policy acknowledgments เสร็จหรือยัง, ส่ง reminder ถ้ายังไม่ทำ
- วันที่ 7: Agent สรุปว่า onboarding checklist เสร็จ 85% และแจ้ง HR team ว่ายังเหลืออะไร
ผลลัพธ์: ลด manual work ของ HR team ลง 70% ต่อพนักงาน 1 คน เพิ่มความพึงพอใจในการ onboarding จาก survey score 3.2/5 เป็น 4.6/5