Skip to content

Python: Cosmos memory provider misses Toolkit 0.3 episodic and procedural retrieval APIs #7923

Description

@coding-totoro

What happened

agent-framework-azure-cosmos-memory allows azure-cosmos-agent-memory>=0.2.0b3 with no upper bound. Its CosmosMemoryContextProvider also accepts fact, procedural, and episodic memory types, but before_run() sends all selected types through this call:

await self.memory_client.search_cosmos(
    search_terms=query_text,
    user_id=user_id,
    top_k=self.top_k,
    memory_types=[str(t) for t in self.memory_types],
    min_confidence=self.min_confidence,
)

That no longer implements the public retrieval contract in Agent Memory Toolkit 0.3.0b2:

  • search_cosmos() removes episodic from memory_types unless include_episodes=True, so episodes configured on the MAF provider are silently omitted.
  • Procedural memory is now an atomic procedure library. The Toolkit's supported projection is build_procedural_context(user_id, task=...), which selects and compiles active, applicable procedures. The MAF provider never calls it and instead formats generic search results.

Why this matters

A fresh installation can legally resolve Toolkit 0.3.0b2, appear healthy, and still miss configured episodes. Procedural context also bypasses the Toolkit's active/in-scope compilation path.

This is the retrieval counterpart to #7633: the provider's open-ended Toolkit dependency moved past another beta API boundary.

Verified versions

  • agent-framework-core==1.15.0
  • agent-framework-azure-cosmos-memory==1.0.0a260813
  • azure-cosmos-agent-memory==0.3.0b2

The provider code is unchanged on current main as of 2026-08-27.

Expected behavior

The provider and its declared dependency range should agree. For Toolkit 0.3.0b2, the provider should:

  1. use include_episodes=True when episodic memory is selected, preserving the single shared fact/episode ranking budget;
  2. exclude procedural records from generic search; and
  3. obtain procedural context through build_procedural_context(user_id, task=query_text).

Alternatively, constrain the Toolkit upper bound until that provider support ships.

Public references

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythonUsage: [Issues, PRs], Target: PythontriageUsage: [Issues], Target: All issues that still need to be triaged

    Type

    No type

    Projects

    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions