Skip to content

[week-06] 26512075 - #307

Open
helenjeon101 wants to merge 22 commits into
Q00:mainfrom
helenjeon101:week-06
Open

helenjeon101 wants to merge 22 commits into
Q00:mainfrom
helenjeon101:week-06

Conversation

@helenjeon101

Copy link
Copy Markdown

What I built

A2A v1.0 램프·의자·책장 가게입니다. Python seller가 JSON-RPC로 ask를 내고 reserve 이상에서만 딜을 닫고, TypeScript buyer가 budget 안에서 오퍼를 넣습니다. 결정은 Codex CLI(gpt-6.1-sol) harness가 하고, challenge 1은 카탈로그 shortlist, challenge 2는 여러 shop 협상입니다. Seller는 https://ai-agent-engineering-a2a.vercel.app에 올라가 있고 Agent Card는 /.well-known/agent-card.json입니다.

Deployed seller: https://ai-agent-engineering-a2a.vercel.app
Env on the host: PUBLIC_BASE_URL, HARNESS_BACKEND=openai, OPENAI_API_KEY, REDIS_URL.

What I tried and discarded

  • JS SDK sendMessage는 role: "user"와 kind parts를 보내서 서버가 -32602 INVALID_PARAMS를 냈습니다. buyer는 ROLE_USER와 {"text": ...}로 raw fetch하게 바꿨습니다.
  • decide()가 Codex 성공 시 None을 돌려줬습니다. --output-last-message 읽기가 if result.returncode: 안, raise 뒤에 들어가 있었습니다. 성공 경로로 뺐습니다.
  • 모델이 price 대신 ask를 주거나 필드를 빼먹어서 offer or acceptance needs a positive integer price가 났습니다. normalize가 ask를 price로 옮기고, reserve/budget은 코드에서 다시 검사합니다.
  • receipt 추출이 content.$case === "data"만 봐서, 실제 part {"data": {...}}와 item: "blue bamboo lamp 00" vs "lamp"에서 실패했습니다. 두 shape와 이름 포함을 받게 고쳤습니다.
  • 서버 배포에 Codex CLI 로그인은 안 됩니다. 배포본은 HARNESS_BACKEND=openai입니다. task 저장은 REDIS_URL이 있으면 Upstash, 없으면 메모리입니다.

How to run

printenv OPENAI_API_KEY | codex login --with-api-key

python seller.py --port 9999
npx tsx src/buyer.ts --url http://127.0.0.1:9999 --item lamp --budget 120

Checklist

  • python scripts/check_week06.py submissions/<student-id>/week-01 passes locally (skip for roster PRs)
  • Run logs are committed under logs/
  • No API keys anywhere in the diff
  • History is not squashed

This branch has not been deployed

No deployments
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