개인 AI 조종사는 진정한 게임 체인저로 떠오르고 있습니다. 이들은 우리가 일상적인 작업과 책임을 관리하는 방식을 변화시킬 잠재력을 가지고 있습니다. 기본적인 챗봇과 달리, 이러한 지능형 비서는 우리 개인 생활의 세부 사항을 이해하는 정교한 시스템으로, 우리의 일상 활동을 훨씬 더 원활하고 효율적으로 만들어줍니다.
이러한 AI 조종사를 구축하는 것은 적절한 인프라가 없으면 복잡할 수 있습니다. AWS 멀티 에이전트 오케스트레이터는 여러 AI 에이전트를 관리하기 위한 유연하고 강력한 프레임워크입니다.여러 AI 에이전트. 오케스트레이터의 분류기는 사용자 입력, 에이전트의 특성 및 대화 기록을 기반으로 적절한 에이전트를 선택합니다. 오케스트레이터는 또한 에이전트별 대화 기록의 저장을 지원합니다.
다양한 작업을 위한 AI 조종사 구축
우리는 AI 조종사를 구축해 봅시다. 이 AI는 캘린더를 확인하고, 피트니스 루틴을 제안하며, 뉴스를 읽을 수 있습니다. 뉴스이러한 작업들은 완전히 별개의 작업으로, 사용자가 상호작용하는 동안 서로 다른 맥락을 가질 수 있습니다. 이 개인 비서의 전체 소스 코드는 여기에서 찾을 수 있습니다.
캘린더 에이전트
이것은 내부적으로 Calendly API를 사용하여 캘린더 초대를 가져오는 ApiAgent를 사용하는 체인 에이전트입니다. ApiAgent로부터의 응답은 초대를 요약하기 위해 BedrockLLMAgent로 스트리밍됩니다.
agent1 = ApiAgent(ApiAgentOptions(
endpoint = f"https://api.calendly.com/user_busy_times?user={CALENDLY_USER_URI}&start_time={start_time}&end_time={end_time}",
method = "GET",
name = "Calendly Schedule Agent",
description = "Specializes in Calendar scheduling",
streaming=False,
headers_callback=custom_headers_callback,
))
agent2 = BedrockLLMAgent(BedrockLLMAgentOptions(
name="Calendar Summarization",
streaming=True,
description="You are an AI agent specialized in summarizing calendar events. Given a list of events, produce a concise summary"\
" highlighting key details such as event names, dates, times, and participants. Ensure the summary is clear, brief, and "\
"informative for quick understanding. Do not provide duplicate information or irrelevant details.",
model_id="anthropic.claude-3-5-sonnet-20240620-v1:0",
callbacks=ChainlitAgentCallbacks()
))
뉴스 리더 에이전트
뉴스 리더 에이전트도 내부적으로 체인 에이전트를 사용하여 Gnews API를 사용하여 뉴스를 가져옵니다. ApiAgent로부터의 응답은 뉴스를 요약하기 위해 BedrockLLMAgent로 스트리밍됩니다.
agent1 = ApiAgent(ApiAgentOptions(
endpoint = f"https://gnews.io/api/v4/search?q=example&apikey={GNEWS_API_KEY}",
method = "GET",
name = "News Reader Agent",
description = "Specializes in reading news from various sources",
streaming=False
))
agent2 = BedrockLLMAgent(BedrockLLMAgentOptions(
name="News Summarization Agent",
streaming=True,
description="You are a skilled journalist tasked with creating concise, engaging news summaries."\
"Given the following text, produce a clear and informative summary that captures the key points," \
"main actors, and significant details. Your summary should be objective, well-structured, "\
"and easily digestible for a general audience. Aim for clarity and brevity while maintaining the essence of the news story.",
model_id="anthropic.claude-3-5-sonnet-20240620-v1:0",
callbacks=ChainlitAgentCallbacks()
))
피트니스 에이전트
피트니스 에이전트는 독립적인 에이전트로, LLM 모델을 사용하여 피트니스 루틴, 식단 계획 및 건강 팁을 제안합니다.
fitness_agent = BedrockLLMAgent(BedrockLLMAgentOptions(
name="Fitness Agent",
streaming=True,
description="Specializes in fitness, health, and wellness. It can provide workout routines, diet plans, and general health tips.",
model_id="anthropic.claude-3-5-sonnet-20240620-v1:0",
callbacks=ChainlitAgentCallbacks()
))
앱 실행하기
다음 지침을 따라 사전 요구 사항을 설정하세요.
1. 저장소 클론하기:
git clone https://github.com/ravilaudya/task-copilot.git
cd task-copilot
2. 가상 환경 생성:
conda create -p venv python=3.12
conda activate ./venv
3. 필요한 의존성 설치:
pip install -r requirements.txt
4. 앱 실행하기:
chainlit run app.py --port 8888
AI 조종사와 상호작용하기
앱이 실행되면 브라우저 창이 열리며 여기서 AI 조종사와 상호작용할 수 있습니다. 물어볼 수 있는 예시 질문들은 다음과 같습니다:
- “최신 뉴스는 무엇인가요?”
- “이번 주 캘린더는 어떻게 되어 있나요?”
- “체지방을 어떻게 줄일 수 있나요?”
결론
AI 조종사는 일상적인 작업을 간소화하고 개인 취향에 맞춘 빠르고 관련성 높은 정보를 제공하여 생산성을 향상시킵니다. 적절한 인프라가 갖추어지면 이러한 AI 조종사를 구축하는 것이 관리 가능하고 보람 있는 프로젝트가 됩니다. 이러한 조종사를 가지는 것은 마치 믿음직한 파트너를 곁에 두는 것과 같아 생활이 조금 더 쉬워집니다.
Source:
https://dzone.com/articles/ai-copilot-using-multi-agent-orchestrator