awslabs / awslabs/agentcore-samples
01-tutorials - [Bug] : Consequtive executions of the same notebook result in error
- Dominant language
- Python
- Stars
- 3.4k
- Forks
- 1.3k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 30
Description
**In which component is this bug present?**
- [x] 01-AgentCore-runtime
- [ ] 02-AgentCore-gateway
- [ ] 03-AgentCore-identity
- [ ] 04-AgentCore-memory
- [ ] 05-AgentCore-tools
- [ ] 06-AgentCore-observability
- [ ] 07-AgentCore-E2E
If you are reporting multiple bugs, please create a separate issue for each. For documentation improvements, use the documentation improvement issue type.
**Bug Description**
A clear and concise description of the bug.
```
Run the runtime_with_strands_and_bedrock_models.ipynb notebook from start to finish.
Start a second run.
During the agentcore_runtime.launch() method call an error occurs
Error mentions that the agent was not found in agent core runtime so that it is updated.
Issue is, local files generated during first execution have not been deleted even if the AgentCore runtime agents have.
This results in the method to conclude the agent exists and should be updated, instead of created.
ResourceNotFoundException: An error occurred (ResourceNotFoundException) when calling the UpdateAgentRuntime operation: Agent 'strands_claude_getting_started-LRlDDVEdmT' was not found. Please check the agent ID and try again.
```
**Screenshots**
If applicable, add screenshots to help explain your problem.
```
Please provide screenshots here.
```
Contributor guide
Assessment
This issue has not been assessed yet.