Simplest possible example using agentcore

This commit is contained in:
Filipi Fuchter
2025-11-27 16:22:32 -03:00
parent 2edfa493b6
commit 625d56e8fa
3 changed files with 20 additions and 0 deletions

3
examples/aws-agentcore/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
.bedrock_agentcore.yaml
.dockerignore
.bedrock_agentcore

View File

@@ -73,6 +73,13 @@ Run your bot on AgentCore Runtime.
agentcore invoke '{"roomUrl": "https://<your-domain>.daily.co/<room-name>"}' # -a <agent_name> (if multiple agents configured)
```
In case we wish to define the session-id, to create a new session each time we invoke:
```bash
aws-agentcore % agentcore invoke \
--session-id user-123456-conversation-12345679 \
'{"roomUrl": "https://<your-domain>.daily.co/<room-name>"}'
```
## Observation
Paste the log tailing command you received when deploying your bot to AgentCore Runtime. It should look something like:

View File

@@ -0,0 +1,10 @@
from bedrock_agentcore import BedrockAgentCoreApp
app = BedrockAgentCoreApp()
@app.entrypoint
def my_agent(payload):
return {"result": f"Hello {payload.get('name', 'World')}!"}
if __name__ == "__main__":
app.run()