Skip to main content

On-chain memory infrastructure for AI agents — built on the Internet Computer

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

totalrecallagent-0.6.0.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

totalrecallagent-0.6.0-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file totalrecallagent-0.6.0.tar.gz.

File metadata

  • Download URL: totalrecallagent-0.6.0.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for totalrecallagent-0.6.0.tar.gz
Algorithm Hash digest
SHA256 07f861794845c00e91b2833586c7339164895b3d19dabde68fc2edac4750ae3c
MD5 6a9d3bf9cfe205394c8c11ccae4dfb38
BLAKE2b-256 8e27ffc63eaa43dbaa72b2446df7ac1883de68aed00d6bb494edd103da7568a8

See more details on using hashes here.

File details

Details for the file totalrecallagent-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for totalrecallagent-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5966277b14f8572c5a2255bc735bbac8567ebfb6f11784b8a4abf7defbe83cba
MD5 e7fc53cb501d9326709a30766d0aea0e
BLAKE2b-256 292461fe27e7269b12aba3f8633b04d74def7c4c666b54ec2a55e6a6ccf38678

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page