Skip to content

feat: EchoForge — Temporal Predictive Consolidation Engine with Causal Ripple Simulation#2

Open
Copilot wants to merge 8 commits intomainfrom
copilot/update-ai-memory-research-snapshot
Open

feat: EchoForge — Temporal Predictive Consolidation Engine with Causal Ripple Simulation#2
Copilot wants to merge 8 commits intomainfrom
copilot/update-ai-memory-research-snapshot

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 1, 2026

TIMPs' reflection layer is reactive (post-hoc LLM scoring adds 400–900ms), lacks hierarchical memory abstraction for longitudinal fidelity, and has no mechanism for simulating future states (burnout trajectories, relationship drift, contradiction cascades). EchoForge addresses all three by building a temporal memory DAG on the existing PostgreSQL/Qdrant dual-search layer.

Core Engine (core/echoForge.ts)

  • Write-time gating — scores incoming memories via importance × novelty × tag_impact proxy (no LLM call). Gates below threshold 0.3 to skip low-value ingestion
  • DAG graph connection — connects new nodes to recent neighbors via temporal edges (30-day window decay) and semantic edges (tag overlap ≥ 0.3). O(k) bounded, k=10
  • Causal ripple simulation — bounded propagation (depth 5) on the DAG using recursive CTEs. Detects burnout risk, relationship drift, contradiction cascades with probabilistic scoring. Stores predictions when risk ≥ 0.6
  • Hierarchical consolidation — periodic batch merge of raw → episodic summary nodes by tag cluster, with Ebbinghaus-inspired temporal decay (0.995^t) and pruning of fully decayed nodes
  • Proactive insights — pre-computed warning strings injected into agent system prompt context

Database Schema (db/echoForgeDb.ts)

Five new tables: echoforge_dag_nodes, echoforge_dag_edges (with unique constraint + self-loop prevention), echoforge_trajectories (auto-expiring via horizon_days), echoforge_ripple_results, echoforge_consolidation_log.

Tool 18 (tools/echoForgeTool.ts)

Operations: predictions, simulate, consolidate, trajectories, insights, status.

Integration

  • agent.ts — memories ingested into DAG during reflectAndStore; proactive insights appended to context in run()
  • toolRouter.ts — keyword routes for predict|forecast|trajectory|ripple|echoforge|anticipate|proactive
  • toolsDb.tsinitEchoForgeTables() called during migration
// During reflection, every stored memory is also ingested into the temporal DAG
const stored = await memoryIndex.storeMemory(...);
await echoForge.ingest(this.userId, stored.id, memory.content, memory.tags, memory.importance);

// Proactive insights injected into agent context before each interaction
const insights = await echoForge.getProactiveInsights(this.userId);
// → "⚠️ EchoForge Alert [burnout_risk]: Risk 72% (confidence 65%) — 4 stress signals in 12 connected memories"

Zero new dependencies. All EchoForge paths are supplementary with silent failure handling — existing behavior unchanged if tables don't exist or queries fail.

Copilot AI and others added 4 commits March 25, 2026 02:54
…c README

Co-authored-by: Sandeeprdy1729 <182460780+Sandeeprdy1729@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Sandeeprdy1729/timps/sessions/6ed039d1-af12-4ba4-b420-0480c5a7c2c7
…ction-level

Fix production-readiness issues: merge conflicts, auth, logger, hardcoded credentials
- Add EchoForge database schema (DAG nodes, edges, trajectories, ripples, consolidation log)
- Add EchoForge core engine with write-time gating, causal ripple simulation, hierarchical consolidation
- Add Tool 18 (echoforge_engine) for direct agent interaction
- Integrate EchoForge into agent reflection pipeline (auto-ingest to DAG)
- Add proactive insights to agent context
- Add EchoForge keyword routes to tool router
- Update system prompt to include Tool 18
- Register tables in toolsDb and exports

Agent-Logs-Url: https://github.com/Sandeeprdy1729/timps/sessions/a4819a82-0b6c-4433-ade3-7f26442e3f15

Co-authored-by: Sandeeprdy1729 <182460780+Sandeeprdy1729@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Sandeeprdy1729/timps/sessions/a4819a82-0b6c-4433-ade3-7f26442e3f15

Co-authored-by: Sandeeprdy1729 <182460780+Sandeeprdy1729@users.noreply.github.com>
Copilot AI and others added 4 commits April 2, 2026 07:20
…oning

- Add GateWeave database tables (belief_versions, gateweave_decisions, gateweave_summaries)
- Add core GateWeave service with multi-dimensional admission scoring
- Integrate write-time gating into memoryIndex.storeMemory
- Add belief versioning for position-like statements
- Add proactive propagation to burnout/relationship tools
- Add GateWeave tool for stats, belief listing, history, weight tuning
- Register GateWeave in tool router, agent system prompt, and tool registry
- Add DB init to server.ts and seed.ts

Agent-Logs-Url: https://github.com/Sandeeprdy1729/timps/sessions/0096f18f-eea6-48f1-8e32-8fec5c3a1fe8

Co-authored-by: Sandeeprdy1729 <182460780+Sandeeprdy1729@users.noreply.github.com>
…numbers as constants

Agent-Logs-Url: https://github.com/Sandeeprdy1729/timps/sessions/0096f18f-eea6-48f1-8e32-8fec5c3a1fe8

Co-authored-by: Sandeeprdy1729 <182460780+Sandeeprdy1729@users.noreply.github.com>
…memory-architecture

GateWeave: Adaptive memory admission control with belief versioning
@Sandeeprdy1729 Sandeeprdy1729 force-pushed the main branch 2 times, most recently from 6db083a to ecb59c0 Compare April 5, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants