프로덕션 에이전트 아키텍처
2025년 하반기, AI 에이전트가 프로덕션에서 본격 활용되고 있습니다. 안정적 운영을 위한 패턴이 중요합니다.
핵심 패턴
class ProductionAgent {
private maxRetries = 3;
private timeout = 30000;
private fallbackModel = "claude-3-5-haiku";
async run(task: string) {
try {
return await withTimeout(
this.agent.execute(task),
this.timeout
);
} catch (err) {
await this.logError(err);
return this.fallback(task);
}
}
}- 타임아웃과 재시도 설정
- 폴백 모델 준비
- 비용 제한 (max_tokens)
댓글 0