Skip to main content
← AI Agent 아키텍처 개요

프레임워크 비교 요약

프레임워크개발사특징Databricks 통합
Databricks Agent FrameworkDatabricksUnity Catalog 통합, MLflow 추적, 원클릭 배포네이티브
LangChain / LangGraphLangChain Inc.가장 큰 생태계, 유연한 그래프 구성MLflow 통합
CrewAICrewAI역할 기반 멀티에이전트, 직관적 APIMLflow 로깅
AutoGenMicrosoft멀티에이전트 대화, 코드 실행커스텀 통합
OpenAI Agents SDKOpenAIHandoff 패턴, Guardrail 내장커스텀 통합

Databricks Agent Framework (ChatAgent 패턴)

from mlflow.pyfunc import ChatAgent
from mlflow.types.agent import (
    ChatAgentMessage,
    ChatAgentResponse,
    ChatContext,
)

class MyAgent(ChatAgent):
    def predict(
        self,
        messages: list[ChatAgentMessage],
        context: ChatContext
    ) -> ChatAgentResponse:
        # 1. 메시지 분석
        # 2. 도구 호출 결정
        # 3. 결과 종합 및 응답 생성
        return ChatAgentResponse(
            messages=[ChatAgentMessage(role="assistant", content="...")]
        )

LangGraph (StateGraph 패턴)

from langgraph.graph import StateGraph, START, END

# 상태 정의
class AgentState(TypedDict):
    messages: list
    next_action: str

# 노드 정의 (각 처리 단계)
def analyze_query(state: AgentState):
    # LLM으로 사용자 의도 분석
    ...

def execute_tool(state: AgentState):
    # 도구 실행
    ...

# 그래프 구성 (노드 + 엣지)
graph = StateGraph(AgentState)
graph.add_node("analyze", analyze_query)
graph.add_node("execute", execute_tool)
graph.add_edge(START, "analyze")
graph.add_conditional_edges("analyze", route_decision)
graph.add_edge("execute", END)

agent = graph.compile()

CrewAI (Agent-Task-Crew 패턴)

from crewai import Agent, Task, Crew

# 에이전트 정의 (역할/목표/배경)
researcher = Agent(
    role="데이터 분석가",
    goal="매출 데이터를 분석하여 인사이트 도출",
    backstory="10년 경력의 비즈니스 인텔리전스 전문가",
)

# 태스크 정의 (설명/기대출력/담당 에이전트)
analysis_task = Task(
    description="지난 분기 매출 트렌드를 분석하세요",
    expected_output="트렌드 요약 보고서 (Markdown)",
    agent=researcher,
)

# 크루 구성 및 실행
crew = Crew(agents=[researcher], tasks=[analysis_task])
result = crew.kickoff()
성공 Databricks 환경 권장: Databricks Agent Framework(ChatAgent)를 기본으로 사용하고, 복잡한 워크플로우가 필요한 경우 LangGraph를 MLflow와 함께 활용하세요.

Databricks Agent Framework 활용

기능설명
UC Functions as ToolsUnity Catalog 함수를 Agent 도구로 등록
Vector SearchRAG를 위한 벡터 검색 통합
MLflow TracingAgent 실행 과정 전체 추적 (각 Tool Call, LLM 호출 기록)
Review App인간 피드백 수집 인터페이스
Model Serving원클릭 Agent 배포 (서버리스)
Guardrails입출력 안전성 필터링
Agent EvaluationMLflow Evaluate로 Agent 품질 자동 측정

다음: 프로덕션 운영 가이드 →