Hugging Face smolagents로 AI 에이전트 만들기
Adel Nehme
VP of AI Curriculum, DataCamp






챗봇:
에이전트:
에이전트는 사이클을 따릅니다:


단 하나의 프롬프트로!

두 가지 에이전트 유형 지원:
ToolCallingAgent: 구조화된 함수 호출 사용CodeAgent: Python 코드 작성 및 실행
Action 1: {"tool": "search_company", "company": "Competitor A"}
Action 2: {"tool": "get_pricing", "company": "Competitor A", "plan": "Basic"}
Action 3: {"tool": "get_pricing", "company": "Competitor A", "plan": "Pro"}
Action 4: {"tool": "search_company", "company": "Competitor B"}
Action 5: {"tool": "get_pricing", "company": "Competitor B", "plan": "Basic"}
competitors = ["Competitor A", "Competitor B", "Competitor C"]
pricing_data = {}
for company in competitors:
company_info = search_company(company)
plans = extract_pricing_plans(company_info)
pricing_data[company] = plans
most_affordable_option = min(pricing_data,
key=lambda x: pricing_data[x]['basic_plan'])
연구에 따르면 함수 호출 방식 대비 성공률이 약 20% 높습니다.

Hugging Face smolagents로 AI 에이전트 만들기