-
Notifications
You must be signed in to change notification settings - Fork 35
[volume-10] Collect, Stack, Zip #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
JVHE
wants to merge
3
commits into
Loopers-dev-lab:JVHE
Choose a base branch
from
JVHE:round10
base: JVHE
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
apps/commerce-api/src/main/java/com/loopers/application/ranking/RankingAggregationInfo.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| package com.loopers.application.ranking; | ||
|
|
||
| import lombok.Getter; | ||
| import org.springframework.batch.core.JobExecution; | ||
|
|
||
| /** | ||
| * ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ๊ฒฐ๊ณผ ์ ๋ณด | ||
| */ | ||
| @Getter | ||
| public class RankingAggregationInfo { | ||
|
|
||
| private final Long jobExecutionId; | ||
| private final String jobName; | ||
| private final String status; | ||
| private final String exitStatus; | ||
| private final String period; // "weekly" or "monthly" | ||
| private final String message; | ||
|
|
||
| private RankingAggregationInfo( | ||
| Long jobExecutionId, | ||
| String jobName, | ||
| String status, | ||
| String exitStatus, | ||
| String period, | ||
| String message | ||
| ) { | ||
| this.jobExecutionId = jobExecutionId; | ||
| this.jobName = jobName; | ||
| this.status = status; | ||
| this.exitStatus = exitStatus; | ||
| this.period = period; | ||
| this.message = message; | ||
| } | ||
|
|
||
| public static RankingAggregationInfo from(JobExecution jobExecution, String period) { | ||
| return new RankingAggregationInfo( | ||
| jobExecution.getId(), | ||
| jobExecution.getJobInstance().getJobName(), | ||
| jobExecution.getStatus().name(), | ||
| jobExecution.getExitStatus() != null ? jobExecution.getExitStatus().getExitCode() : null, | ||
| period, | ||
| jobExecution.getExitStatus() != null ? jobExecution.getExitStatus().getExitDescription() : null | ||
| ); | ||
| } | ||
|
|
||
| public static RankingAggregationInfo combined( | ||
| RankingAggregationInfo weekly, | ||
| RankingAggregationInfo monthly | ||
| ) { | ||
| boolean bothSuccess = "COMPLETED".equals(weekly.status) && "COMPLETED".equals(monthly.status); | ||
| String combinedStatus = bothSuccess ? "COMPLETED" : "FAILED"; | ||
| String combinedMessage = String.format( | ||
| "Weekly: %s, Monthly: %s", | ||
| weekly.status, | ||
| monthly.status | ||
| ); | ||
|
|
||
| return new RankingAggregationInfo( | ||
| null, // combined์๋ jobExecutionId ์์ | ||
| "weeklyAndMonthlyRankingJob", | ||
| combinedStatus, | ||
| bothSuccess ? "COMPLETED" : "FAILED", | ||
| "both", | ||
| combinedMessage | ||
| ); | ||
| } | ||
| } | ||
|
|
47 changes: 47 additions & 0 deletions
47
...mmerce-api/src/main/java/com/loopers/application/ranking/RankingAggregationScheduler.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| package com.loopers.application.ranking; | ||
|
|
||
| import lombok.RequiredArgsConstructor; | ||
| import lombok.extern.slf4j.Slf4j; | ||
| import org.springframework.scheduling.annotation.Scheduled; | ||
| import org.springframework.stereotype.Component; | ||
|
|
||
| import java.time.ZonedDateTime; | ||
|
|
||
| /** | ||
| * ์ฃผ๊ฐ, ์๊ฐ ๋ญํน ์ค์ผ์ค๋ฌ | ||
| * <p> | ||
| * ๋งค์ผ ์์ ์ ์ผ๊ฐ ์ง๊ณ ์๋ฃ ํ ์ฃผ๊ฐ, ์๊ฐ ๋ญํน์ ๊ฐฑ์ ํฉ๋๋ค. | ||
| * ์คํ๋ง ๋ฐฐ์น๋ฅผ ์ฌ์ฉํ์ฌ tb_product_metrics_daily์ ์ผ๊ฐ ๋ฐ์ดํฐ๋ฅผ ์ง๊ณํ๊ณ , | ||
| * ์ฃผ๊ฐ ๋ฐ ์๊ฐ ๋ญํน์ ๊ณ์ฐํฉ๋๋ค. | ||
| * ์ด ์์ ์ Chunk ๋จ์๋ก ์ฒ๋ฆฌํ์ฌ ๋๋์ ๋ฐ์ดํฐ๋ฅผ ํจ์จ์ ์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค. | ||
| * spring batch read process write ํจํด์ ๋ฐ๋ฆ ๋๋ค. | ||
| */ | ||
| @Slf4j | ||
| @Component | ||
| @RequiredArgsConstructor | ||
| public class RankingAggregationScheduler { | ||
|
|
||
| private final RankingAggregationService rankingAggregationService; | ||
|
|
||
| /** | ||
| * ๋งค์ผ ์์ ์ ์คํ (์ผ๊ฐ ์ง๊ณ ์๋ฃ ํ) | ||
| * ์ฃผ๊ฐ, ์๊ฐ ๋ญํน ๊ฐฑ์ | ||
| */ | ||
| @Scheduled(cron = "0 0 0 * * *") // ๋งค์ผ ์์ | ||
| public void aggregateWeeklyAndMonthlyRankings() { | ||
| try { | ||
| log.info("์ค์ผ์ค๋ฌ: ์ฃผ๊ฐ ๋ฐ ์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ์์"); | ||
|
|
||
| // ์ด์ ๋ ์ง ๊ธฐ์ค์ผ๋ก ์ง๊ณ (์ค๋ ์์ ์ ์คํ๋๋ฏ๋ก ์ด์ ๋ฐ์ดํฐ๊น์ง ์ง๊ณ) | ||
| ZonedDateTime targetDate = ZonedDateTime.now().minusDays(1); | ||
|
|
||
| rankingAggregationService.executeWeeklyAndMonthlyRanking(targetDate); | ||
|
|
||
| log.info("์ค์ผ์ค๋ฌ: ์ฃผ๊ฐ ๋ฐ ์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ์๋ฃ"); | ||
|
|
||
| } catch (Exception e) { | ||
| log.error("์ค์ผ์ค๋ฌ: ์ฃผ๊ฐ ๋ฐ ์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ์คํจ", e); | ||
| // ์ค์ผ์ค๋ฌ๋ ์์ธ๋ฅผ ๋์ง์ง ์๊ณ ๋ก๊ทธ๋ง ๋จ๊น (๋ค์ ์คํ์ ์ํฅ ์ฃผ์ง ์์) | ||
| } | ||
| } | ||
| } | ||
172 changes: 172 additions & 0 deletions
172
...commerce-api/src/main/java/com/loopers/application/ranking/RankingAggregationService.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,172 @@ | ||
| package com.loopers.application.ranking; | ||
|
|
||
| import com.loopers.support.error.CoreException; | ||
| import com.loopers.support.error.ErrorType; | ||
| import lombok.extern.slf4j.Slf4j; | ||
| import org.springframework.batch.core.Job; | ||
| import org.springframework.batch.core.JobExecution; | ||
| import org.springframework.batch.core.JobParameters; | ||
| import org.springframework.batch.core.JobParametersBuilder; | ||
| import org.springframework.batch.core.launch.JobLauncher; | ||
| import org.springframework.beans.factory.annotation.Qualifier; | ||
| import org.springframework.stereotype.Component; | ||
|
|
||
| import java.time.DayOfWeek; | ||
| import java.time.ZonedDateTime; | ||
| import java.time.temporal.TemporalAdjusters; | ||
|
|
||
| /** | ||
| * ๋ญํน ์ง๊ณ ๋ฐฐ์น ์๋น์ค | ||
| * <p> | ||
| * ์ฃผ๊ฐ/์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น๋ฅผ ์คํํ๋ ์๋น์ค๋ฅผ ์ ๊ณตํฉ๋๋ค. | ||
| */ | ||
| @Slf4j | ||
| @Component | ||
| public class RankingAggregationService { | ||
|
|
||
| private final JobLauncher jobLauncher; | ||
| private final Job rankingJob; | ||
|
|
||
| public RankingAggregationService( | ||
| JobLauncher jobLauncher, | ||
| @Qualifier("rankingJob") Job rankingJob | ||
| ) { | ||
| this.jobLauncher = jobLauncher; | ||
| this.rankingJob = rankingJob; | ||
| } | ||
|
|
||
| /** | ||
| * ์ฃผ๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ | ||
| * | ||
| * @param targetDate ์ง๊ณ ๋์ ๋ ์ง (์ด ๋ ์ง๊ฐ ์ํ ์ฃผ๊ฐ์ ์ง๊ณ) | ||
| * @return JobExecution ์คํ ๊ฒฐ๊ณผ | ||
| * @note Spring Batch๋ ์์ฒด ํธ๋์ญ์ ์ ๊ด๋ฆฌํ๋ฏ๋ก @Transactional์ ์ฌ์ฉํ์ง ์์ต๋๋ค. | ||
| */ | ||
| public RankingAggregationInfo executeWeeklyRanking(ZonedDateTime targetDate) { | ||
| if (targetDate == null) { | ||
| throw new CoreException(ErrorType.BAD_REQUEST, "์ง๊ณ ๋์ ๋ ์ง๋ ํ์์ ๋๋ค."); | ||
| } | ||
|
|
||
| log.info("์ฃผ๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ์์: targetDate={}", targetDate); | ||
|
|
||
| try { | ||
| // ์ฃผ๊ฐ ์์์ผ/์ข ๋ฃ์ผ ๊ณ์ฐ | ||
| ZonedDateTime weekStart = targetDate.with(TemporalAdjusters.previousOrSame(DayOfWeek.MONDAY)) | ||
| .toLocalDate() | ||
| .atStartOfDay(targetDate.getZone()); | ||
| ZonedDateTime weekEnd = targetDate.with(TemporalAdjusters.nextOrSame(DayOfWeek.SUNDAY)) | ||
| .toLocalDate() | ||
| .atTime(23, 59, 59) | ||
| .atZone(targetDate.getZone()); | ||
| ZonedDateTime rankingDate = weekEnd; | ||
|
|
||
| // Job ํ๋ผ๋ฏธํฐ ์์ฑ | ||
| JobParameters jobParameters = new JobParametersBuilder() | ||
| .addString("periodType", "weekly") | ||
| .addString("rankingDate", rankingDate.toString()) | ||
| .addString("startDate", weekStart.toLocalDate().toString()) | ||
| .addString("endDate", weekEnd.toLocalDate().toString()) | ||
| .addLong("timestamp", System.currentTimeMillis()) | ||
| .toJobParameters(); | ||
|
|
||
| // ๋ฐฐ์น ์คํ | ||
| JobExecution jobExecution = jobLauncher.run(rankingJob, jobParameters); | ||
|
|
||
| log.info("์ฃผ๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ์๋ฃ: jobExecutionId={}, status={}, exitStatus={}", | ||
| jobExecution.getId(), | ||
| jobExecution.getStatus(), | ||
| jobExecution.getExitStatus()); | ||
|
|
||
| return RankingAggregationInfo.from(jobExecution, "weekly"); | ||
|
|
||
| } catch (Exception e) { | ||
| log.error("์ฃผ๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ์คํจ: targetDate={}", targetDate, e); | ||
| throw new CoreException(ErrorType.INTERNAL_ERROR, | ||
| "์ฃผ๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ์ ์คํจํ์ต๋๋ค: " + e.getMessage()); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * ์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ | ||
| * | ||
| * @param targetDate ์ง๊ณ ๋์ ๋ ์ง (์ด ๋ ์ง๊ฐ ์ํ ์๊ฐ์ ์ง๊ณ) | ||
| * @return JobExecution ์คํ ๊ฒฐ๊ณผ | ||
| * @note Spring Batch๋ ์์ฒด ํธ๋์ญ์ ์ ๊ด๋ฆฌํ๋ฏ๋ก @Transactional์ ์ฌ์ฉํ์ง ์์ต๋๋ค. | ||
| */ | ||
| public RankingAggregationInfo executeMonthlyRanking(ZonedDateTime targetDate) { | ||
| if (targetDate == null) { | ||
| throw new CoreException(ErrorType.BAD_REQUEST, "์ง๊ณ ๋์ ๋ ์ง๋ ํ์์ ๋๋ค."); | ||
| } | ||
|
|
||
| log.info("์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ์์: targetDate={}", targetDate); | ||
|
|
||
| try { | ||
| // ์๊ฐ ์์์ผ/์ข ๋ฃ์ผ ๊ณ์ฐ | ||
| ZonedDateTime monthStart = targetDate.with(TemporalAdjusters.firstDayOfMonth()) | ||
| .toLocalDate() | ||
| .atStartOfDay(targetDate.getZone()); | ||
| ZonedDateTime monthEnd = targetDate.with(TemporalAdjusters.lastDayOfMonth()) | ||
| .toLocalDate() | ||
| .atTime(23, 59, 59) | ||
| .atZone(targetDate.getZone()); | ||
| ZonedDateTime rankingDate = monthEnd; | ||
|
|
||
| // Job ํ๋ผ๋ฏธํฐ ์์ฑ | ||
| // monthly๋ Reader์์ ์ต๊ทผ 30์ผ๋ก ์๋ ๊ณ์ฐํ๋ฏ๋ก startDate/endDate ์๋ต | ||
| JobParameters jobParameters = new JobParametersBuilder() | ||
| .addString("periodType", "monthly") | ||
| .addString("rankingDate", rankingDate.toString()) | ||
| // startDate, endDate๋ Reader์์ ์๋ ๊ณ์ฐ (์ต๊ทผ 30์ผ) | ||
| .addLong("timestamp", System.currentTimeMillis()) | ||
| .toJobParameters(); | ||
|
|
||
| // ๋ฐฐ์น ์คํ | ||
| JobExecution jobExecution = jobLauncher.run(rankingJob, jobParameters); | ||
|
|
||
| log.info("์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ์๋ฃ: jobExecutionId={}, status={}, exitStatus={}", | ||
| jobExecution.getId(), | ||
| jobExecution.getStatus(), | ||
| jobExecution.getExitStatus()); | ||
|
|
||
| return RankingAggregationInfo.from(jobExecution, "monthly"); | ||
|
|
||
| } catch (Exception e) { | ||
| log.error("์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ์คํจ: targetDate={}", targetDate, e); | ||
| throw new CoreException(ErrorType.INTERNAL_ERROR, | ||
| "์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ์ ์คํจํ์ต๋๋ค: " + e.getMessage()); | ||
| } | ||
| } | ||
|
|
||
| /** | ||
| * ์ฃผ๊ฐ ๋ฐ ์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ | ||
| * | ||
| * @param targetDate ์ง๊ณ ๋์ ๋ ์ง | ||
| * @return ๋ฐฐ์น ์คํ ๊ฒฐ๊ณผ | ||
| * @note Spring Batch๋ ์์ฒด ํธ๋์ญ์ ์ ๊ด๋ฆฌํ๋ฏ๋ก @Transactional์ ์ฌ์ฉํ์ง ์์ต๋๋ค. | ||
| */ | ||
| public RankingAggregationInfo executeWeeklyAndMonthlyRanking(ZonedDateTime targetDate) { | ||
| if (targetDate == null) { | ||
| throw new CoreException(ErrorType.BAD_REQUEST, "์ง๊ณ ๋์ ๋ ์ง๋ ํ์์ ๋๋ค."); | ||
| } | ||
|
|
||
| log.info("์ฃผ๊ฐ ๋ฐ ์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ์์: targetDate={}", targetDate); | ||
|
|
||
| try { | ||
| // ์ฃผ๊ฐ ๋ญํน ์ง๊ณ | ||
| RankingAggregationInfo weeklyResult = executeWeeklyRanking(targetDate); | ||
|
|
||
| // ์๊ฐ ๋ญํน ์ง๊ณ | ||
| RankingAggregationInfo monthlyResult = executeMonthlyRanking(targetDate); | ||
|
|
||
| log.info("์ฃผ๊ฐ ๋ฐ ์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ์๋ฃ"); | ||
|
|
||
| return RankingAggregationInfo.combined(weeklyResult, monthlyResult); | ||
|
|
||
| } catch (Exception e) { | ||
| log.error("์ฃผ๊ฐ ๋ฐ ์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ ์คํจ: targetDate={}", targetDate, e); | ||
| throw new CoreException(ErrorType.INTERNAL_ERROR, | ||
| "์ฃผ๊ฐ ๋ฐ ์๊ฐ ๋ญํน ์ง๊ณ ๋ฐฐ์น ์คํ์ ์คํจํ์ต๋๋ค: " + e.getMessage()); | ||
| } | ||
| } | ||
| } | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐งฉ Analysis chain
๐ Script executed:
# First, check the file size and read the full RankingAggregationScheduler.java wc -l apps/commerce-api/src/main/java/com/loopers/application/ranking/RankingAggregationScheduler.javaRepository: Loopers-dev-lab/loopers-spring-java-template
Length of output: 187
๐ Script executed:
# Read the full file to understand context cat -n apps/commerce-api/src/main/java/com/loopers/application/ranking/RankingAggregationScheduler.javaRepository: Loopers-dev-lab/loopers-spring-java-template
Length of output: 1742
๐ Script executed:
Repository: Loopers-dev-lab/loopers-spring-java-template
Length of output: 7869
๐ Script executed:
Repository: Loopers-dev-lab/loopers-spring-java-template
Length of output: 867
๐ Script executed:
Repository: Loopers-dev-lab/loopers-spring-java-template
Length of output: 112
๐ Script executed:
Repository: Loopers-dev-lab/loopers-spring-java-template
Length of output: 767
๐ Script executed:
Repository: Loopers-dev-lab/loopers-spring-java-template
Length of output: 484
๐ Script executed:
Repository: Loopers-dev-lab/loopers-spring-java-template
Length of output: 184
๐ Script executed:
# Read the RankingAggregationService cat -n apps/commerce-api/src/main/java/com/loopers/application/ranking/RankingAggregationService.javaRepository: Loopers-dev-lab/loopers-spring-java-template
Length of output: 7699
๐ Script executed:
# Check the RankingAggregationJobConfig to understand batch execution cat -n apps/commerce-api/src/main/java/com/loopers/application/ranking/batch/RankingAggregationJobConfig.javaRepository: Loopers-dev-lab/loopers-spring-java-template
Length of output: 1220
๐ Script executed:
Repository: Loopers-dev-lab/loopers-spring-java-template
Length of output: 581
๐ Script executed:
Repository: Loopers-dev-lab/loopers-spring-java-template
Length of output: 2152
์์คํ ํ์์กด์ ๋ํ ๋ช ์์ ์ง์ ํ์
ZonedDateTime.now()๋ ์์คํ ๊ธฐ๋ณธ ํ์์กด์ ์ฌ์ฉํ๋๋ฐ, ๋ฐฐํฌ ํ๊ฒฝ์ ๋ฐ๋ผ ๋ฌ๋ผ์ง ์ ์์ต๋๋ค. ๊ฐ์ ์๋น์ค์ ๋ค๋ฅธ ๋ฉ์๋๋ค(๋ผ์ธ 54-60)์์๋ ์ด๋ฏธtargetDate.getZone()์ผ๋ก ๋ช ์์ ํ์์กด์ ์ฌ์ฉํ๊ณ ์์ผ๋ฏ๋ก, ์ผ๊ด์ฑ ์ ์ง๋ฅผ ์ํด ์ฌ๊ธฐ์๋ ๊ฐ์ ๋ฐฉ์์ ์ ์ฉํ์ธ์:๋ํ ํด๋์ค ์ฃผ์์์ "์ผ๊ฐ ์ง๊ณ ์๋ฃ ํ" ์คํ๋๋ค๊ณ ๋ช ์๋์ด ์์ผ๋, ์ค์ ์ผ๊ฐ ์ง๊ณ ๋ฐฐ์น๋ฅผ ํธ๋ฆฌ๊ฑฐํ๋ ์ค์ผ์ค๋ฌ๊ฐ ๋ช ํํ์ง ์์ต๋๋ค. ์๋ํ ์ผ๊ฐ ์ง๊ณ ๋ฐฐ์น์์ ์คํ ์์ ๋ณด์ฅ ๋ฉ์ปค๋์ฆ์ ํ์ธํ๊ณ ํ์์ ์ถ๊ฐํด์ผ ํฉ๋๋ค.
๐ค Prompt for AI Agents