# Pipeline Integration ADO2 Agent 파이프라인에 본 엔진을 통합하는 인터페이스 스펙. ## 입력 인터페이스 ```python # agents/src/integrations/higgsfield_shorts.py 에서 호출 from engine.higgsfield_shorts import generate_short result = await generate_short( tenant_id="acme-pension", shoot_id="2026-06-15_summer-shoot", photos=[ "s3://ado2/media/acme/p1.jpg", # 3~5장 "s3://ado2/media/acme/p2.jpg", "s3://ado2/media/acme/p3.jpg", ], concept_id="cinematic-trailer", # concepts/ 라이브러리에서 선택 brand={ "name": "○○펜션", "location": "강원 양양", "cta_url": "https://booking.example.com/acme", }, options={ "aspect_ratio": "9:16", "duration": 8, "caption_lang": "ko", }, ) # result.video_url, result.thumbnail_url, result.cost_usd, result.metrics ``` ## 출력 메타데이터 ```json { "video_url": "s3://ado2/output/acme/2026-06-15/cinematic-trailer.mp4", "thumbnail_url": "s3://ado2/output/acme/2026-06-15/cinematic-trailer.jpg", "trust_track_link": "s3://ado2/output/acme/2026-06-15/trust-slideshow.mp4", "concept_id": "cinematic-trailer", "duration_seconds": 8, "cost_usd": 1.42, "quality_score": 0.87, "render_time_seconds": 240, "metadata_for_distribution": { "suggested_caption": "...", "suggested_hashtags": [...], "suggested_post_time": "...", "ai_disclosure_required": true } } ``` ## MarketingState 통합 `agents/src/common/state.py`의 `MarketingState`에 다음 필드 추가: ```python class MarketingState(TypedDict): # ... existing fields higgsfield_renders: list[HiggsfieldRender] # 어텐션 트랙 결과들 trust_track_renders: list[CreatomateRender] # 트러스트 트랙 결과들 paired_assets: dict[str, str] # shoot_id -> trust_video_id 매핑 ``` ## Distribution Agent 핸드오프 Distribution Agent는 두 트랙을 **페어 배포** 한다: 1. **Reels/Shorts 피드** ← Higgsfield (어텐션) 2. **프로필 핀 게시물** ← Creatomate (트러스트) 3. **캡션 자동 생성** 시 AI 디스클로저 라인 포함 ("AI로 재해석한 ○○펜션의 무드") ## Phase 2 (자동화 도입 후) - Content Agent가 사진셋 자동 분석 → 컨셉 자동 선택 - 1개 사진셋 → 2개 컨셉으로 A/B 자동 생성 - 7일 후 Analytics Agent가 컨셉별 성과 학습 → 컨셉 가중치 업데이트