-
Notifications
You must be signed in to change notification settings - Fork 313
fix(kagent-adk/cli/test): fix "NotADirectoryError: [Errno 20] Not a directory: 'xxx/agent-card.json'" #1027
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Fix the NotADirectoryError in the test CLI by decoupling the agent config file path from the agent card path.
- Replace --filepath with explicit --agent-config and add --agent-card flags
- Open the two files directly instead of joining agent-card.json to the config path
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
EItanya
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change? Why can't both files be in the same directory?
They can be in the same directory. The issue is that |
Yes, let's do that |
…irectory: 'xxx/agent-card.json'" ## Before ``` $ uv run cli.py test --task 'who are you' --filepath config.json ... NotADirectoryError: [Errno 20] Not a directory: 'config.json/agent-card.json' ``` ## After ``` $ uv run cli.py test --task 'who are you' --agent-config config.json --agent-card agent-card.json ... INFO:root:Starting KAgent INFO:kagent.adk._a2a: >>> User Query: who are you ... ``` Signed-off-by: Huang Huang <[email protected]> Signed-off-by: mozillazg <[email protected]>
Signed-off-by: mozillazg <[email protected]>
@EItanya DONE. |
Before
After