Skip to Content
엔터프라이즈 Java 개발을 위한 응용 AI (Korean Edition)
book

엔터프라이즈 Java 개발을 위한 응용 AI (Korean Edition)

by Alex Soto Bueno, Markus Eisele, Natale Vinto
November 2025
Beginner to intermediate
430 pages
6h 48m
Korean
O'Reilly Media, Inc.
Content preview from 엔터프라이즈 Java 개발을 위한 응용 AI (Korean Edition)

제10장. LangGraph4j

이 작품은 AI를 사용하여 번역되었습니다. 여러분의 피드백과 의견을 환영합니다: translation-feedback@oreilly.com

에서 지난 두 장에서는 챗봇 구축, 텍스트 분류, RAG 시스템 개발 등 다양한 사용 사례에 걸쳐 LangChain4j 프로젝트를 활용하는 방법을 배웠습니다. 또한 벡터 임베딩 세계를 소개하며 클러스터링 등 다양한 사용 사례를 LangChain4j의 기능을 활용해 개발했습니다. 그러나 특정 고급 시나리오에서는 LangChain4j만으로는 부족하다는 점도 확인하셨을 것입니다.

복잡한 다중 에이전트 애플리케이션을 구축할 때는 수많은 prompt, 도구, 콘텐츠 검색기, RAG 등 다양한 구성 요소가 관여하게 됩니다. 이 모든 요소가 함께 작동하는 것은 매우 만족스러운 일이지만, 이전 장에서 언급한 바와 같이 이 접근 방식에는 몇 가지 어려움이 따릅니다:

  • 모델 속도를 저하시키고, 환각 위험(모델이 잘못된 응답을 제공하는 현상)을 증가시키며, 비용을 높일 수 있는 불필요한 토큰(예: 사용되지 않는 도구나 관련 없는 문서)을 제외합니다.

  • 다양한 에이전트의 상태 관리

  • 에이전트 조정

  • 더 복잡한 테스트 처리

  • 인간 상호작용 지원 또는 프로세스 병렬화를 위한 복잡한 행동 구현

LangGraph4j는 순환 그래프(간편을 위해 이 책에서는 그래프라고 부를 것입니다)를 사용하여 하나 이상의 에이전트를 조정하고 실행함으로써 이러한 문제를 해결합니다. 이 장에서는 여러 에이전트를 사용하거나 실행을 계속하기 위해 수동 단계가 필요한 고급 AI 애플리케이션을 구현하기 위한 LangGraph4j를 배울 것입니다. 비록 이 장에서는 LangGraph4j를 사용하지만, 다른 그래프 프레임워크도 유효합니다.

LangGraph4j에서 그래프 이해하기

LangGraph4j는 상태 저장형 다중 에이전트 애플리케이션 구축을 위한 프레임워크입니다( ). 주로 LangChain4j 및 Spring AI와 함께 작동하도록 설계되었습니다.

LangGraph4j는 노드, 에지 또는 에지 간 조건을 정의하는 순환 그래프를 구축하고 그래프를 탐색하며 각 노드에서 정의된 로직을 실행할 수 있는 API를 제공합니다.

그래프 정의 및 실행 외에도 LangGraph4j는 다음과 같은 기능을 제공합니다:

  • 상태 유지 그래프

  • 인간 상호작용

  • 중단점(일시 정지 및 재개)

  • 체크포인트

  • 병렬 실행

  • 부분 그래프

  • 시간 여행

LangGraph4j 사용법을 살펴보기 전에, 먼저 그래프의 핵심 개념을 복습해 보겠습니다. 그래프는 노드 (정점)와 이 노드들을 연결하는 에지로 구성된 비선형 데이터 구조입니다. 그래프는 엔터티 간의 관계 또는 네트워크를 표현합니다.

LangGraph4j의 관점에서 그래프를 구성하는 모든 요소를 살펴보겠습니다.

노드

노드 ( Node )는 함수를 호출하고 결과를 후속 노드에 반환하는 엔티티를 나타냅니다( ). 예를 들어, 노드는 타사 서비스에서 날씨나 환율을 가져오거나 LangChain4j를 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

AI 시스템 성능 엔지니어링 (Korean Edition)

AI 시스템 성능 엔지니어링 (Korean Edition)

Chris Fregly
생성형 AI를 위한 프롬프트 엔지니어링

생성형 AI를 위한 프롬프트 엔지니어링

제임스 피닉스, 마이크 테일러
AI 에이전트를 위한 메모리 관리

AI 에이전트를 위한 메모리 관리

Benjamin Labaschin, Jim Allen Wallace, Andrew Brookins, Manvinder Singh

Publisher Resources

ISBN: 0642572279882