Drupal is a registered trademark of Dries Buytaert
Release: Leaflet 10.4.11 Minor update available for module leaflet (10.4.11). Release: Session Inspector 1.0.8 Minor update available for module session_inspector (1.0.8). Release: Migrate QA 2.0.4 Minor update available for module migrate_qa (2.0.4). Release: CKEditor Description List 3.0.0 Major update available for module ckeditor_descriptionlist (3.0.0). Release: FlowDrop 2.4.0 Minor update available for module flowdrop (2.4.0). Release: JWT Token Refresh 1.0.4 Minor update available for module jwt_token_refresh (1.0.4). Release: ConReg 1.0.0-beta1 First beta version released for module conreg (1.0.0-beta1). Release: AI Image Studio 1.0.0-beta8 New beta version released for module ai_image_studio (1.0.0-beta8). Usage Milestone: Statistics Counter Module statistics_counter crossed 1,000 active installs. Module Revived: Decoupled Router 2.0.7 Module decoupled_router updated after 11 months of inactivity (2.0.7).

This module enhances Drupal AI by giving agents memory of past conversation turns. It allows agents to maintain context across multiple interactions, enabling more coherent and intelligent multi-turn workflows. The module offers configurable options for which agents use this memory and how conversation history is managed to prevent context from becoming too lengthy.

Makes the drupal/ai harness more like Claude Code for the + Suite page builder.

Overview

The default AI module's AgentRunner deletes agent state when an agent finishes a turn. This means every new user message starts a completely fresh agent run — the LLM has no memory of previous tool calls, tool results, or reasoning from earlier in the conversation.

AI Agent Memory fixes this by decorating the AgentRunner to persist agent state across conversation turns in a separate temp store bin. Agents retain full awareness of their previous actions within a chat session, enabling coherent multi-turn workflows where each step builds on the last.

Features

  • Cross-turn agent continuity — Agent state persists after completion so the next user message resumes with full context, not a blank slate.
  • Turn-aware history trimming — Keeps the context window bounded by dropping middle turns while preserving the first turn (initial context) and recent turns. Never splits tool call/result pairs.
  • Configurable per-agent opt-in — Only agents listed in the module's settings get persistent state. All others pass through to the default AgentRunner unchanged.
  • Stale data detection — Automatically discards persisted state when the agent has finished and no new messages have arrived, preventing replay of outdated context.
  • File binary stripping — Removes binary file data from chat messages before persistence, working around a serialization issue in the upstream ChatMessage class.

Requirements

  • AI module (ai_agents and ai_assistant_api sub-modules)

Configuration

  1. Install the module.
  2. Navigate to /admin/config/ai/agent-memory.
  3. Select which agents should have persistent state.
  4. Optionally adjust history trimming settings (max messages, recent turns to keep).

Activity

Tracked releases
2
Tracked since
May 2026
Latest release
2 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Release date
1.0.0 Stable Jun 10, 2026
1.0.x-dev Dev May 22, 2026