Files

AI Web Agent Console

HMM 업무 데이터를 MCP 도구로 조회하고 OCI Generative AI로 답변을 구성하는 Streamlit 애플리케이션이다. 과거 PoC 번호나 소스 추출 날짜는 애플리케이션 이름과 패키지 경계로 사용하지 않는다.

구조

ai-web-agent-console/
├── app.py                       Streamlit 실행 진입점
├── ai_web_agent_console/        인증, 화면, MCP, 모델, 질의 계약 모듈
├── config/                      제품·모델·MCP·시나리오 JSON
├── tests/                       Python 회귀 테스트
├── .env.example                 환경변수 예시
└── requirements.txt

실행

cd ai-web-agent-console
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/streamlit run app.py --server.address 0.0.0.0 --server.port 8622

인증 게이트웨이는 같은 디렉토리에서 다음과 같이 실행한다.

.venv/bin/python -m ai_web_agent_console.auth_gateway

설정

  • config/app_profile.json: 제품명, 설명, 아이콘, 색상
  • config/mcp_servers.json: MCP endpoint와 허용 도구
  • config/model_profiles.json: OCI Generative AI 모델 profile
  • config/vpd_token_presets.json: 데모 사용자와 토큰 환경변수 매핑
  • config/hmm_demo_scenarios.json: 화면의 예제 질문
  • config/hmm_hr_query_contracts.json: 질의별 필수 근거와 계산·시간 규칙

실제 토큰, DB 비밀번호, Wallet, OCI private key는 Git에 넣지 않는다. 데모 사용자 JSON은 HMM_MCP_BEARER_TOKEN 같은 환경변수 이름만 참조한다.

검증

python3 -m compileall -q app.py ai_web_agent_console tests
python3 -m unittest discover -s tests -p 'test_*.py'

운영 호환성

운영 서버의 물리 경로 /opt/hmm-poc4와 기존 SQLite 테이블명은 대화 이력과 서비스 전환 호환을 위해 유지할 수 있다. Git 폴더, Python 패키지와 실행 명령은 이 문서의 새 이름만 사용한다.