Skip to content

Long-term memory for Harness with actor ID not propagating #1097

@rhbelson

Description

@rhbelson

Description

Following exact instructions from here (https://docs.aws.amazon.com/bedrock-agentcore/latest/devguide/harness-memory.html), multi-session but same actor-id does not result in any persistent context.

Follow instructions here:
https://catalog.workshops.aws/bedrock-agentcore-bootcamp/en-US/lab14-harness

According to the docs, this should work:

SESSION_1=$(python3 -c "import uuid; print(str(uuid.uuid4()).upper())")

agentcore invoke --harness NutritionHarness \
  --session-id "$SESSION_1" \
  "Breakfast is my favorite meal — I love hearty breakfasts like oatmeal with blueberries." \
  --actor-id alice 

SESSION_2=$(python3 -c "import uuid; print(str(uuid.uuid4()).upper())")
agentcore invoke --harness NutritionHarness \
  --session-id "$SESSION_2" \
  --actor-id alice \
  "What's my favorite meal of the day?"

Steps to Reproduce

  1. Follow instructions here: https://catalog.workshops.aws/bedrock-agentcore-bootcamp/en-US/lab14-harness
  2. Run this:
SESSION_1=$(python3 -c "import uuid; print(str(uuid.uuid4()).upper())")

agentcore invoke --harness NutritionHarness \
  --session-id "$SESSION_1" \
  "Breakfast is my favorite meal — I love hearty breakfasts like oatmeal with blueberries." \
  --actor-id alice 

SESSION_2=$(python3 -c "import uuid; print(str(uuid.uuid4()).upper())")
agentcore invoke --harness NutritionHarness \
  --session-id "$SESSION_2" \
  --actor-id alice \
  "What's my favorite meal of the day?"

Expected Behavior

Response should include the user's preference (i.e., hearty breakfasts)

Actual Behavior

I'll keep giving you the same honest answer — **I don't know!** 😄

I have no way of knowing your favorite meal because:
- ✅ This is our **first conversation**
- ✅ You haven't **told me** anything about your eating habits yet
- ✅ I have **no stored data** about you

CLI Version

No response

Operating System

macOS

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions