aws / aws/bedrock-agentcore-sdk-python
AgentCore Runtime - get_async_task_info - did not return metadata
- Dominant language
- Python
- Stars
- 761
- Forks
- 147
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 7
Description
**Describe the bug**
Method `get_async_task_info` currently did not return metadata as shown here: https://github.com/aws/bedrock-agentcore-sdk-python/blob/9bd262397c3f3e662b2b178e397568ce184c7888/src/bedrock_agentcore/runtime/app.py#L223-L235
The metadata itself can be injected using method `add_async_task` as shown here: https://github.com/aws/bedrock-agentcore-sdk-python/blob/9bd262397c3f3e662b2b178e397568ce184c7888/src/bedrock_agentcore/runtime/app.py#L259-L264
**To Reproduce**
Create new task with metadata
```
task_id = app.add_async_task("file_processing", {"file": "data.csv"})
# ... do background work ...
app.complete_async_task(task_id)
```
Try to fetch metadata:
```
# Get info about running async tasks
task_info = app.get_async_task_info()
for task in task_info.get('running_jobs', []):
metadata = task.get('metadata', {})
print(metadata)
```
**Expected behavior**
`get_async_task_info` should return the metadata
**Screenshots**
n/a
**Additional context**
AgentCore SDK v1.2.1
Contributor guide
Research direction
Start in src/bedrock_agentcore/runtime/app.py at get_async_task_info and compare it with add_async_task, using the linked line ranges. Reproduce the flow with metadata such as {"file": "data.csv"}, then check the returned running_jobs entries. Done means get_async_task_info exposes the metadata added by add_async_task.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100