In this Post

    As AI systems grow in complexity and are used to tackle increasingly important tasks, their ability to retain, recall, and evolve knowledge across sessions is becoming a defining feature of next-generation intelligent agents. In this blog post I’ll explore how Solace Agent Mesh brings powerful long-term memory capabilities to your agentic AI projects, and why that matters.

    I’ll start by covering what Solace Agent Mesh is, and break down its strengths compared to other agentic AI frameworks. Then I’ll unpack what memory means in the context of agentic AI systems, explain why it’s essential, and show how you can leverage it in your own project with real code examples.

    What is Solace Agent Mesh ?

    Solace Agent Mesh is an open-source agentic AI framework purpose-built to help you create collaborative AI systems that can interact with real-world data and systems in a flexible, event-driven way.

    Unlike monolithic AI platforms, Solace Agent Mesh is a composable, scalable integration layer for AI agents. It connects agents, data sources, and gateways so they can work together to solve complex tasks.

    Why Choose Solace Agent Mesh ?

    • Event-Driven Architecture (EDA): Built on Solace’s proven event-driven integration platform, Solace Agent Mesh enables high flexibility and real-time communication.
    • Composable Agent System: Add agents incrementally. Each agent doesn’t just add to the system’s abilities; it multiplies them through collaboration.
    • Gateway Flexibility: Choose how users interact, e.g. via REST, web UI, Slack, etc.
    • Enterprise-Grade: Designed from the ground up to support mission-critical applications.
    • Full Observability: Monitor, debug, and trace interactions with ease.

    With Solace Agent Mesh, you’re not locked into any one model, data source, or workflow. It’s built to grow and evolve with your system.

    What is Memory in Agentic AI Frameworks?

    In tech talk, “memory” has generally referred to RAM, the fast, temporary workspace for active tasks, while “storage” meant long-term data retention, like hard drives or disks. In traditional AI applications, we use the word memory to mean short-lived information, like things learned within a single session or context window, as opposed to the long-term learned knowledge or fine-tuned parameters embedded in the model, which is more like storage. But agentic systems need more than that – .they need to remember who they’re working with, what’s been said before, what goals have been set, and what preferences have been shared. Simply put, they need more and better memory!

    Why Memory Matters

    • Context Preservation: Conversations don’t start from scratch every time.
    • Adaptive Behavior: The system can adjust based on learned facts and instructions.
    • Efficient Collaboration: Instruction sets, and user information would not need to be repeated every time.
    • Human-Centric UX: Makes AI feel more intelligent, personal, and useful.

    This is where Solace Agent Mesh’s long-term memory architecture shines. Solace Agent Mesh introduces a memory model that stores information across sessions and agents, enabling adaptive behavior, continuity, and context preservation over time.

    Solace Agent Mesh’s Memory Architecture

    Solace Agent Mesh supports long-term memory by combining fact storage, user preferences, and conversation summarization into a coherent memory model. This memory allows agents to recall past interactions, maintain context over time, and personalize responses based on prior behavior.

    Solace Agent Mesh’s memory operates on two main components:

    Long-Term Memory Storage

    Solace Agent Mesh’s long-term memory contains two key structures:

    • Facts: Concrete information extracted from conversations, such as names, preferences, roles, or events.
    • Instructions: Behavioral preferences or communication styles the user wants the assistant to follow (e.g., “Always reply in markdown”, or “Use red lines in charts”).

    Each memory object may also include:

    • Update Notes: Explicit commands to update or delete memory (“John is no longer my boss” or “Forget I like sushi”).

    As conversations unfold, Solace Agent Mesh continuously extracts these elements from new interactions and compares them against existing memory. Based on this comparison, the memory is updated using one of four strategies:

    • Add new information if it doesn’t already exist.
    • Update existing items if the new information is more complete or contradicts what’s already stored.
    • Delete entries that are explicitly contradicted or retracted by the user.
    • Ignore redundant input that doesn’t add anything new.

    This approach keeps memory both accurate and succinct, automatically adapting as the user’s behavior or preferences evolve.

    Importantly, new information always takes precedence. If a user updates a preference (“I now prefer HTML reports instead of Markdown”), the system reflects this latest instruction by replacing or removing older entries as needed.

    Conversation Summaries

    In addition to structured facts and instructions, Solace Agent Mesh maintains a running summary of past conversations. This acts as an episodic memory, helping the assistant understand the broader context of interactions, especially important for multi-step tasks or long-term engagement.

    When a new chat occurs:

    • A summary of the conversation is generated.
    • If an earlier summary exists, it is merged with the new one to reflect the most current state.
      • Redundant information is skipped.
      • Additions are appended.
      • Contradictions are resolved in favor of the latest understanding.

    This summary process ensures that agents maintain context across sessions without reprocessing the entire conversation history each time. Here’s a visual of how Solace Agent Mesh extracts and uses memory during an ongoing conversation.

    Solace Agent Mesh extracts and uses memory during an ongoing conversation

    History Store Providers

    Solace Agent Mesh supports multiple types of pluggable history store providers for storing and retrieving conversation history. These stores serve as the source of truth for both summarization and long-term memory extraction.

    Available provider types include:

    • In-Memory Store: Fast and lightweight; ideal for testing and short-term use. Data is lost when the system restarts.
    • Local Filesystem Store: Writes history to disk for persistence across sessions. Great for local development or offline use.
    • Redis Store: Offers fast, centralized access to conversation history, useful for distributed deployments or multi-agent scenarios.
    • SQL Store: Supports relational database backends for structured, queryable history persistence.
    • MongoDB Store: A flexible NoSQL option for high-scale or schema-less memory storage.

    You can configure which provider to use through Solace Agent Mesh’s agent configuration, depending on your scalability, durability, and deployment needs.

    How to Enable Long-Term Memory in Solace Agent Mesh Projects

    Let’s walk through how to enable and configure memory in a Solace Agent Mesh project.

    Step 1: Create a New Solace Agent Mesh Project

    Start by creating a new Solace Agent Mesh project. Check official docs here.

    mkdir my-agent-mesh
    cd my-agent-mesh
    solace-agent-mesh init
    

    Follow the prompts to configure your LLM provider, model, and default settings.

    TIP: Use --use-web-based-init with the init command to use the web UI based setup wizard.

    Step 2: Choose Your Memory Provider

    Solace Agent Mesh supports multiple memory backends. Here’s how to configure a file-based memory system. Update the `gateway.yaml` configuration file of your gateway with the following values:

    - history_policy: &default_history_policy
     	# ... Other Configs ...
     	enable_long_term_memory: true
     	long_term_memory_config:
     		summary_time_to_live: 432000 
     		llm_config: 
     			model: ${LLM_SERVICE_MODEL_NAME}
     			api_key: ${LLM_SERVICE_API_KEY}
     			base_url: ${LLM_SERVICE_ENDPOINT}
     		store_config:
     			type: "file" # History Provider
     			path: /tmp/history
    

    Or using with a SQL database for production applications:

    - history_policy: &default_history_policy
     	# ... Other Configs ...
     	enable_long_term_memory: true
     	long_term_memory_config:
     		summary_time_to_live: 432000 
     		llm_config: 
     			model: ${LLM_SERVICE_MODEL_NAME}
     			api_key: ${LLM_SERVICE_API_KEY}
     			base_url: ${LLM_SERVICE_ENDPOINT}
     		store_config:
    			type: "sql"
    			db_type: "postgres"
    			sql_host: "localhost"
    			sql_user: "admin"
      			sql_password: "admin"
    			sql_database: "history_db"
    			table_name: "session_history"
    
    

    Tip: Use file or in-memory for development. For production, Redis offers speed, while MongoDB supports structured data storage at scale.

    Step 3: Build and Run Your Project

    Now that you’ve configured your gateway to support a memory backend, you can ahead with building and running Solace Agent Mesh by running the following commands:
    solace-agent-mesh build
    solace-agent-mesh run

    Once you’ve done that, Solace Agent Mesh will automatically activate memory collection and summarization, which you can test by opening the browser UI at http://localhost:5001

    Try a command like: “Hi, I am from Ottawa, and I prefer detailed answers.”

    Then follow up with: “Where is my location?”

    Solace Agent Mesh will recall this from the Learned Facts section. It will also adjust its tone based on your Learned Instructions.

    How Memory Shows Up in Behavior

    Once you’ve enabled long-term memory in your Solace Agent Mesh project, you’ll start to notice subtle but powerful ways it changes how your agents interact.

    Here’s what that can look like in practice:

    Example 1: Recalling Facts

    You say: Hi, I’m Alex from Toronto.
    Solace Agent Mesh stores this as a Learned Fact.

    Later, you ask: What’s the weather like at my location?
    Solace Agent Mesh responds: Here’s the current weather in Toronto…

    No need to repeat yourself. Solace Agent Mesh remembers where you’re from and applies that fact intelligently.

    Example 2: Applying Preferences

    You say: Can you always format replies using Markdown?
    This becomes a Learned Instruction.

    Later, you ask: Summarize the last few messages.
    Solace Agent Mesh responds with a Markdown-formatted summary, because it remembered your preference and applied it automatically, no need to remind it each time.

    Example 3: Adjusting Personality Over Time

    You say early on: Keep it formal, please.
    You say later: Actually, be more casual.
    Solace Agent Mesh will remember and evolve its tone over time, not just in one session, but across future sessions too.

    These behaviors are powered by Solace Agent Mesh’s internal memory architecture, which stores and retrieves information much like a human assistant would. As you use the system, your interactions naturally shape how it responds, making the experience feel more intelligent, personal, and frictionless.

    You don’t need to manage state manually or write custom prompt engineering logic, Solace Agent Mesh’s memory engine takes care of it behind the scenes.

    Real-World Benefits

    Imagine developing an enterprise assistant that doesn’t just respond to commands but truly understands your needs and evolves with you:

    • Personalized Greetings: It remembers user preferences, greeting each person by name and making every interaction feel more personalized.
    • Data-Driven Insights: It recalls favorite dashboards, charts, or reports, allowing users to pick up right where they left off, saving valuable time on navigating through tools.
    • Adaptive Behavior: The assistant learns from prior interactions, adjusting its responses and approach based on ongoing feedback. It improves with every conversation, creating a more efficient and intuitive experience over time.
    • Project Continuity: It can summarize progress from past sessions, providing context to ongoing work. This feature ensures no one loses track of the bigger picture, even when working across multiple teams or projects.

    With Solace Agent Mesh, all of this becomes easily achievable by simply configuring your memory store and defining how the assistant learns and remembers. What might have seemed like a far-off vision for enterprise software is now a reality you can implement quickly and effectively.

    Wrapping Up

    Long-term memory is a cornerstone of intelligent agent behavior. With Solace Agent Mesh , your system can retain relevant facts, recall prior instructions, and adapt based on past interactions all within a distributed, scalable, and event-driven architecture. Whether you’re building a personal AI assistant, a domain-specific co-pilot, or a collaborative team of agents, Solace Agent Mesh provides the tools to not just make memory possible, but make it work practically.

    Solace Agent Mesh’s ability to manage long-term memory opens the door to more intuitive, adaptable, and intelligent agentic systems. It enables not just remembering past facts, but learning and evolving over time, creating an experience that feels more personalized and relevant. Whether it’s improving customer interactions, boosting productivity through smarter assistants, or streamlining complex workflows, the possibilities are vast.

    Want to See It in Action?

    Excited to get started with Solace Agent Mesh? Check out the demo on GitHub and explore how Solace Agent Mesh’s long-term memory can elevate your AI projects.

    sam-memory-demoby cyrus2281Long-Term Memory in Agentic AI Systems with Solace Agent Mesh.Open on GitHub

    For detailed setup instructions, the quick start guide is a great resource. And if you have any questions or want to share your ideas, the Solace Community is the place to be.

    Cyrus Mobini

    Cyrus is a senior AI integration developer at Solace, where he focuses on driving advancements in event-driven architecture (EDA) and artificial intelligence (AI). With a diverse background that includes roles as an AI engineer, AI researcher, and full-stack software developer, Cyrus brings expertise in AI-integrated software development, large-scale software architecture, machine learning, and full-stack development.
    Outside of work, Cyrus spends his free time exploring new experiences and technologies, contributing to open-source projects, and staying involved in AI meetups, where his professional and personal passions naturally align.