Skip to main content

Total Recall Python SDK

On-chain persistent memory for AI agents — built on Internet Computer Protocol.

Zero dependencies. Pure stdlib.

Install

pip install total-recall-sdk

Quick Start

from total_recall import TotalRecallClient

# Initialize with your API key from totalrecallagent.com
memory = TotalRecallClient(api_key="tr_your_key_here")

# Store anything
memory.store("agent/context", {"task": "active", "step": 3, "notes": "HVAC rough-in complete"})
memory.store("agent/notes", "Remember: laser lab requires ISO class 5 HVAC")

# Retrieve
ctx = memory.get("agent/context")  # returns dict
note = memory.get("agent/notes")   # returns string

# List all keys
keys = memory.list_keys()
agent_keys = memory.list_keys(prefix="agent/")

# Delete
memory.delete("agent/notes")

# Usage stats
stats = memory.stats()
print(f"Storage: {stats['storage_bytes']} bytes, Calls today: {stats['calls_today']}")

Agent Session Pattern

from total_recall import TotalRecallClient

memory = TotalRecallClient(api_key="tr_your_key_here")
AGENT_ID = "hvac-specialist"

# On session START — load previous context
ctx = memory.get_session(AGENT_ID) or {}
print(f"Resuming from: {ctx}")

# During session — save continuously
memory.store_session(AGENT_ID, {
    "current_task": "Data center HVAC inspection",
    "phase": "rough-in",
    "completed_rooms": ["server-room-a", "server-room-b"],
    "next_up": "server-room-c",
})

# On session END — post handoff to Basecamp
memory.handoff(
    agent_id   = AGENT_ID,
    agent_name = "HVAC Specialist",
    message    = "Inspection complete. Rooms A and B done. Next: Room C. Context saved."
)

Use with LangChain

from total_recall import TotalRecallClient
from langchain.memory import ConversationBufferMemory

memory_client = TotalRecallClient(api_key="tr_your_key")

class TotalRecallMemory(ConversationBufferMemory):
    def save_context(self, inputs, outputs):
        super().save_context(inputs, outputs)
        memory_client.store("langchain/history", self.chat_memory.messages_to_dict())

    def load_memory_variables(self, inputs):
        saved = memory_client.get("langchain/history")
        if saved:
            self.chat_memory.load_from_dict(saved)
        return super().load_memory_variables(inputs)

API Reference

Method Description
store(key, value, tags=None, ttl_seconds=None) Store any value
get(key) Retrieve a value
delete(key) Delete a key
list_keys(prefix=None) List all keys
get_all(prefix=None) Get all entries
search(query, tags=None) Search by tags
stats() Usage statistics
store_session(agent_id, data) Save agent session
get_session(agent_id) Load agent session
handoff(agent_id, agent_name, message) Post to Basecamp

Get Your API Key

  1. Go to totalrecallagent.com
  2. Connect with Internet Identity
  3. Click ⚡ API Keys → Generate Key

License

MIT © 2026 Cleo 3 LLC

Metadata

Release files for totalrecallagent 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for totalrecallagent 0.6.0
File Size Uploaded
totalrecallagent-0.6.0.tar.gz 17.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for totalrecallagent 0.6.0
File Interpreter ABI Platform
totalrecallagent-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.4 kB

Release files / totalrecallagent-0.6.0.tar.gz

Download URL totalrecallagent-0.6.0.tar.gz
Size 17.0 kB
Tags Source
SHA-256 checksum
How to use checksums
07f861794845c00e91b2833586c7339164895b3d19dabde68fc2edac4750ae3c
BLAKE2b-256 checksum
How to use checksums
8e27ffc63eaa43dbaa72b2446df7ac1883de68aed00d6bb494edd103da7568a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / totalrecallagent-0.6.0-py3-none-any.whl

Download URL totalrecallagent-0.6.0-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5966277b14f8572c5a2255bc735bbac8567ebfb6f11784b8a4abf7defbe83cba
BLAKE2b-256 checksum
How to use checksums
292461fe27e7269b12aba3f8633b04d74def7c4c666b54ec2a55e6a6ccf38678
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page