Describe the bug
In the .NET implementation of the Microsoft Agent Framework, the Skill execution module for external command-line (CLI) scripts has a critical parameter formatting bug. When invoking standard CLI commands/scripts (e.g., scripts/tool.py input.docx --output input.index), the framework automatically converts the native command-line argument list (string[]) into a Dictionary<string, object> type. This breaks all standard CLI parameter parsers and causes external scripts/programs to fail execution.
To Reproduce
- Create a Skill using the .NET Agent Framework to invoke an external CLI script (Python/.NET console app).
- Pass standard CLI arguments:
input.docx --output input.index.
- Execute the Skill to run the external script.
- The script fails to parse arguments due to the invalid dictionary format.
Expected behavior
The Skill should preserve the original command-line argument format as a string array (string[]) and pass it directly to the external process. This ensures compatibility with standard parsers (e.g., argparse, .NET Main(string[] args)).
Actual behavior
The Skill layer forcibly serializes/transforms the input arguments into a Dictionary<string, object> (key-value pairs). Standard CLI tools cannot recognize this format, resulting in parsing errors, index out-of-range exceptions, or failed execution.
Root Cause
The .NET Skill parameter handling component enforces conversion of user-provided CLI arguments to Dictionary<string, object> instead of retaining the native string array format. This violates standard command-line interface specifications.
Impact
- Framework: Microsoft Agent Framework (.NET)
- Module: Skill / External CLI Script Execution
- Scenario: All use cases calling standard CLI tools with positional arguments and named options (
--output, etc.)
Additional Context
- Expected Argument Format:
["input.docx", "--output", "input.index"] (string[])
- Actual (Broken) Format:
{"input": "input.docx", "--output": "input.index"} (Dictionary<string, object>)
- Affected command example:
scripts/tool.py input.docx --output input.index
Suggested Fix
Modify the .NET Skill parameter pipeline:
- Add native support for passing raw
string[] command-line arguments to external processes.
- Remove the forced conversion to
Dictionary<string, object> for CLI execution scenarios.
- Maintain full compatibility with standard POSIX-style CLI argument conventions.
Code Sample
Error Messages / Stack Traces
Package Versions
1.1.0
.NET Version
No response
Additional Context
No response
Describe the bug
In the .NET implementation of the Microsoft Agent Framework, the Skill execution module for external command-line (CLI) scripts has a critical parameter formatting bug. When invoking standard CLI commands/scripts (e.g.,
scripts/tool.py input.docx --output input.index), the framework automatically converts the native command-line argument list (string[]) into aDictionary<string, object>type. This breaks all standard CLI parameter parsers and causes external scripts/programs to fail execution.To Reproduce
input.docx --output input.index.Expected behavior
The Skill should preserve the original command-line argument format as a string array (
string[]) and pass it directly to the external process. This ensures compatibility with standard parsers (e.g.,argparse, .NETMain(string[] args)).Actual behavior
The Skill layer forcibly serializes/transforms the input arguments into a
Dictionary<string, object>(key-value pairs). Standard CLI tools cannot recognize this format, resulting in parsing errors, index out-of-range exceptions, or failed execution.Root Cause
The .NET Skill parameter handling component enforces conversion of user-provided CLI arguments to
Dictionary<string, object>instead of retaining the native string array format. This violates standard command-line interface specifications.Impact
--output, etc.)Additional Context
["input.docx", "--output", "input.index"](string[]){"input": "input.docx", "--output": "input.index"}(Dictionary<string, object>)scripts/tool.py input.docx --output input.indexSuggested Fix
Modify the .NET Skill parameter pipeline:
string[]command-line arguments to external processes.Dictionary<string, object>for CLI execution scenarios.Code Sample
Error Messages / Stack Traces
Package Versions
1.1.0
.NET Version
No response
Additional Context
No response