Skip to content

export harness: 1.x drops agentcore_gateway tools that 0.31 exported #2766

Closed

Description

@nyousef7

Description

agentcore export harness in 1.0.1 doesn't export agentcore_gateway tools. The export mapper (src/core/project/templates/export.ts) adds a GATEWAY_TOOL_NOTE_CATEGORY note for every gateway tool, for both --name and --arn exports, and the generated agent gets tools = [] and an empty mcp_client/client.py.

0.31.x exports the same tool. For a gateway tool with outboundAuth: { awsIam: {} } it generates a client in mcp_client/client.py that reads the gateway URL from GATEWAY_GATEWAY_<ID>_URL and connects with mcp_proxy_for_aws.client.aws_iam_streamablehttp_client(url, aws_service="bedrock-agentcore", ...), and main.py adds it to the agent's tools.

We build container images from exported harnesses in CI and treat the generated code as a build artifact, so a manual follow-up per agent doesn't work for us. The new local export (--name, no deployed harness) would simplify that flow a lot, but without gateway tools we can't move to 1.x.

Repro with 1.0.1:

agentcore create --name repro --skip-install --skip-git
cd repro
agentcore add harness --name demo \
  --model '{"provider":"bedrock","modelId":"us.anthropic.claude-sonnet-4-6"}' \
  --system-prompt "Use the tools."
# then add to app/demo/harness.yaml:
#   tools:
#     - name: tools
#       type: agentcore_gateway
#       config:
#         agentCoreGateway:
#           gatewayArn: arn:aws:bedrock-agentcore:us-east-1:123456789012:gateway/example-abc123
#           outboundAuth:
#             awsIam: {}
#   allowedTools: ["@tools"]
agentcore export harness --name demo --json

The notes list the gateway tool as not exported, and app/demoAgent/main.py has tools = [].

Acceptance Criteria

  • Exporting a harness with an agentcore_gateway tool generates a client for it in mcp_client/client.py and adds it to the agent's tools in main.py, for --name and --arn exports.
  • With outboundAuth.awsIam, requests are SigV4-signed for bedrock-agentcore, as 0.31.x does with mcp-proxy-for-aws.
  • The gateway URL comes from an environment variable at runtime. Naming it after the tool rather than the gateway id would let the same code run against a different gateway than the one in the harness config.
  • allowedTools patterns such as @tools/* filter that client's tools, as they do for remote MCP tools.
  • No gateway-tool note in EXPORT_NOTES.md for that case.

Additional Context

We're on 0.31.2 (v0-latest) until this lands.

Activity

  1. added a commit that references this issue on Nov 11, 2026
    9e0f85e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions