aws / aws/bedrock-agentcore-starter-toolkit

[BUG] using agentcore launch --local

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

Description

**Describe the bug**
Im deploying a local agent using agentcore launch --local.
The problem is when i try to reach that agent with the agentcore invoke --local. The console ouput is:
`agentcore invoke {} --local
Payload:
{}
Invoking BedrockAgentCore agent 'my_primer_agentcore' locally
Failed to invoke agent endpoint: HTTPConnectionPool(host='0.0.0.0', port=8080): Max retries exceeded with url: /invocations (Caused by NewConnectionError(': Failed to establish a new connection: [WinError 10049] La dirección solicitada no es válida en este contexto'))
❌ Invocation failed: HTTPConnectionPool(host='0.0.0.0', port=8080): Max retries exceeded with url: /invocations (Caused by
NewConnectionError(': Failed to establish a new connection: [WinError 10049] La dirección solicitada no es
válida en este contexto'))`

**Environment:**
- OS: Windows 11
- Python version: 3.12.10
- Package version: latest
- Installation method: pipenv
**Additional context**
I think, the problem is like the client is trying to conect to ip 0.0.0.0, but is an invalid ip to connect.
Reviewing the code i found in the code of file [bedrock-agentcore-starter-toolkit](https://github.com/aws/bedrock-agentcore-starter-toolkit/tree/main)/[src](https://github.com/aws/bedrock-agentcore-starter-toolkit/tree/main/src)/[bedrock_agentcore_starter_toolkit](https://github.com/aws/bedrock-agentcore-starter-toolkit/tree/main/src/bedrock_agentcore_starter_toolkit)/[operations](https://github.com/aws/bedrock-agentcore-starter-toolkit/tree/main/src/bedrock_agentcore_starter_toolkit/operations/runtime)/[invoke.py](https://github.com/aws/bedrock-agentcore-starter-toolkit/tree/main/src/bedrock_agentcore_starter_toolkit/operations/runtime/invoke.py)
In the line *70* the next *client = LocalBedrockAgentCoreClient("http://0.0.0.0:8080")*. I belive that we need to replace 0.0.0.0 by 127.0.0.1

Contributor guide

Open the contributing guide

Research direction

Start in src/bedrock_agentcore_starter_toolkit/operations/runtime/invoke.py, especially line 70 where the local client endpoint is created. Reproduce the reported Windows 11 failure with agentcore launch --local followed by agentcore invoke --local. Done means local invocation connects successfully instead of attempting an invalid destination address.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.