Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

memwal

Latest version: v0.2.3.dev2

Overview

Last scanned
1 Dec 2026
Published
1 Dec 2026
PyPI package Publisher: ducnmm
140 Stars
50 Forks
33 Versions
1.6K Downloads
TypeScript Repo language

Scan summary

memwal was last scanned on 1 Dec 2026 at version 0.2.3.dev2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 33 versions; the latest 2 were published on 1 Dec 2026.
  • Findings: No rules fired in version 0.2.3.dev2.
  • Downloads: 1,579 downloads.

Versions

33 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.2.3.dev2 LATEST 1 Dec 2026 No rules fired
0.2.3.dev1 1 Dec 2026 No rules fired
0.2.3 9 Nov 2026 No rules fired
0.2.3.dev0 5 Nov 2026 Not shown
0.2.2.dev6 30 Oct 2026 Not shown

No rules fired in 0.2.3.dev2

Findings

Findings for v0.2.3.dev2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.2.3.dev2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

Walrus Memory Python SDK

Python SDK for Walrus Memory — Privacy-first AI memory with Ed25519 signing.

All data processing (encryption, embedding, Walrus storage) happens server-side in a TEE. The SDK signs requests with your Ed25519 delegate key and sends text over HTTPS.

Installation

Use a patched Python 3.11+ interpreter (3.11.17, 3.12.15, 3.13.17, or 3.14.9 and newer patches in those series). Version 0.2.0 drops Python 3.9/3.10 support. Recreate existing virtual environments when changing interpreters, and update pip to 26.2.2+ and certifi to 2026.10.19+ in every environment. See the runtime security update guide for the checksum-verified pip bootstrap and uv guidance.

pip install memwal

With optional integrations:

pip install memwal[langchain]   # LangChain support
pip install memwal[openai]      # OpenAI SDK support
pip install memwal[all]         # Everything

Try It In Colab

Open the runnable Walrus Memory Python SDK Colab for a notebook walkthrough covering installation, secure staging configuration, optional prod, health checks, remember, remember_async, async job waiting, recall, bulk remember, remember_bulk_async, remember_bulk_and_wait, optional SDK utilities, OpenAI/LangChain middleware, OpenAI-compatible provider settings such as OPENAI_BASE_URL, and troubleshooting.

Quick Start

Set your environment variables first:

export MEMWAL_PRIVATE_KEY="your-ed25519-delegate-private-key-hex"
export MEMWAL_ACCOUNT_ID="0x-your-walrus-memory-account-id"
export MEMWAL_SERVER_URL="https://relayer.memory.walrus.xyz"

MEMWAL_PRIVATE_KEY is the delegate private key from the Walrus Memory dashboard and must stay server-side.

Async (recommended)
import asyncio
import os
from memwal import MemWal, RecallParams

async def main():
    memwal = MemWal.create(
        key=os.environ["MEMWAL_PRIVATE_KEY"],
        account_id=os.environ["MEMWAL_ACCOUNT_ID"],
        server_url=os.environ.get("MEMWAL_SERVER_URL", "https://relayer.memory.walrus.xyz"),
    )

    # Store a memory and wait until the background job is searchable
    result = await memwal.remember_and_wait("I'm allergic to peanuts")
    print(result.blob_id)

    # Recall memories
    matches = await memwal.recall(RecallParams(query="food allergies", limit=10, max_distance=0.8))
    for memory in matches.results:
        print(f"{memory.text} (relevance: {1 - memory.distance:.2f})")

    # Analyze conversation for facts and wait until extracted facts are searchable
    analysis = await memwal.analyze_and_wait("I love coffee and live in Tokyo")
    for fact in analysis.facts:
        print(fact.text)

    await memwal.close()

asyncio.run(main())

0.8 is a starting point for the distance cutoff. Calibrate max_distance against your own memories and query phrasing: lower values reduce noise, while higher values preserve more relevant matches.

Sync
import os
from memwal import MemWalSync, RecallParams

client = MemWalSync.create(
    key=os.environ["MEMWAL_PRIVATE_KEY"],
    account_id=os.environ["MEMWAL_ACCOUNT_ID"],
    server_url=os.environ.get("MEMWAL_SERVER_URL", "https://relayer.memory.walrus.xyz"),
)

result = client.remember_and_wait("I'm allergic to peanuts")
matches = client.recall(RecallParams(query="food allergies"))
client.close()
Offline tests and CI

MemWalMock and MemWalMockSync implement the common memory API in process. They require no credentials, relayer, chain, or paid storage and use deterministic token-overlap ranking.

from memwal import MemWalMock, RecallParams

async def test_memory_flow():
    memwal = MemWalMock.create(namespace="test-user")
    await memwal.remember_and_wait("The user prefers dark mode")

    result = await memwal.recall(RecallParams(query="display preference"))
    assert "dark mode" in result.results[0].text

The mock supports remember/job polling, bulk remember, recall, analyze, embed, ask, health, restore, list_namespaces, forget(blob_id) (synchronous per-blob deletion returning bool), forget_namespace(namespace?) (namespace erasure returning ForgetResult), and clear(namespace?). For deterministic behavior, analyze stores its full input as one fact instead of invoking an LLM extractor. Its simple relevance score is for application tests, not production search-quality evaluation.

Context Manager
import os
from memwal import MemWal

async with MemWal.create(
    key=os.environ["MEMWAL_PRIVATE_KEY"],
    account_id=os.environ["MEMWAL_ACCOUNT_ID"],
) as memwal:
    await memwal.remember_and_wait("I prefer dark mode")

Environment Presets

Instead of hardcoding a relayer URL, pass env to target a hosted relayer. Same shorthand as the TypeScript SDK and MCP package.

from memwal import MemWal

memwal = MemWal.create(
    key=os.environ["MEMWAL_PRIVATE_KEY"],
    account_id=os.environ["MEMWAL_ACCOUNT_ID"],
    env="staging",   # staging for testing, prod for production
)
env Relayer URL
prod https://relayer.memory.walrus.xyz
dev https://relayer.dev.memwal.ai
staging https://relayer.dev.memwal.ai

Precedence: any explicit server_url wins over env, including the hosted default. env applies only when server_url is omitted (None). An unknown preset raises ValueError. env is also accepted by MemWalSync.create, with_memwal_langchain, and with_memwal_openai.

AI Middleware

LangChain
import os
from langchain_openai import ChatOpenAI
from langchain_core.messages import HumanMessage
from memwal import with_memwal_langchain

llm = ChatOpenAI(model="gpt-4o")
smart_llm = with_memwal_langchain(
    llm,
    key=os.environ["MEMWAL_PRIVATE_KEY"],
    account_id=os.environ["MEMWAL_ACCOUNT_ID"],
    server_url=os.environ.get("MEMWAL_SERVER_URL", "https://relayer.memory.walrus.xyz"),
    max_memories=5,
    min_relevance=0.3,
)

# Memories are automatically recalled and injected
response = await smart_llm.ainvoke([HumanMessage("What are my food allergies?")])
OpenAI SDK
import os
from openai import AsyncOpenAI
from memwal import with_memwal_openai

client = AsyncOpenAI()
smart_client = with_memwal_openai(
    client,
    key=os.environ["MEMWAL_PRIVATE_KEY"],
    account_id=os.environ["MEMWAL_ACCOUNT_ID"],
    server_url=os.environ.get("MEMWAL_SERVER_URL", "https://relayer.memory.walrus.xyz"),
)

# Memories are automatically recalled and injected
response = await smart_client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "What are my food allergies?"}],
)

API Reference

MemWal.create(key, account_id, server_url?, namespace?)

Create a new async client.

Methods
Method Description
await remember(text, namespace?) Accept a background remember job and return job_id
await get_remember_status(job_id) Read one remember job without waiting
await wait_for_remember_job(job_id, ...) Poll one remember job until it is searchable
await remember_and_wait(text, namespace?, ...) Store a memory and wait until it is searchable
await remember_bulk(items) Accept several background remember jobs
await wait_for_remember_jobs(job_ids, opts?) Poll several remember jobs together
await remember_bulk_and_wait(items, opts?) Store several memories and wait for completion
await recall(RecallParams(query, limit?, namespace?, max_distance?, scoring_weights?, sort?)) Search memories, optionally filtering by distance
await analyze(text, namespace?) Extract and store facts
await ask(question, limit?, namespace?) Ask a question answered using memories
await restore(namespace, limit?) Restore a namespace
await forget(namespace?) Delete index rows for the namespace. Walrus blobs stay. Returns ForgetResult.
await list_namespaces(cursor?, limit?) List namespaces that hold memories; paginate on has_more
await health() Check server health
await remember_manual(opts) Store encrypted payload + pre-computed vector
await recall_manual(opts) Search with pre-computed vector
await get_public_key_hex() Get Ed25519 public key
destroy() Zero internal key seed buffer, drop signing credentials/session cache, and permanently invalidate the client
await close(clear_keys=False) Close the underlying HTTP client (pass clear_keys=True to also run destroy())
Key Lifecycle & destroy()

For parity with the TypeScript SDK's destroy(), MemWal and MemWalSync expose destroy() and close(clear_keys=True):

  • key may be passed as a hex string, suiprivkey1... string, or a 32-byte bytes / bytearray. When passed as bytearray, the SDK copies the bytes into its own internal buffer so destroy() zeroes only the client's copy and leaves the caller's bytearray untouched.
  • Calling destroy() (or await client.close(clear_keys=True) / sync_client.close(clear_keys=True)) zero-fills the client's internal bytearray seed copy in place, clears _private_key_hex, drops the _signing_key and cached SEAL session references, cancels any in-flight initialization tasks, and causes subsequent or in-flight calls to raise MemWalError.
  • CPython memory semantics: Python str and bytes objects (and PyNaCl's internal C-level SigningKey buffers) are immutable in CPython and cannot be overwritten in place from pure Python. destroy() zeroes the mutable bytearray copy and drops all references to immutable key objects so they become eligible for garbage collection once the caller also releases its references. To minimize plaintext str copies in process memory, pass a 32-byte bytearray to MemWal.create() and zero your own buffer after creation.

Authentication

Every request is signed with Ed25519:

message = f"{timestamp}.{method}.{path_and_query}.{body_sha256}.{nonce}.{account_id}"

Signed requests send x-public-key, x-signature, x-timestamp, x-nonce, and x-account-id. Relayer-mode requests also send x-seal-session; manual-mode requests omit decrypt credentials.

License

MIT

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • pypi-releases memwal

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Frame 2085668439 (1)
Group 1261154229