Skip to main content

Jungian Intelligence Layer

The Jungian Intelligence Layer (v3.2.0) adds four psychology-inspired subsystems on top of the existing concentric memory rings and Collective Best Practices. Named after Carl Jung’s analytical psychology, each subsystem maps to a core Jungian concept to transform raw memory data into meaningful, context-aware intelligence.
The Jungian Intelligence Layer builds on the memory infrastructure introduced in v3.1.0. If you are new to the memory system, start with the Memory & Intelligent Knowledge page.

The Four Subsystems


How It All Fits Together

The four subsystems operate on different layers of the memory stack but work together to create a self-improving intelligence system:
  Observations (tool calls, outcomes, errors)
         |
         v
  +-----------------------+     +-------------------------+
  | Temporal Events       | --> | Synchronicity Detector  |
  | (anonymized, hashed)  |     | (pure SQL, no LLM)      |
  +-----------------------+     +-------------------------+
         |                              |
         v                              v
  +-----------------------+     +-------------------------+
  | Fresh Memory          | --> | Archetype Router        |
  | (concentric rings)    |     | (deterministic mapping) |
  +-----------------------+     +-------------------------+
         |                              |
         v                              v
  +-----------------------+     +-------------------------+
  | Memory Ring           | --> | Dream Processor         |
  | (long-term store)     |     | (cluster + LLM merge)   |
  +-----------------------+     +-------------------------+
         |                              |
         v                              v
  +-----------------------+     +-------------------------+
  | Individuation Score   | <-- | All subsystems feed     |
  | (maturity metrics)    |     | into scoring components |
  +-----------------------+     +-------------------------+
  1. Temporal events are recorded during every tool call and observation (fire-and-forget, non-blocking)
  2. Synchronicity detection runs periodically (cron) to discover co-occurrence patterns, failure correlations, and emergent workflows across all anonymized profiles
  3. The archetype router enriches every pattern injection with a Jungian archetype label and weighted score, ensuring the most contextually relevant patterns are surfaced first
  4. Dream processing runs during the decay cron to discover clusters of related memories and consolidate them, saving tokens while preserving knowledge
  5. Individuation scoring aggregates metrics from all subsystems into a single maturity score that tracks profile growth over time

Privacy Model

Profile Hash Only

Temporal events store profile_hash (HMAC-SHA256), never raw UUIDs. Individual usage patterns cannot be traced back to specific users.

k-Anonymity (k >= 3)

Synchronicity patterns are only surfaced when observed by 3 or more unique profiles. Individual behaviors are never exposed.

SDK & MCP Integration

SDK Methods

All methods are available in the JavaScript, Python, and Go SDKs:
import { PluggedInClient } from 'pluggedinkit-js';

const client = new PluggedInClient({ apiKey: 'your-api-key' });

// Archetype-aware memory search
const results = await client.jungian.searchWithContext({
  query: 'database migration patterns',
  toolName: 'drizzle_migrate',
  outcome: 'failure',
});

// Get individuation score
const score = await client.jungian.getIndividuationScore();
console.log(`Level: ${score.level}, Total: ${score.total}/100`);

// Get score history for charting
const history = await client.jungian.getIndividuationHistory(30);

// Get synchronicity patterns
const patterns = await client.jungian.getSynchronicityPatterns();

// Get dream consolidation history
const dreams = await client.jungian.getDreamHistory();

MCP Tools

ToolDescription
pluggedin_memory_search_with_contextSearch memories with archetype-aware context. Accepts query, optional toolName, and optional outcome. Returns patterns enriched with archetype labels and weights.
pluggedin_memory_individuationGet your individuation score with maturity level, component breakdown, weekly trend, and an actionable improvement tip.

Configuration

All settings have sensible defaults and can be tuned via environment variables:
VariableDefaultDescription
SYNC_RETENTION_DAYS90How long temporal events are retained
SYNC_COOCCURRENCE_WINDOW_DAYS30Lookback window for co-occurrence analysis
SYNC_COOCCURRENCE_GAP_MINUTES5Max gap between co-occurring tool uses
SYNC_FAILURE_WINDOW_DAYS90Lookback window for failure correlation
SYNC_WORKFLOW_WINDOW_DAYS30Lookback window for emergent workflows
SYNC_WORKFLOW_GAP_MINUTES15Max total gap for three-tool workflows
SYNC_MIN_EVENTS_THRESHOLD10Minimum events for a tool to be analyzed
SYNC_CRON_ENABLEDtrueEnable/disable the synchronicity cron

Next Steps