Skip to content

fix(memory): disable score filtering in runtime template defaults - #2746

Open
notgitika wants to merge 2 commits into
aws:v1.xfrom
notgitika:fix/memory-template-defaults
Open

notgitika wants to merge 2 commits into
aws:v1.xfrom
notgitika:fix/memory-template-defaults

Conversation

@notgitika

@notgitika notgitika commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

Generated Python Strands agents currently discard retrieved records below 0.5, including relevant records returned for a basic recall query in #2706. Set the generated relevance threshold to 0.0 so retrieval uses top_k without default score filtering. This covers the Python Strands, container, A2A, AG-UI, harness-export, and imported Bedrock Agent paths.

Use SEMANTIC and EPISODIC as the default strategies for memory-enabled runtime templates. Remove preference and summary retrieval from the default Python and TypeScript runtime templates. Harness exports continue to honor the strategies of explicitly configured existing memories and any supplied retrieval thresholds. Managed harness scaffolds keep their original empty managedMemoryConfiguration: {}.

These defaults apply to newly scaffolded runtime projects. Existing runtime projects can adopt them by updating their memory strategies and generated retrieval configuration.

Related Issue

Closes #2706

Documentation PR

Documentation is included here: the generated runtime template READMEs.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

  • Full unit suite: 4,705 passed, 6 skipped, 0 failed across 311 files, run in three independent shards.

  • Regression coverage verifies the provisioned strategies, episodic reflection namespace, matching Python/TypeScript retrieval namespaces, zero default thresholds, imported-agent code, and preservation of explicit 0 and 0.7 export thresholds.

  • Built-CLI smoke tests verify that a managed harness emits managedMemoryConfiguration: {} and that Python Strands retains semantic/episodic strategies with zero relevance thresholds. The generated runtime templates are also covered by the unit regressions.

  • bun run audit reports a pre-existing moderate minimatch finding, GHSA-g3hv-75wg-m249, through @aws/agent-inspector. The same finding reproduces with the upstream dependency files. This PR does not change package.json or bun.lock.

  • Live AWS end-to-end tests were not run: the change concerns scaffolding defaults, which were verified through generated artifacts and the built CLI. No AWS resources were deployed.

  • I ran bun test

  • I ran the relevant end-to-end tests with bun run test:e2e, or explained why they are not applicable

  • I ran bun run typecheck

  • I ran bun run lint:check

  • I ran bun run format:check

  • I ran bun run build

  • If I modified src/assets/, I updated affected snapshots with bun test <test-file> --update-snapshots and committed them

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@notgitika
notgitika requested a review from a team November 3, 2026 05:52
@github-actions github-actions Bot added the size/m PR size: M label Nov 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

Package Tarball

aws-agentcore-1.0.1.tgz

How to install

gh release download pr-2746-tarball --repo aws/agentcore-cli --pattern "*.tgz" --dir /tmp/pr-tarball
npm install -g /tmp/pr-tarball/aws-agentcore-1.0.1.tgz

@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed claude-security-reviewing Claude Code /security-review in progress agentcore-harness-reviewing AgentCore Harness review in progress labels Nov 3, 2026
@notgitika notgitika changed the title fix(memory): use semantic and episodic defaults without score filtering fix(memory): disable score filtering in runtime template defaults Nov 3, 2026
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Nov 3, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Nov 3, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Nov 3, 2026

@nborges-aws nborges-aws left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Strands templates set relevance_score=0.5, which filters out every long-term memory on a basic recall question

2 participants