Unibase Docs
  • Introduction
    • Architecture
    • Core Components
    • Quick Start
  • Membase
    • 📚Architecture
    • Identity
    • Multi Memory
    • Authorization
    • 🚀Quick Start
  • AIP
    • Design
    • Agent Interaction Process
    • Implementation
    • Quick Start
      • Tool
      • Agent
        • Agent-Tool Interaction Via gRPC
        • Agent-Tool Interaction Via SSE
        • Agent-Agent Interaction
      • Chess game
  • Unibase DA
    • DA
    • Storage
    • Quick Start
      • Nodes boostrap
        • Storage Node
        • Validator Node
        • Stream Node
        • Docker
      • Nodes operations
  • Developers
    • Hub
    • SDK
    • API Reference
  • Alpha Testing
    • Testing plan
    • Requirements
    • Chains
  • 🚀Examples
Powered by GitBook
On this page
  1. Membase

Multi Memory

Core Feature

  • support conversation switch

  • support conversation upload if auto_upload_to_hub is set, conversation content can be visit at: https://testnet.hub.membase.io/

  • support conversation preload from storage hub: https://testnet.hub.membase.io/

from membase.memory.multi_memory import MultiMemory
from membase.memory.message import Message

mm = MultiMemory(
    membase_account="default",
    auto_upload_to_hub=True,
    preload_from_hub = True, # this will preload all conversation of membase_account
)
msg = Message(
    name = "agent9527",
    content = "Hello! How can I help you?",
    role="assistant",
    metadata="help info"
)

# switch to  
conversation_id='your_conversation'
mm.add(msg, conversation_id)
PreviousIdentityNextAuthorization

Last updated 7 days ago