Colab Notebook
The Walrus Memory Python SDK Colab is a runnable notebook that walks you through installing, configuring, and calling the Walrus Memory Python SDK from Google Colab. It defaults to staging for test credentials. Use it when you want a notebook-first walkthrough, or as an interactive reference before you integrate the SDK into your own project.
How to run the notebook
To run the notebook:
- Open the Walrus Memory Python SDK Colab.
- Load your credentials through Colab Secrets or hidden prompts.
- Run each cell to store and recall memories.
What does the notebook cover?
The notebook covers:
- installing
memwal - loading credentials through Colab Secrets or hidden prompts
- configuring the SDK without exposing private keys, defaulting to
staging - switching to
prodwhen you have production credentials - creating
MemWalSyncfor notebook-friendly calls - checking relayer
health, compatibility, and delegate public key derivation - storing memory with
remember - waiting for async remember jobs to persist on Walrus
- retrieving memory with
recall - using
remember_async,remember_and_wait, bulk remember,remember_bulk_async,remember_bulk_and_wait,ask,analyze,analyze_and_wait,embed, manual search/register with scoring weights, andrestore - optionally wrapping OpenAI and LangChain clients with Walrus Memory middleware
- using
OPENAI_BASE_URLfor OpenAI-compatible providers such as OpenRouter - basic troubleshooting for auth, namespaces, and async remember jobs
The repo copy lives in packages/python-sdk-memwal/notebooks/walrus_memory_python_sdk.ipynb.
Choose the relayer environment
The notebook selects staging for test credentials. In your own project, pass env to the SDK to choose the relayer:
env | Relayer URL |
|---|---|
prod | https://relayer.memory.walrus.xyz |
staging | https://relayer.dev.memwal.ai |
An explicit server_url always takes precedence, including the hosted default. env applies only when you omit server_url (None), and an unknown preset raises ValueError.
Accounts and delegate keys are specific to each network. A key you create on staging does not authenticate against the production relayer, and the reverse is also true. Match the relayer environment to where you created your account.