Skip to main content

Sensory Memory ADI: iconic/echoic/haptic short-buffers with attention routing, feeling-aware touch interpretation, and AGI-ready hooks for agentic systems.

Project description

sensory-memory-adi (v0.1.2)

A production-ready sensory memory layer for agentic AI systems:

  • Visual (Iconic) buffer: ultra-short retention for frames/observations
  • Auditory (Echoic) buffer: short retention for audio chunks/ASR snippets
  • Touch (Haptic) buffer: short retention for touch events/pressure/vibration
  • Attention routing (AGI-ready hooks): salience scoring + event routing
  • Feeling-aware touch interpretation: friendly labels (tap/press/hold/swipe) + arousal estimate
  • Privacy/Redaction hooks: optional text redaction and safe snapshots
  • Optional FastAPI service for deployment

Memory Types & Typical Durations

Type Duration (typical)
Visual (Iconic) ~0.2–0.5 seconds
Auditory (Echoic) ~2–4 seconds
Touch (Haptic) ~1–2 seconds

Install

pip install sensory-memory-adi

Optional server:

pip install "sensory-memory-adi[server]"
uvicorn sensory_memory_adi.server.app:app --host 0.0.0.0 --port 8081

Quickstart

from sensory_memory_adi import SensoryMemoryADI, SensoryConfig

sm = SensoryMemoryADI(cfg=SensoryConfig(iconic_seconds=0.5, echoic_seconds=3.0, haptic_seconds=1.5))
sm.iconic.add_frame({"camera":"front", "objects":["car","lane"]})
sm.echoic.add_audio_text("User said: turn left at next light")
sm.haptic.add_touch({"kind":"tap", "pressure":0.6, "duration_ms":120})

print(sm.attend(top_k=5).model_dump())

Robotics & Cars (v0.1.2)

v0.1.2 adds real timestamps for all events and lightweight adapters:

  • ROS2 adapter (optional): convert ROS2 message dictionaries into iconic/echoic/haptic events
  • CAN bus adapter (optional): decode basic CAN frames (id, data) into haptic/echoic events (you can map signals)

The ROS2 adapter is dependency-free by default. If you use rclpy, integrate by passing your decoded data into the adapter functions.

Real timestamps

All add_* methods accept ts (Unix seconds). If omitted, current UTC time is used. The attend() function now uses the true timestamps to compute recency.

Zero-copy frames (v0.1.2)

IconicBuffer.add_frame() supports zero-copy payloads using memoryview or NumPy arrays (optional). If you pass a NumPy array, we store a memoryview of the underlying buffer plus shape/dtype metadata (no copy).

Install NumPy support:

pip install "sensory-memory-adi[numpy]"

High-concurrency ingestion (v0.1.2)

Includes:

  • ThreadSafeIngestor (multi-producer via queue.SimpleQueue, centralized drain)
  • AsyncIngestor (multi-producer via asyncio.Queue, centralized drain)

Optional C/C++ hot path (v0.1.2)

A pybind11 extension skeleton is included to accelerate the ring buffer. It is OFF by default. Build it only when needed:

macOS/Linux:

export SENSORY_MEMORY_ADI_BUILD_EXT=1
pip install .

Windows PowerShell:

$env:SENSORY_MEMORY_ADI_BUILD_EXT="1"
pip install .

Benchmarks

Run:

python bench/benchmark.py

ROS/ROS2 buffering patterns (optional utilities)

Includes a dependency-free ApproxTimeSynchronizer utility inspired by ROS message_filters.

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

sensory_memory_adi-0.1.2.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

sensory_memory_adi-0.1.2-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

Details for the file sensory_memory_adi-0.1.2.tar.gz.

File metadata

  • Download URL: sensory_memory_adi-0.1.2.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for sensory_memory_adi-0.1.2.tar.gz
Algorithm Hash digest
SHA256 3007ca114d7645aa5a64c222a0ba14fdfc2992c82e74e358b95bd2e75a370db8
MD5 dc6d3c100d78a1112d3343373fc74e8d
BLAKE2b-256 186f4c3da00c909ebe1ca1a121f85c5e1461dab23831c9cbd06dc53656e42451

See more details on using hashes here.

File details

Details for the file sensory_memory_adi-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for sensory_memory_adi-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 46157819998b9359abe68e0f32a7bf766ae8d3c6995ea3987f4429457dd94d9f
MD5 0b9a95b7d04af9df43f48f3dc1059d18
BLAKE2b-256 123f858ef6b301c5c21f8670d51282461451b06c503b406a8bd08aecefa9f980

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