Description
agentcore export harness produces an agent that differs from the harness it exports in two ways:
allowedTools selects the wrong customer tools. In a harness, a bare pattern (shell, file_*) selects built-in tools, and @name selects a configured tool such as an MCP server or inline function. The export does the reverse for configured tools: allowedTools: ["@exa"] drops the exa MCP server, while the bare ["exa"] keeps it.
- Model
additionalParams are dropped. For bedrock, open_ai, and gemini models, export harness --arn omits the harness model's additionalParams with an export note, so the exported agent calls the model with different request parameters than the harness.
Steps to Reproduce
- Create a harness with a remote MCP tool named
exa and allowedTools: ["@exa"].
- Run
agentcore export harness --name <harness> (or --arn).
- The generated
main.py has no MCP client for exa.
For (2): export a deployed harness whose Bedrock model sets additionalParams; the export notes say they were omitted and model/load.py does not include them.
Expected Behavior
The exported agent gets the same tools the harness allows, and its model is called with the harness's additionalParams.
Actual Behavior
@exa drops the MCP server (and a bare exa keeps it); additionalParams are omitted.
Operating System
macOS
Description
agentcore export harnessproduces an agent that differs from the harness it exports in two ways:allowedToolsselects the wrong customer tools. In a harness, a bare pattern (shell,file_*) selects built-in tools, and@nameselects a configured tool such as an MCP server or inline function. The export does the reverse for configured tools:allowedTools: ["@exa"]drops theexaMCP server, while the bare["exa"]keeps it.additionalParamsare dropped. Forbedrock,open_ai, andgeminimodels,export harness --arnomits the harness model'sadditionalParamswith an export note, so the exported agent calls the model with different request parameters than the harness.Steps to Reproduce
exaandallowedTools: ["@exa"].agentcore export harness --name <harness>(or--arn).main.pyhas no MCP client forexa.For (2): export a deployed harness whose Bedrock model sets
additionalParams; the export notes say they were omitted andmodel/load.pydoes not include them.Expected Behavior
The exported agent gets the same tools the harness allows, and its model is called with the harness's
additionalParams.Actual Behavior
@exadrops the MCP server (and a bareexakeeps it);additionalParamsare omitted.Operating System
macOS