Skip to content

Revamp memory management of Agents #312

@CasperGN

Description

@CasperGN

Currently the session and agent memory is mixed up rendering the DSL for the Agent easily misunderstood. This issue attempts to encompass the proposed setup for the new memory management setup for Dapr Agents.

As we've progressed the default stores alongside the metadata for the agents, this carries over some of that work and builds on top of it.

Currently Dapr Agents require a agent-wfstatestore, agent-statestore and agent-registry. We are proposing streamlining the naming as well as correlating it with industry standard terms:

Image

The proposal requires renaming, reusing and creating statestores:

  • agent-wfstatestore -> Renamed to agent-workflow. Today this holds both workflow execution and duplication of the agents session data. Moving forward this store will hold keys that are 1:1 mapped to an agents workflow instance_id. This will hold the short term memory for the agent for that specific workflow execution. Users should should be able to set a flag to persist short term memory. If set to False the key should be removed post execution. Default True.
  • agent-statestore -> Renamed to agent-memory. Today this holds the session data for all executed workflows. Moving forward this store will be the long term memory and will hold the summarized content (rendered during finalize_workflow task) as well as an attempt of extracting general purpose bullets for "good value memory".
  • agent-registry -> No changes.
  • agent-runtime -> New statestore containing non-secret runtime configuration that the agent will load prior to finalizing instantiation. Examples could be the OpenTelemetry endpoint, llm-model etc.

We will rid the "session" concept as it provides little value conceptually. Instead the workflow execution is the session. For chat-based clients we propose to await the work scoped for post v1.0 release which will introduce streaming (effectively max_iterations=infinite relying on workflow termination event).

The following depicts the multi-agent setup and how relying more natively on workflows woudl create stronger bindings also for parent/child relationship:

Image

Co proposed / created with @sicoyle

Metadata

Metadata

Assignees

Projects

Status

Just Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions