Motorhead

Memory server for LLM applications

open-sourceproductionrustopen-sourceredisself-hosted

Memory Types

conversation-history, working-memory

Integrations

langchain, redis


Overview


Motorhead is a memory server written in Rust for managing conversation context in LLM applications. Built by Metal, it provides a fast, lightweight solution for storing and retrieving conversation history with automatic summarization.


Key Features


  • **High Performance**: Built in Rust for speed and efficiency
  • **Redis Backend**: Uses Redis for fast, reliable storage
  • **Automatic Summarization**: Summarizes long conversations to fit context windows
  • **Session Management**: Manages multiple conversation sessions
  • **Simple API**: RESTful API for easy integration

  • When to Use Motorhead


    Motorhead is ideal for:

  • Applications needing fast conversation memory
  • Self-hosted deployments requiring performance
  • Simple conversation history management
  • Teams comfortable with Redis infrastructure

  • Pros


  • Very fast (Rust + Redis)
  • Simple, focused functionality
  • Easy to self-host
  • Lightweight footprint
  • Automatic context summarization

  • Cons


  • Less feature-rich than alternatives
  • Requires Redis
  • Limited to conversation memory
  • Smaller community

  • Getting Started


    # Run with Docker

    docker run --name motorhead -p 8080:8080 \

    -e REDIS_URL=redis://localhost:6379 \

    getmetal/motorhead


    import requests


    # Add messages

    requests.post("http://localhost:8080/sessions/123/memory", json={

    "messages": [

    {"role": "user", "content": "Hello!"},

    {"role": "assistant", "content": "Hi there!"}

    ]

    })


    # Get memory

    response = requests.get("http://localhost:8080/sessions/123/memory")


    Architecture


    Motorhead is designed for simplicity:


  • **Memory Store**: Redis-backed message storage
  • **Summarizer**: LLM-based conversation summarization
  • **REST API**: Simple HTTP interface

  • Pricing


  • **Open Source**: Free, MIT license