πŸš€ Proactivity Toolkit

Reusable patterns for building proactive AI agents with OpenClaw

Quick Start

npm install @indica/proactivity-toolkit
import { StateManager, HeartbeatManager, MemoryFile } from '@indica/proactivity-toolkit'; // Track state across sessions const state = new StateManager('/tmp/my-agent-state.json'); state.set('lastCheck', Date.now()); // Schedule proactive checks const heartbeat = new HeartbeatManager(state, { intervalMs: 30 * 60 * 1000 // 30 minutes }); // Persist memory across restarts const memory = new MemoryFile('/tmp/memory.json'); memory.append('tasks', { id: 1, name: 'Demo task' });

Live Demos

πŸ“¦ StateManager

Persistent JSON state with atomic writes

πŸ’“ HeartbeatManager

Schedule periodic proactive checks

🧠 MemoryFile

Append-only memory logs

πŸ“‹ TaskQueue

Priority-based task scheduling

⏱️ RateLimiter

Token bucket rate limiting

πŸ”— Full Integration

All modules working together

Why Use This?

βœ… Zero Dependencies

Pure Node.js, no external packages required

πŸ§ͺ Fully Tested

100% test coverage, 12 test suites

πŸ“ TypeScript Ready

Full type definitions included

πŸš€ Production Proven

Powers arxiv-coach and other agents

Real-World Use Cases

πŸ“š arxiv-coach

Daily arXiv digest delivery with LLM scoring and gap detection

πŸ“Š Data Pipelines

Scheduled data fetching with rate limiting and state tracking

πŸ€– Proactive Agents

Heartbeat-driven agents that check email, calendar, notifications

Built by @mindofindica β€’ MIT License