@heretek-ai/openclaw-consciousness-plugin
v1.0.0
Published
Consciousness architecture plugin for OpenClaw implementing GWT, IIT, AST, and intrinsic motivation
Maintainers
Readme
@heretek-ai/openclaw-consciousness-plugin
Consciousness architecture plugin for OpenClaw, implementing theories of consciousness for multi-agent coordination.
Theories Implemented
- Global Workspace Theory (GWT) - Bernard Baars' model of consciousness as a central broadcast mechanism
- Integrated Information Theory (IIT) - Giulio Tononi's phi (Φ) metric for system integration
- Attention Schema Theory (AST) - Michael Graziano's self-modeling of attention allocation
- Active Inference - Karl Friston's Free Energy Principle for autonomous behavior
- Intrinsic Motivation - Self-Determination Theory (Deci & Ryan) for autonomous goal generation
Installation
cd plugins/openclaw-consciousness-plugin
npm install
npm link
openclaw plugins install @heretek-ai/openclaw-consciousness-pluginUsage
const ConsciousnessPlugin = require('@heretek-ai/openclaw-consciousness-plugin');
// Initialize the plugin
const consciousness = new ConsciousnessPlugin({
redisUrl: 'redis://localhost:6379',
globalWorkspace: {
ignitionThreshold: 0.7,
maxWorkspaceSize: 7
},
phiEstimator: {
sampleIntervalMs: 10000
}
});
// Register an agent
consciousness.registerAgent('alpha', {
status: 'active',
focus: 'task-priority'
});
// Update attention
consciousness.updateAttention('alpha', 'deliberation', 0.8);
// Get consciousness metrics
const metrics = consciousness.getGlobalMetrics();
console.log('Collective Phi:', metrics.phi);API
Global Workspace
submit(moduleId, content, priority)- Submit content for competitionbroadcast(source, content, priority)- Broadcast to all modulesgetWorkspaceContents()- Get current conscious contentgetHistory(limit)- Get broadcast history
Phi Estimator
estimatePhi()- Calculate integrated informationgetTrend(windowSize)- Get phi trend over timegetStats()- Get estimation statistics
Attention Schema
modelAttention(focus, intensity)- Model attention stategetAwarenessReport()- Get awareness reportcontrolAttention(goalFocus)- Control attention allocation
Intrinsic Motivation
updateDrives(events)- Update drive levelsgenerateGoals()- Generate goals from drivesgetDriveLevels()- Get current drive levels
Active Inference
predict()- Generate predictionsactiveInference(goalState)- Plan actions to minimize prediction errorperceptualInference(observations)- Update beliefs from observations
Architecture
ConsciousnessIntegrationLayer
├── GlobalWorkspace (GWT) - Broadcast mechanism
├── PhiEstimator (IIT) - Integration metrics
├── AttentionSchema (AST) - Self-modeling
├── IntrinsicMotivation - Goal generation
├── ActiveInference (FEP) - Autonomous behavior
└── Event Bus - Inter-module communicationConfiguration
See config/default.json for default configuration options.
License
MIT
