aws / aws/bedrock-agentcore-sdk-python

Port AgentCoreMemoryStore (MemoryStore interface) from TypeScript SDK to Python

Offen
#661 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
Python
Sterne
761
Forks
147
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
7

Beschreibung

### Problem Statement

The TypeScript `bedrock-agentcore` SDK (v0.4.1+) ships an `AgentCoreMemoryStore` that implements the Strands `MemoryStore` interface, enabling AgentCore Memory to plug into the `MemoryManager` pipeline with recall (search tool), injection (automatic prompt augmentation), and server-side extraction. It is documented on the Strands integrations page: https://strandsagents.com/docs/integrations/memory-stores/agentcore-memory-store/

The Python `bedrock-agentcore` SDK currently only integrates AgentCore Memory as a session manager (`AgentCoreMemorySessionManager`). There is no `MemoryStore` implementation, so Python developers cannot use AgentCore Memory with `MemoryManager`.

### Proposed Solution

Port the `AgentCoreMemoryStore` from the TypeScript SDK to Python. The integration lives at `bedrock-agentcore/memory/integrations/strands/` in the TS package and maps:

- `search` to AgentCore's `retrieveMemoryRecords`
- `add_messages` to conversation ingestion for server-side extraction
- Per-namespace store creation via a `create_agentcore_memory_stores` factory

Target usage:

```python
from strands import Agent
from strands.memory import MemoryManager
from bedrock_agentcore.memory.integrations.strands.memory_store import (
AgentCoreMemoryStore,
create_agentcore_memory_stores,
)

stores = create_agentcore_memory_stores(
memory_id="mem-abc",
actor_id="user-123",
session_id="session-1",
namespaces=[
{"namespace": "/facts/{actorId}", "writable": True},
{"namespace": "/preferences/{actorId}"},
],
extraction=True,
)

agent = Agent(memory_manager=MemoryManager(stores=stores))
```

### Use Case

Python agents that want to use AgentCore Memory as a long-term memory backend through the standard `MemoryManager` pipeline, with injection, recall tools, and extraction.

### Additional Context

- TypeScript implementation: https://github.com/aws/bedrock-agentcore-sdk-typescript/tree/main/src/memory/integrations/strands
- Strands integration page (TS only): https://strandsagents.com/docs/integrations/memory-stores/agentcore-memory-store/
- The existing Python `AgentCoreMemorySessionManager` would remain for session persistence use cases. The `MemoryStore` is complementary.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, die TypeScript-Implementierung unter bedrock-agentcore/memory/integrations/strands zu lesen und sie mit dem Python AgentCoreMemorySessionManager zu vergleichen. Füge die in diesem Issue beschriebenen Python memory_store.py-Einstiegspunkte und die Factory hinzu und ordne search und add_messages AgentCore Memory zu. Als abgeschlossen gilt die Arbeit, wenn Python-Benutzer die erstellten Stores für Recall, Injection und Extraction an Strands MemoryManager übergeben können.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, python, typescript
Bereich
ai, backend
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
58/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.