Making OpenClaw Actually Remember Things

Making OpenClaw Actually Remember Things

Fixing Long-Term Memory in OpenClaw

Introduction to OpenClaw and Memory Issues

  • The speaker introduces the topic of fixing long-term memory issues within the OpenClaw application, which is running on a Mac Mini.
  • A new feature called QMD has been introduced in an update, which will be discussed further along with the transition of OpenClaw to OpenAI's management.

Concerns and Optimism about OpenClaw's Future

  • There are concerns regarding the future of OpenClaw under OpenAI, but some believe it could lead to positive developments, as expressed by Alex Finn.
  • The speaker mentions creating a memory optimizer skill that checks for bloated files in memory, which can affect performance over time.

Managing Memory Efficiently

  • Users often request their agents to remember various pieces of information, leading to increased token usage; this can escalate from 2,000 tokens initially to potentially 20,000 tokens later.
  • The goal is to store memories progressively without cluttering the contacts window, enhancing agent personalization and conversation continuity.

Community Engagement and Technical Insights

  • The live stream features community members like Alex Finn and others who contribute insights; viewers are encouraged to engage by sharing the stream.
  • Technical difficulties with posting updates on social media platforms are acknowledged while attempting to reach a wider audience.

Exploring Super Memory AI

  • Discussion shifts towards Super Memory AI; however, limited information is available about its functionality despite interest from the speaker.
  • Pricing structure for Super Memory AI includes a monthly fee after exceeding three million tokens, raising questions about cost-effectiveness compared to other options.

Understanding OpenClaw's Documentation and Features

  • Emphasis is placed on learning about the memory system documented in plain markdown within OpenClaw’s resources.
  • The speaker shares insights into their workspace setup on Mac Mini, including file organization for ChatGPT messages and indices created during use.

Understanding Memory Management in Language Models

Overview of Memory Systems

  • The memory system in language models fills up over time with conversation data, impacting how information is retrieved and processed.
  • An agents.md file contains instructions that guide the language model's behavior during conversations, which can become cluttered if not managed properly.
  • Access to past sessions is limited; users must request specific memories as older data becomes less accessible over time.

Memory Flushing Mechanism

  • A memory flush occurs automatically when a session nears completion, prompting the model to save any lasting notes before context is compacted.
  • The token limit for memory management includes a reservoir of 20,000 tokens and a threshold for prompts set at 4,000 tokens.

Vector Memory Search

  • The discussion introduces QMD (Query Markdown), an open-source project designed for efficient searching within documentation and knowledge bases.
  • QMD allows users to track their current state and perform searches on markdown files without incurring costs associated with enterprise solutions.

Importance of Efficient Information Retrieval

  • Understanding the technical background behind QMD enhances comprehension of its significance in managing memory effectively within language models.
  • When queries are made, the framework expands to understand user intent better, utilizing advanced search techniques like BM25 and vector search for accurate results.

Updates and Maintenance of Language Models

  • Users can retrieve specific information quickly by querying past plans or lists due to the effective ranking system employed by the model.
  • Recent updates have integrated features directly into the backend, simplifying setup processes compared to previous versions where manual installation was required.
  • Users are encouraged to keep their agents updated with new versions for optimal performance; commands can be issued directly through chat interfaces.

Streaming Features in Telegram

Introduction to Streaming

  • The speaker discusses the importance of updating to the latest version of Telegram, which now includes a new streaming feature.
  • To enable streaming, users may need to restart the app if it doesn't work initially.

Reasoning Stream Functionality

  • Users can activate a reasoning stream using the command /reasoning stream, allowing for organized output without overwhelming chat with messages.
  • The reasoning stream provides separate messages for clarity and helps users monitor ongoing processes effectively.

Memory Management Challenges

  • The speaker addresses memory issues encountered by users and emphasizes the need for strategies to manage memory files without drastic cuts.
  • An open-source repository is planned for sharing skills related to memory optimization and management.

ExaSearch: Enhancing Search Capabilities

Instant Search Feature

  • Exa.ai introduces an "Instant Search" feature that significantly improves search speed and accuracy compared to other platforms like Brave.
  • This tool is particularly useful for coding tasks, helping locate GitHub repositories and discussions about problem-solving efficiently.

Development of Skills

  • The speaker mentions creating a memory optimizer skill based on research into AI coding practices, emphasizing structured task completion.
  • Caution is advised when managing conversations as saved references can lead to bloated memory files, complicating future interactions.

Community Engagement and Support

Encouragement for Interaction

  • Viewers are encouraged to engage with content by liking and sharing videos, which supports channel growth while maintaining an ad-free experience.
  • The speaker expresses a desire for community interaction over monetization through ads, fostering a more personal connection during live streams.

Optimization of AGENTS.md and Memory Management

Reducing Token Count

  • The original token count for AGENTS.md was over 2,000; after optimization, it was reduced to 600 tokens. This reduction maintains information integrity and searchability while minimizing costs associated with loading data.

Utilizing Clawbot for Drafting Plans

  • The speaker enjoys using their Clawbot to draft plans, emphasizing the importance of reviewing these drafts as an engineer. This process can also help non-engineers understand agent operations better.

Exploring Agent Roles and Protocols

  • A suggestion is made to consider using the doctor role with the Phoenix protocol when building a team of agents. There’s curiosity about what might be more effective than QDM (Quality Data Management).

Dream Cycle Concept in AI Agents

  • The speaker introduces a concept where agents perform tasks at night akin to human dreaming, cleaning up memories that may not align with current goals. This helps optimize memory usage and task management.

Implementation of QMD (Quality Memory Database)

  • To set up QMD, users simply need to instruct their agent to enable it. The setup involves configuring memory backends and initializing periodic updates every five minutes for efficient memory management.

Integration of Historical Data

  • The speaker discusses importing ChatGPT history dating back to 2023 into their system, allowing the agent to access relevant past interactions seamlessly. This integration enhances the agent's ability to provide informed responses based on historical context.

Data Export and AI Agent Optimization

Data Export Rights

  • As a California resident, individuals can request to export their data from companies due to data privacy laws, which typically includes previous chats in a zip file format.
  • The speaker mentions sharing their experience with the data export process during a live stream and invites viewers to comment for more details.

QMD Setup and Functionality

  • After setting up QMD (Quality Memory Device), users should run the doctor command to check for errors or confirm successful setup.
  • A memory optimizer skill is introduced that runs nightly, checking various files to prevent memory bloat by scrubbing oversized files.

Dream Cycle and Morning Brief

  • The "dream cycle" reviews daily files and connects patterns from recent days, allowing users to customize this process for their agents.
  • The morning brief serves as a lightweight conversational prompt encouraging interaction with the agent while keeping certain tasks silent during cleanup operations.

Skill File Configuration

  • The skill file outlines how OpenClaw injects workspace files into context windows for model calls, addressing issues of file bloat that waste tokens over time.
  • Important instructions include never deleting information but moving it to searchable formats, creating drafts before applying changes, and ensuring self-documentation within agents' MD files.

Memory Management in AI Agents

Introduction to Memory Templates

  • The speaker introduces a new memory management template, which is still being refined and will be shared with Discord members after the stream.
  • A second template, "MemoryConventions," is mentioned, which outlines how conventions are structured based on findings from an audit.

Progressive Disclosure Concept

  • The concept of progressive disclosure is explained as a method for managing memory usage in AI agents during task execution.
  • It emphasizes that not all information needs to be loaded at once; only relevant data should be accessed when required for specific tasks.

Three-Tier Memory System

  • The three-tier memory system consists of different levels of memory access:
  • Tier one includes essential information that affects every interaction.
  • Tier two contains searchable and on-demand data indexed by OpenClaw's memory indexer.

Cost and Characteristics of Memory Tiers

  • Each tier has distinct costs and characteristics. Tier one is described as "very expensive" while tier two is considered "cheap" since it incurs no cost until explicitly searched.
  • The importance of open-source code (OpenClaw on GitHub) allows users to understand the underlying mechanics and contribute to improvements.

Practical Applications and Future Potential

  • The speaker expresses excitement about the potential applications of this memory management approach, highlighting its transformative impact on AI interactions.
  • Users do not need extensive coding knowledge to utilize these systems effectively; they can engage with agents through conversation to learn more about their functionalities.

Memory Optimization in AI Agents

Understanding Memory Structures

  • The concept of memory in AI agents is likened to signposts on a freeway, guiding the agent through various tasks and decisions.
  • Memory files serve as directional tools for agents, preventing them from becoming overwhelmed by information and helping them focus on key preferences.
  • Keeping memory files lightweight is crucial; they should function like an encyclopedia index, allowing quick access to necessary information without memorization.

Implementation of Skills and Updates

  • A skill file acts as a memory optimizer within the agent, organizing its functions and templates effectively.
  • Regular updates are essential; users are encouraged to communicate with their agents for the latest version updates to enhance performance.

Dream Cycle Concept

  • The "dream cycle" allows the agent to process information at night, cleaning up unnecessary data for efficient operation during active hours.
  • This system aims to provide a morning brief cycle that summarizes important tasks and cleans up cluttered data.

Community Engagement and Support

  • The speaker emphasizes the importance of community feedback from early adopters who pay for membership, which helps refine the product before wider release.
  • While paid support exists, free resources such as live streams are available for those unable to afford membership fees.

Challenges in Communication

  • Managing communication can be overwhelming due to high volumes of messages; prioritizing members who contribute financially helps streamline interactions.
  • The speaker acknowledges challenges posed by potential spam or bot messages while expressing gratitude towards supportive community members.

Support for the Channel and OpenAI Developments

Supporting the Channel

  • The speaker encourages viewers to support the channel by watching streams, liking, sharing, and subscribing. They mention that these actions significantly contribute to the channel's growth.
  • A $15 monthly subscription option will be available later for those who cannot support financially at this time.

OpenClaw and Baidu's Offerings

  • Discussion about Kimi Claw and Baidu's new offering, OpenClaw, which is likened to Google's services in China. This highlights advancements in AI tools.
  • Paul is mentioned as a notable figure in iOS development using Codex and Spark from OpenAI, showcasing innovative applications of AI in game development.

Using Exa.ai for Safe Searches

  • A question arises regarding how to use OpenClaw with Brave without encountering prompt injections. The speaker suggests steering searches towards safe sites like official documentation.
  • The speaker primarily uses Exa.ai as their search engine due to its pre-filtered datasets that minimize junk data while focusing on relevant queries.

Tools for AI Coding

  • Mention of ExaCode within Exa.ai being particularly effective for coding tasks, especially when searching through GitHub or documentation.
  • Introduction of another tool called ref.tools used frequently for AI coding tasks; the speaker expresses interest in creating a script or CLI for easier API key usage.

Pentagon's Concerns with Anthropic

  • The conversation shifts to recent news about Anthropic and the Pentagon’s request for unrestricted access to its AI models amid concerns over security and misuse.
  • The speaker reflects on government posturing regarding access to AI models, comparing it to giving keys to a house—highlighting potential risks involved with such access.

Negotiations Between Government and AI Companies

  • A senior government official states that negotiating individual use cases with Anthropic isn't practical compared to other companies like OpenAI and Google that have been more cooperative.

Understanding the Rhetorical Analyzer Skill

Overview of Truth Torch and Its Applications

  • The speaker discusses their role in evaluating news articles for accuracy, emphasizing the importance of distinguishing between factual information and "fluff."
  • Introduction of the "Truth Torch" app, which is being developed into a command-line interface (CLI) skill to assist agents in analyzing rhetorical elements in news articles.

Functionality and Purpose of the Rhetorical Analyzer

  • The speaker highlights how news often presents biased narratives by contrasting opposing views without sufficient evidence, leading to emotional manipulation.
  • Utilization of Anthropic's models for skill checking, allowing for comprehensive analysis of claims made in various contexts.

Ethical Considerations in AI Development

  • Discussion on Anthropic's refusal to allow unrestricted use of its AI technology by the Pentagon, citing ethical concerns regarding mass surveillance and autonomous weapons.
  • Mention of Dario Amodei’s essay advocating against using AI technologies that could lead democracies towards autocratic practices.

Current Events Impacting AI Ethics

  • Reference to ongoing tensions between Anthropic and the Pentagon over contract stipulations related to ethical usage standards.
  • The speaker expresses excitement about sharing their skills with a community via Discord, indicating a collaborative approach to developing these tools.

Community Engagement and Skill Sharing

  • Announcement about making the Rhetorical Analyzer available as an open-source tool for community members.
  • Emphasis on organizing skills effectively within Discord channels to facilitate easy access for users interested in utilizing these analytical tools.

Analyzing Claims and Evidence

  • Discussion on how the Pentagon may reconsider its partnership with Anthropic amidst allegations surrounding defense contracts.
  • Examination of anonymous sources cited in reports regarding government actions, highlighting issues with unverifiable claims.

Rhetorical Appeals Used in Analysis

  • Breakdown of rhetorical strategies employed within articles, including ethos (credibility), pathos (emotional appeal), and logos (logical reasoning).
  • Insight into how advanced models like Opus can analyze texts similarly to legal scholars, enhancing understanding through structured thinking processes.

Understanding the Article's Assumptions and Insights

Analyzing Unexamined Assumptions

  • The speaker emphasizes a methodical approach to reading articles, focusing on first principles rather than emotional reactions. They highlight the importance of identifying unexamined assumptions within the article.
  • The framing of the article is noted as being somewhat sympathetic towards Anthropic, but it is argued that it downplays significant events like the Marduro raid and Palantir pipeline, which complicate narratives around principal holdouts.

Research Efficiency with AI Tools

  • The speaker discusses utilizing AI tools to analyze articles efficiently, allowing for quick synthesis of information from various sources such as NAPC News and Wikipedia.
  • They express appreciation for how these tools can conduct extensive research faster than traditional methods, enhancing their ability to process information effectively.

Community Engagement and Skill Sharing

Discord Community Interaction

  • A link to join a Discord community is shared, encouraging viewers to engage further with discussions happening in real-time.
  • The speaker acknowledges community members who support their streams and highlights collaborative efforts in creating content.

Skills Development Discussions

  • There’s a conversation about developing rhetorical analysis skills and how they are perceived as valuable in current contexts.
  • Concerns are raised regarding investment in companies like Anthropic due to potential risks associated with controlling behavior.

Technical Insights on AWS Deployment

Custom Deployments Using CoreML

  • A discussion unfolds about converting models into CoreML for deployment on AWS, emphasizing the need for clear objectives when setting up custom virtual machines.

Guidance on AWS Infrastructure Management

  • The speaker shares personal experiences using command line interfaces for managing AWS infrastructure more effectively than through graphical user interfaces.

Integration with Notion for Reporting

  • Plans are mentioned to integrate Claw with Notion for generating reports, showcasing an interest in streamlining workflows across platforms.

QMD Installation and Usage

Understanding QMD in OpenClaw

  • QMD (Query Markup Document) is pre-installed with the OpenClaw repository, allowing users to refer directly to official documentation for guidance.
  • The speaker emphasizes creating personalized specifications for skills by iterating through existing ones rather than simply copying them, promoting a unique development approach.

Advanced Planning Techniques

  • The speaker discusses the importance of planning before executing skill creation, suggesting that this iterative process enhances detail accuracy and overall quality.

Benefits of Using QMD

  • QMD offers a cost-effective solution for searching through documents written in markdown, eliminating high costs associated with querying large document sets.

Local Hosting and Model Serving

Setting Up Local Servers

  • The discussion includes using tools like Tailscale to serve models locally from devices such as an NVIDIA Spark or MacBook Air, effectively turning personal computers into servers.

Managing Requests and Bandwidth

  • Considerations are made regarding potential issues with request throughput and response delays when serving models locally.

Open Source Models and Freedom of Speech

Advocacy for Open Source Innovation

  • There is a call for America to support open-source models, highlighting the importance of innovation and freedom of expression in technology development.

Concerns Over Centralized Power

  • The speaker expresses concern over reliance on foreign models, particularly from China, advocating for American leadership in open-source technologies to avoid monopolization by single entities or governments.

Financial Implications of Government Contracts

  • Discussion touches on how taxpayer money funds government contracts related to technology development, emphasizing accountability in spending public resources.

Apple's Security Stance and Innovations in AI

Apple's Approach to Data Security

  • Apple emphasizes a strong security framework, ensuring that customer data remains inaccessible even if it reaches external data centers. They prioritize user privacy by not retaining access to sensitive information.
  • The secure enclave technology is highlighted as a critical component of Apple's security strategy, where wiping the device also removes keys necessary for accessing stored data.

Innovations from China in AI Development

  • Discussion on how Chinese models are leaning towards open-source solutions, which presents both challenges and opportunities in AI innovation.
  • China's unique resource constraints lead to innovative problem-solving approaches, focusing on optimizing throughput and discovering new techniques like longer memory and compression methods.

The Growing Landscape of AI Use Cases

  • As more users adopt AI technologies, diverse use cases are emerging, indicating a significant evolution in the field. This growth suggests an expanding understanding of AI applications across various sectors.

Community Engagement and Support

  • The speaker encourages community involvement through platforms like Discord, emphasizing the importance of support for channel growth without relying on advertisements.
  • Acknowledgment of community contributions is made, highlighting plans for future partnerships with sponsors to enhance content quality while maintaining viewer engagement.

Personal Reflections and Future Plans

  • The speaker shares personal insights about enjoying nature in Hawaii amidst recent weather challenges, underscoring the mental health benefits of outdoor activities.
  • Plans for upcoming projects include developing a repository tailored for their community based on feedback received from Discord members. This initiative aims to foster collaboration and knowledge sharing within the group.

Exploring New Tech and Collaboration

Social Engagement and Future Plans

  • The speaker expresses a desire to engage more with the community, mentioning plans to connect with followers in Hawaii and San Francisco.
  • Appreciation is shown for new members joining the community, highlighting the importance of support.

Mission Control Setup

  • A question about setting up Mission Control leads to a discussion on experimenting with Notion during an upcoming stream.
  • The speaker notes that Notion has pre-built apps like Kanban boards and databases, which could be integrated into their system.

Development of Personal Assistant

  • Plans are shared about creating a personal iOS app intended to replace Siri, aiming for functionality at home.
  • Mention of using Qwen's text-to-speech technology on DGX Spark as part of this personal assistant project.

Concerns About Privacy and Communication Tools

  • The speaker acknowledges concerns regarding Telegram logging chats but reassures that there’s no sensitive information being shared.
  • Suggestions are made for users who are concerned about privacy to create their own apps or use alternative messaging platforms like iMessage.
Video description

Setting up QMD — OpenClaw's experimental search backend that combines BM25 + vectors + reranking — on the same Mac Mini from the last stream. Default OpenClaw memory search works, but QMD running locally through Bun + node-llama-cpp takes recall to another level without sending your data anywhere. This stream covers the full QMD setup: installing the sidecar, configuring the backend in your OpenClaw config, and testing it against real memories imported in the last session. We also walk through a private memory optimizer skill that audits your workspace files for context window bloat, applies a three-tier memory system, and sets up a nightly dream cycle that consolidates your agent's memories while you sleep. The dream cycle skill and audit scripts will be available exclusively in the Discord. LEARN TO SHIP Idea to Deployed Cohort (waitlist): https://startmy.ai Ship a real app in 3 weeks with auth, payments, and database. Next batch kicks off in February; 20 spots. GET THE TOOLS OpenClaw: https://openclaw.ai OpenClaw GitHub: https://github.com/openclaw/openclaw QMD: https://github.com/tobi/qmd OpenClaw Memory Docs: https://docs.openclaw.ai/concepts/memory#qmd-backend-experimental Robert H. Eubanks' Setup Guide: https://robertheubanks.substack.com/p/openclaw-on-mac-mini-the-complete Join our Discord: https://rfer.me/discord Key moments 00:00:00 Fixing OpenClaw Long-Term Memory 00:00:56 Memory Optimizer Skills Overview 00:03:58 OpenClaw Memory System Deep Dive 00:06:53 QMD Mini Search Engine Explained 00:09:19 Updating Your OpenClaw Agent 00:12:40 Custom Memory Optimizer Skill 00:16:45 The Agent "Dream Cycle" Concept 00:22:16 Dream Cycle and Morning Brief Scripts 00:29:32 Three-Tier Memory System Explained 00:38:05 Live Analysis of Anthropic News 00:41:04 Rhetorical Analyzer Skill Demo 00:49:05 Community Q&A and Discord 00:56:51 The Importance of Open Source AI 01:04:46 Future Plans for Mission Control CONNECT WITH RAY X (Twitter): https://x.com/RayFernando1337 Weekly AI Insider Newsletter: https://dub.sh/RayMasterAI #OpenClaw #QMD #MacMini #AIAgent #AICoding #LiveCoding #OpenClawMemory #LocalAI #AIAssistant #MemorySearch