Powered by Vectorize Hindsight Persistent Agent Memory
PulseRoute AI is an open-source, multimodal notification intelligence router designed for WhatsApp. It processes incoming text messages, image posters (via local EasyOCR), and voice notes (via local Whisper) to dynamically classify notifications into notify (interrupt immediately), digest (batch for later), or mute (silence noise).
By integrating Vectorize Hindsight Persistent Agent Memory, PulseRoute AI remembers user preferences, routing overrides, and interaction history over time—adapting notification decisions dynamically without model fine-tuning.
- Multimodal Intelligence: Seamlessly parses text, OCR image posters, and Whisper voice note audio transcripts.
- Vectorize Hindsight Memory Integration: Retains (
retain) user preference rules and routing feedback, and recalls (recall) them using Hindsight's parallel TEMPR (Temporal, Entity, Multi-strategy, Parallel, Retrieval) search engine. - 5-Stage Deterministic Pipeline:
- Stage 0: Hard Firewall for instant scam, phishing, and emergency interception.
- Stage 1: Local Media Extractor (faster-whisper + EasyOCR).
- Stage 2: Context Aggregator (Pandas SQL joins across user, group, and sender history).
- Stage 3: Hindsight Persistent Memory & Decision Engine.
- Stage 4: Optional LLM Fallback (Zero API calls mode supported).
- 100% Action Accuracy: Evaluated with 100% action classification accuracy across benchmark datasets.
[ Incoming WhatsApp Message ]
(Text / Image / Voice Note)
│
▼
[ Stage 0: Hard Firewall & Rule Checks ]
│
▼
[ Stage 1: Local Media Extraction ]
(Whisper + EasyOCR + FastText)
│
▼
[ Stage 2: Pandas Context Aggregation ]
(Users, Groups, History, Events)
│
▼
[ Stage 3 & 4: Hindsight Memory Layer ] ◄── Retain & Recall Memory
(User Preferences, Past Mutes/Notifies, (Vectorize Hindsight)
Feedback Loops & Long-Term Context)
│
▼
[ Final Decision Engine (output.csv) ]
action, message_type, reason, confidence,
evidence_message_ids
Unlike stateless notification routers that rely on hardcoded static rules, PulseRoute AI uses Hindsight Cloud to build a continuous memory bank (pulseroute-whatsapp-router).
When a user sets a custom preference (e.g., "Always route Store X electronics deal alerts as NOTIFY"), PulseRoute AI ingests the fact into Hindsight Cloud:
from pipeline.hindsight_memory import hindsight_manager
hindsight_manager.retain_user_rule(
user_id="usr_001",
rule_description="Always route Store X electronics sales as NOTIFY immediately."
)Before making a notification routing decision, Stage 3 queries Hindsight Cloud via the parallel TEMPR engine:
recalled_memories = hindsight_manager.recall_user_preferences(
user_id="usr_001",
query_context="Store X electronics deal poster"
)- Without Memory: Store X promotional deal is muted by default (confidence
0.70). - With Hindsight Memory: Recalls stored rule
ID: 9a921a3f...and automatically routes asNOTIFY(confidence0.98).
# Clone repository
git clone https://github.com/Neer-tech878/PulseRoute-AI---Next-Gen-Multimodal-WhatsApp-Notification-Intelligence-Engine.git
cd PulseRoute-AI---Next-Gen-Multimodal-WhatsApp-Notification-Intelligence-Engine
# Install Python dependencies
pip install -r code/requirements.txt
pip install hindsight-clientexport HINDSIGHT_API_KEY="your_hindsight_api_key"
export HINDSIGHT_BASE_URL="https://api.hindsight.vectorize.io"Demonstrates the agent learning curve live in terminal:
python code/demo_hindsight_learning.pyProcesses dataset messages and writes predictions to dataset/output.csv:
python code/main.pypython code/evaluation/main.py| Metric | Accuracy / Value |
|---|---|
| Action Accuracy | 100.0% (30/30 ground-truth samples) |
| Notify Accuracy | 100.0% |
| Digest Accuracy | 100.0% |
| Mute Accuracy | 100.0% |
| Average Confidence | 0.95 |
| Overall Score | 98.3% |
├── code/
│ ├── main.py # Main pipeline entry point
│ ├── demo_hindsight_learning.py # Live Hindsight Agent Memory learning demo
│ ├── clear_voice_cache.py # Cache utility
│ ├── pipeline/
│ │ ├── hindsight_memory.py # Vectorize Hindsight Cloud SDK integration
│ │ ├── stage0_hard_rules.py # Hard firewall & regex checks
│ │ ├── stage1_media.py # Whisper audio & EasyOCR extractor
│ │ ├── stage2_joiner.py # Pandas context aggregation
│ │ ├── stage3_decision.py # Hindsight memory recall & scoring engine
│ │ └── stage4_llm.py # LLM fallback stage
│ └── evaluation/
│ └── main.py # Evaluation benchmark script
└── dataset/ # Input messages & historical context CSVs
- Hindsight GitHub: https://github.com/vectorize-io/hindsight
- Hindsight Documentation: https://hindsight.vectorize.io/
- Vectorize Agent Memory: https://vectorize.io/what-is-agent-memory
Licensed under the Apache 2.0 License.