Skip to content

feat: 5-Agent 리포트 생성용 AgentCore Runtime 컨테이너 - #86

Closed
gpffh20 wants to merge 1 commit into
mainfrom
feat/agentcore-runtime-deployment
Closed

gpffh20 wants to merge 1 commit into
mainfrom
feat/agentcore-runtime-deployment

Conversation

@gpffh20

@gpffh20 gpffh20 commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

개요

기존에 있었지만 아무도 안 쓰던 `deployment.py` 스캐폴딩(`agentcore_entrypoint`, `create_agentcore_runtime`)을 실제로 돌아가는 컨테이너로 완성합니다. 이게 있어야 `run_report_generation()`을 cpu-worker 안에서 in-process로 돌리는 대신 AWS Bedrock AgentCore Runtime이 호스팅하게 만들 수 있습니다.

  • `Dockerfile.agentcore-runtime`: KURE 임베딩 계산이 필요 없는 컨테이너라(그건 Evidence Research Agent가 AgentCore Gateway 경유로 하므로) torch/sentence-transformers 같은 무거운 ML extra 없이 base 의존성만 설치
  • `deployment.py`에 `if name == "main"` 진입점 추가 (`BedrockAgentCoreApp.run()`이 8080 포트에 AWS 표준 `/invocations`, `/ping`을 서빙)

검증

로컬에서 실제로 이미지 빌드 + 컨테이너 실행 + 두 엔드포인트 다 호출해서 확인:

  • `GET /ping` → `{"status":"Healthy"}`
  • `POST /invocations` → `agentcore_entrypoint → runtime_entrypoint.invoke() → run_report_generation()`까지 정확히 라우팅되는 것 확인 (DB 없는 단독 컨테이너 테스트라 DB 연결 실패로 끝났지만, raw crash가 아니라 깔끔한 JSON 에러로 반환됨 - 배선 자체는 정상)

남은 작업 (Infra repo, 별도 PR)

  • ECR 리포지토리 + CI 빌드/푸시
  • `aws_bedrockagentcore_agent_runtime` Terraform 리소스 + IAM 역할
  • cpu-worker가 in-process 호출 대신 이 Runtime을 실제로 invoke하도록 코드 변경

Test plan

  • 로컬 Docker 빌드 + `/ping`/`/invocations` 실제 호출 확인
  • `pytest tests/` 179 passed

…raph

Adds the actual container (Dockerfile.agentcore-runtime) and a __main__
entrypoint for the existing (previously unused) deployment.py scaffolding,
so run_report_generation() can be hosted by AWS Bedrock AgentCore Runtime
instead of always running in-process inside cpu-worker.

Only base dependencies are needed (no torch/sentence-transformers extra) -
this container never computes KURE embeddings itself, it goes through the
Evidence Research Agent's AgentCore Gateway path for that.

Verified locally: built the image, ran it, and confirmed both AWS's
required endpoints work - GET /ping returns Healthy, and POST
/invocations correctly routes through agentcore_entrypoint ->
runtime_entrypoint.invoke() -> run_report_generation(), failing cleanly
with a proper JSON error (not a raw crash) when it can't reach a database
(expected in this standalone container test, no DB configured).

Infra (ECR, aws_bedrockagentcore_agent_runtime, IAM, and actually wiring
cpu-worker to invoke this instead of running in-process) still needed -
separate PR.
@gpffh20 gpffh20 closed this Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant