aws / aws/agentcore-cli

APPLICATION_LOGS response_payload always null for non-streaming Strands agents

Open
#889 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
283
Forks
95
Avg merge
1d 2h
Merged PRs (30d)
183

Description

### Description

## Problem

`response_payload` in APPLICATION_LOGS is always `null`, even though `request_payload` works fine.

## Setup

- Strands Agent deployed via `agentcore deploy`
- Non-streaming: `@app.entrypoint def invoke(...)` returns plain dict
- `bedrock-agentcore 1.6.3`, `strands-agents 1.35.0`, region `us-east-1`
- APPLICATION_LOGS delivery: CWL, `response_payload` is in `recordFields`

## What I see

```json
{
"request_payload": {"message": "hi", "user_type": "tourist"},
"response_payload": null
}
```

## What I tried

Changed return format to {"result": "..."} → still null
Toggled recordFields → still null
IAM permissions correct, Tracing enabled

## Question
Is response_payload only populated for SSE streaming responses (not plain JSON return)?

Or is there a config I'm missing?

### Steps to Reproduce

1. Deploy a Strands agent with `agentcore deploy` — use non-streaming entrypoint:
```python
@app.entrypoint
def invoke(payload, context):
agent = Agent(model=..., tools=[...])
result = agent(payload.get("message"))
return {"result": str(result)}
```
2.Enable APPLICATION_LOGS delivery to CloudWatch (via console or put-delivery-source)
3.Invoke the deployed agent via Agent Sandbox or invoke_agent_runtime API
4.Open CloudWatch → log group /aws/vendedlogs/bedrock-agentcore/runtime/APPLICATION_LOGS/
5.Observe: response_payload is null while request_payload is populated

### Expected Behavior

`response_payload` in APPLICATION_LOGS should contain the agent's return dict, e.g. `{"result": "..."}`.

### Actual Behavior

`response_payload` is always `null`, even though `request_payload` is populated and the agent responds correctly to clients.

### CLI Version

0.8.2

### Operating System

Windows

### Additional Context

_No response_

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.