awslabs / awslabs/agentcore-samples

Amazon Bedrock AgentCore Samples - [Content Improvement] - Improve runtime-context demo

Open
#148 1 comment 0 reactions 0 assignees View on GitHub
01-AgentCore-runtime 01-tutorials enhancement
Dominant language
Python
Stars
3.4k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
30

Description

This is feedback on the notebook on runtime-context:
01-tutorials/01-AgentCore-runtime/03-advanced-concepts/02-understanding-runtime-context/understanding_runtime_context.ipynb

**Describe the improvement request**
The current demo shows the use of session ID and reusing the same sessionID continues the conversation, but creating a new one starts a new conversation. This is great.

However, it introduces the concept of the 'user_id' parameter that confuses the matter. The explanation is not clear to state that the actual value of the 'user_id' has no effect on whether a session is reused or not. That only depends on the value of the sessionID.

Secondly, it gives the false impression that any user ID information must be passed as additional parameters. This can be a security concern if the agent developer mixes up the userId from the authentication token with the value of this parameter.

**What are your suggestions?**
The right way to show two users is to actually create two users in Cognito User Pool, obtain a token per user and use each to invoke the agent.

The Agent must use information from the authentication token to display user name and not the value of an arbitrary parameter. Please reinforce this secure practice in this tutorial.

Contributor guide

Open the contributing guide

Research direction

Start with 01-tutorials/01-AgentCore-runtime/03-advanced-concepts/02-understanding-runtime-context/understanding_runtime_context.ipynb and run through the existing runtime-context demo. Clarify that sessionID controls conversation reuse, distinguish it from user_id, and show two Cognito users invoking the agent with separate tokens. Done means the notebook demonstrates displaying identity from the authentication token and reinforces the secure practice described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
authentication, documentation, security
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.