aws / aws/bedrock-agentcore-sdk-python

AgentCore Runtime - get_async_task_info - did not return metadata

Open
#258 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.