aws / aws/bedrock-agentcore-starter-toolkit

[BUG] ModuleNotFoundError for bedrock_agentcore.gateway

Open
#284 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
508
Forks
155
Avg merge
8h 50m
Merged PRs (30d)
4

Description

**Describe the bug**
Module `bedrock_agentcore.gateway` cannot be imported despite bedrock-agentcore package being installed. When trying to import `GatewayClient` from `bedrock_agentcore.gateway`, Python raises `ModuleNotFoundError: No module named 'bedrock_agentcore.gateway'`.

**To Reproduce**
Steps to reproduce the behavior:
1. Install package with `pip install bedrock-agentcore==0.1.7`
2. Run command `python src/agents/semantic_search_agent/semantic_search_agent.py`
3. See error

**Expected behavior**
The import `from bedrock_agentcore.gateway import GatewayClient` should work without errors, allowing access to the GatewayClient class as shown in the documentation examples.

**Error Output**
```
Traceback (most recent call last):
File "/home/mike/gt/gt-agent-core/src/agents/semantic_search_agent/semantic_search_agent.py", line 9, in
from services.semantic_search_service import SemanticSearchService
File "/home/mike/gt/gt-agent-core/src/services/semantic_search_service.py", line 11, in
from integrations.slack_gateway import SlackGateway
File "/home/mike/gt/gt-agent-core/src/integrations/slack_gateway.py", line 9, in
from bedrock_agentcore.gateway import GatewayClient
ModuleNotFoundError: No module named 'bedrock_agentcore.gateway'
```

**Environment:**
- OS: Ubuntu 24.04.3 LTS
- Python version: 3.12.7
- Package version: bedrock-agentcore==0.1.7
- Installation method: pip

**Additional context**
The import statement matches the examples shown in the AgentCore documentation (https://aws.github.io/bedrock-agentcore-starter-toolkit/examples/gateway-integration.md), but the gateway module appears to be missing from the installed package. The package was installed in a virtual environment and other bedrock-agentcore functionality may be working, but specifically the gateway module is not accessible.

Contributor guide

Open the contributing guide

Research direction

Start with src/agents/semantic_search_agent/semantic_search_agent.py and src/integrations/slack_gateway.py, then reproduce the failure using pip install bedrock-agentcore==0.1.7 and the documented import. Compare the installed package contents with the gateway-integration documentation. Done means the documented GatewayClient import works and the semantic search agent starts without this ModuleNotFoundError.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.