Reports 탭
LLM 멀티에이전트가 생성한 분석 보고서를 의뢰하고 결과를 확인하는 화면입니다.
📸 Reports 탭 화면 (추후 자동 캡처 예정)
레이아웃
3-컬럼 그리드로 구성됩니다 (lg:grid-cols-3).
| 영역 | 컬럼 | 컴포넌트 |
|---|---|---|
| 좌측 | 1col | AnalyzeForm (web/src/components/equity/AnalyzeForm.tsx) |
| 우측 | 2col | Recent reports 리스트 |
| 모달 | 우측 슬라이드 | ReportDrawer (web/src/components/equity/ReportDrawer.tsx) |
AnalyzeForm (분석 의뢰)
| 필드 | 입력 방식 | 비고 |
|---|---|---|
| Symbol | SymbolSearch 자동완성 | 여러 종목 추가 가능 |
| 칩 영역 | 추가된 종목 토큰 | 클릭하여 제거 |
| Mode | select (Quick / Standard / Full) | 기본 Standard |
Mode 차이:
| 모드 | 처리 시간 | 비용 | 에이전트 깊이 |
|---|---|---|---|
quick | ~10s | 낮음 | Technical만 |
standard | 30s-1m | 중 | Technical + Intel |
full | 2-5m | 높음 | Technical + Intel + Risk + Decision |
quick 모드만 inline 동기 실행이 가능하며, 나머지는 모두 큐를 통해 워커가 처리합니다.
제출 후 동작
- Submit 버튼 클릭 →
POST /api/equity/analyze - 서버가
report_uuid와status: queued반환 (HTTP 202) - 폼 자동 초기화 + ReportDrawer가 즉시 열림
- ReportDrawer가 1초 폴링하며
status업데이트
Recent reports 리스트
각 행은 자산군 배지, 심볼, status, signal 배지, confidence %, 요청 시각을 표시합니다. 행을 클릭하면 ReportDrawer가 우측에서 슬라이드인 됩니다.
| 컬럼 | 데이터 | 컬러 매핑 |
|---|---|---|
| Status | queued / running / done / partial / failed | 각각 zinc / amber / emerald / amber / rose |
| Signal | BUY / HOLD / SELL | emerald / zinc / rose |
| Confidence | 0–100% | 회색 텍스트 |
ReportDrawer (상세)
ReportDrawer는 다음 섹션을 포함합니다.
| 섹션 | 내용 |
|---|---|
| Header | 자산군 배지, 심볼, 거래소, Status 배지 |
| Decision summary | Signal 배지, Confidence %, Sentiment score, 1줄 요약 |
| Key levels | Ideal buy / Secondary buy / Stop loss / Take profit (currency 표시) |
| Risk flags | severity (high/medium/low) + 메시지 |
| Agent opinions | Technical / Intel / Decision 각자의 reasoning + signal |
| Metadata | 모델명 / 토큰 사용량 / 비용 / 요청·완료 시각 |
| Agent traces | step별 duration, tokens, reasoning 미리보기 |
API 연동
| Method | Path | 용도 |
|---|---|---|
| POST | /api/equity/analyze | AnalyzeForm 제출 |
| GET | /api/equity/reports?asset_class=...&limit=50 | Recent reports |
| GET | /api/equity/reports/{uuid} | ReportDrawer 본문 |
| GET | /api/equity/reports/{uuid}/traces | Drawer agent traces |
| DELETE | /api/equity/reports/{uuid} | (현재 UI 미연결) |
POST /analyze 예시
curl -s -X POST -H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
http://localhost:8000/api/equity/analyze \
-d '{
"items": [{"asset_class": "us_equity", "symbol": "TSLA"}],
"mode": "standard"
}'
응답 (202 Accepted):
{
"reports": [
{
"report_uuid": "9c7e1b4a-...",
"status": "queued",
"asset_class": "us_equity",
"symbol": "TSLA",
"requested_at": "2026-04-26T01:23:45Z"
}
]
}
자주 묻는 질문
Q. 분석이 failed 상태로 끝났습니다.
A. ReportDrawer 메타데이터의 error_message를 확인하세요. 흔한 원인은 LLM API 키 부재(ANTHROPIC_API_KEY), 데이터 프로바이더 401, 토큰 한도 초과입니다. LLM 예산 초과 참고.
Q. 보고서를 삭제하고 싶습니다.
A. UI 삭제 버튼은 미노출이지만 DELETE /api/equity/reports/{uuid} 호출로 삭제 가능합니다 (cascade로 traces·queue rows도 제거).
Q. 같은 종목을 다시 분석하면 비용이 누적되나요?
A. 모든 분석은 새 보고서를 생성합니다. cost_usd는 LLM 호출 누적값이므로 동일 종목 재분석 시 추가 비용이 발생합니다.