Skip to content

Harness memory not working when memory ARN is configured #1291

Description

@jesseturner21

Problem

When deploying a harness with memory configured (either via memory.name referencing a deployed memory resource, or via memory.arn with a direct ARN), the memory does not function at invocation time. The model reports "I don't have the ability to permanently save or remember information" and no memory tools are available.

Root Cause

The CLI was sending the wrong JSON structure for the memory field in the CreateHarness/UpdateHarness API calls.

What the CLI was sending:

{ "memory": { "memoryArn": "arn:aws:bedrock-agentcore:..." } }

What the API expects (per Smithy model):

{ "memory": { "agentCoreMemoryConfiguration": { "arn": "arn:aws:bedrock-agentcore:..." } } }

The API silently accepted the incorrect structure and stored "memory": {}, resulting in deployed harnesses having no memory capabilities despite the configuration appearing correct in deployed-state.json.

Impact

All harness deployments with memory configured on the preview branch are affected. Memory appears deployed (shows in agentcore status) but does not function at runtime.

Workaround

None — requires the CLI fix.

Fix

PR #1288 — aligns the CLI's HarnessMemoryConfiguration type and mapMemory() function with the Smithy API model.

How to verify after fix

  1. Deploy a harness with memory: agentcore create --memory longAndShortTerm --defaults
  2. Call GetHarness and confirm the response contains:
    "memory": { "agentCoreMemoryConfiguration": { "arn": "arn:..." } }
    (instead of "memory": {})
  3. Invoke the harness and confirm the model has memory tool access

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions