diff --git a/examples/aws-agentcore/.gitignore b/examples/aws-agentcore/.gitignore new file mode 100644 index 000000000..2d2dea915 --- /dev/null +++ b/examples/aws-agentcore/.gitignore @@ -0,0 +1,3 @@ +.bedrock_agentcore.yaml +.dockerignore +.bedrock_agentcore \ No newline at end of file diff --git a/examples/aws-agentcore/README.md b/examples/aws-agentcore/README.md index 3bd1d26b4..3cd9be13a 100644 --- a/examples/aws-agentcore/README.md +++ b/examples/aws-agentcore/README.md @@ -73,6 +73,13 @@ Run your bot on AgentCore Runtime. agentcore invoke '{"roomUrl": "https://.daily.co/"}' # -a (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://.daily.co/"}' +``` + ## Observation Paste the log tailing command you received when deploying your bot to AgentCore Runtime. It should look something like: diff --git a/examples/aws-agentcore/bot_hellow.py b/examples/aws-agentcore/bot_hellow.py new file mode 100644 index 000000000..b4e599ae0 --- /dev/null +++ b/examples/aws-agentcore/bot_hellow.py @@ -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() \ No newline at end of file