Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

`add agent --type byo` requires `--framework`, but the BYO path never uses it

Đang mở Phù hợp với người mới
#2,076 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
cli

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện ví dụ BYO trong docs/commands.md, sau đó đọc phần validation không tương tác trong src/cli/commands/add/validate.ts và entry point handleByoPath trong src/cli/primitives/AgentPrimitive.tsx. Được xem là hoàn tất khi lệnh BYO thành công mà không cần --framework và các giá trị framework không thay đổi agent đã đăng ký; hãy giữ nguyên hoặc làm rõ hành vi riêng của --model-provider.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
Description

Non-interactive agentcore add agent --type byo rejects the invocation with --framework is required (and then --model-provider is required), but the BYO path never consumes the framework value: it is not written to agentcore.json, not used for packaging, and has no effect on the deployed runtime. Any value satisfies the check, so users are forced to pick a framework that is meaningless for bring-your-own code. The BYO example in docs/commands.md — which omits --framework, reasonably — fails as written because of this.

Steps to Reproduce
  1. Create a project:
    agentcore create --name ByoRepro --no-agent
    cd ByoRepro
    
  2. Run the BYO example from docs/commands.md:
    agentcore add agent --name MyAgent --type byo --code-location ./my-agent --entrypoint main.py --language Python
    
  3. Observe --framework is required. Add any --framework value and observe the registered agent is identical regardless of which framework was given.
Expected Behavior

The BYO path accepts the invocation without --framework, as shown in the docs example. A flag that is required should influence the result; one that cannot is not asked for.

Actual Behavior

Validation fails with --framework is required (and --model-provider is required once a framework is supplied). Supplying e.g. --framework Strands vs --framework LangChain_LangGraph produces byte-identical agentcore.json entries.

CLI Version

0.27.1

Operating System

Linux

Additional Context

Cause: the non-interactive validation in src/cli/commands/add/validate.ts applies its "Non-MCP protocols: validate framework" block to the BYO path as well, while handleByoPath in src/cli/primitives/AgentPrimitive.tsx never reads options.framework. --model-provider has a marginal BYO use (non-Bedrock values set up an API-key credential), so it may deserve a default rather than removal — maintainer's call.

Related: #2075 (BYO ignores --language TypeScript) — independent defect, same code path.

Ngôn ngữ chính
TypeScript
Star
291
Fork
96
Merge trung bình
20 giờ 50 phút
Pull request đã merge (30 ngày)
214

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws/agentcore-cli

Tất cả issue của aws/agentcore-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.