Skip to content

Conversation

siwachabhi
Copy link
Contributor

Tested using an agent like:

import asyncio
import time
from strands import Agent

from bedrock_agentcore import BedrockAgentCoreApp

app = BedrockAgentCoreApp()
agent = Agent()


@app.entrypoint
async def agent_invocation(payload):
    """Handler for agent invocation"""
    user_message = payload.get(
        "prompt", "No way prompt found in input, please guide customer to create a json payload with prompt key"
    )
    
    # Wait for 60 seconds before starting the stream (blocks the thread)
    print("Waiting for 45 seconds before starting stream...")
    time.sleep(45)
    print("45 second wait complete. Starting stream...")
    
    stream = agent.stream_async(user_message)
    async for event in stream:
        print(event)
        yield (event)


if __name__ == "__main__":
    app.run()

which was earlier failing due to ping failures, but now with platform changes, separate thread pool isn't required

Copy link

@Abishek10 Abishek10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !

@siwachabhi siwachabhi merged commit 824f43b into main Aug 7, 2025
16 checks passed
sundargthb added a commit that referenced this pull request Aug 11, 2025
- Remove concurrency checks and simplify thread pool handling (#46)
sundargthb added a commit that referenced this pull request Aug 11, 2025
- Bump version from 0.1.1 to 0.1.2
- Fix regex group reference error in bump_version.py
- Remove concurrency checks and simplify thread pool handling (#46)
sundargthb added a commit that referenced this pull request Aug 11, 2025
* chore: release v0.1.2 and fix bump script

- Bump version from 0.1.1 to 0.1.2
- Fix regex group reference error in bump_version.py
- Remove concurrency checks and simplify thread pool handling (#46)

* fix formatting error

* fix formatting error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants