π 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