aws / aws/bedrock-agentcore-sdk-python
AgentCore Runtime - get_async_task_info - did not return metadata
- Vorherrschende Sprache
- Python
- Sterne
- 761
- Forks
- 147
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 7
Beschreibung
**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
Beitragsleitfaden
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- backend
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 52/100