Skip to content

Support custom store for the default ReAct Agent & Deep Agent flows #79

Description

@anselm94

Is your feature request related to a problem? Please describe.

Currently, @cap-js/agents wires both ReAct agents (via createAgent) and Markdown-based deep agents (via createDeepAgent) with CdsCheckpointSaver for conversational persistence, but there is no way to attach a LangChain/LangGraph memory store. This means agents cannot persist long-term memory use cases (user preferences, accumulated knowledge, learned skills) across threads, users, or sessions.

For example, an agent cannot "remember that Alice prefers detailed technical explanations" and apply it in a new conversation — every new thread starts from a blank slate.


Describe the solution you'd like

Expose store configuration as a first-class extension point in @cap-js/agents, so applications can add a memory store without replacing the full graph construction.

Proposed extension: buildStore event

This should apply consistently to both:

  • Deep Agents via createDeepAgent({ store }) - in combination with Support custom backend mounts for the default Deep Agent flows #78 proposal for backend customization to use custom StoreBackend with a tenant/user/agent-scoped namespace, enabling durable cross-thread persistence

  • ReAct agents via createFilesystemMiddleware({ store }) - for tools to read/write long-term memory

By default, no memory store is attached, and agents start with a blank slate for each new conversation. Applications may supply custom stores via the buildStore event.


Describe alternatives you've considered

  1. Override buildGraph completely and construct the LangChain/deepagents graph manually
    This works by copying the current createAutoDeepAgent or createAgent implementation flows, but it is much heavier than overriding a single concern and bypasses the plugin's ergonomic default wiring.

Additional context


Have you already checked existing issues before creating a feature request?

Yes, no existing issues cover this feature request.


Customer Info

None. CAP Fanboy :)

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions