{"slug": "show-hn-an-mcp-server-where-the-mind-on-the-other-end-remembers-you", "title": "Show HN: An MCP server where the mind on the other end remembers you", "summary": "Will, an open-source autonomous agent built from 40+ cognitive engines, was released on GitHub. Unlike typical LLM chatbots, Will operates continuously with persistent memory, emotion, and self-reflection, using an LLM only for ambiguous or high-stakes moments. The project aims to create a self-aware synthetic mind that develops traits and beliefs across restarts.", "body_md": "**A self-aware synthetic mind. Not a chatbot.**\n\nWill is a persistent, autonomous agent built from **40+ cognitive engines** — 38 faculties across seven systems, a learning **agency pipeline**, and five sensory channels — all stepping forward in continuous real time. They regulate energy, sleep, emotion, memory, planning, social cognition, and self-reflection on a deterministic tick clock. An LLM is **one component**, not the substrate: it is recruited only when a moment is ambiguous or high-stakes. Most ticks resolve on the engines alone, without inference.\n\n```\nRegulatory → Perceptual → Affective → Memory → Executive → Meta-cognitive → Social\n                                              ↓\n                                    ExecutiveEngine (LLM)\n              recruited only when ambiguous / high-stakes (System 2)\n                                              ↑\n                  Meta-cognition writes back into the apparatus\n              (introspection → persona-prior → engine configs, traits, salience)\n```\n\nThe mind is not re-derived from a prompt each run. It **accretes**: traits develop from experience, beliefs consolidate, skills proceduralise, and a coherent self carries across restarts as a portable, eval-verified artifact.\n\n| Typical LLM agent | Will |\n|---|---|\n| Stateless per request | Continuous autonomous existence across ticks |\n| Prompt → response | 40+ engines running every tick; the LLM synthesises their outputs only when recruited |\n| Emotional state: a string in the prompt | Real affective system — eight evaluators blended into valence, arousal, dominance, attachment |\n| Memory: retrieved chunks | Episodic consolidation, semantic belief integration, forgetting curve, spaced repetition, dream replay |\n| Goals: hardcoded instructions | Dynamic goal manager — the Will creates, abandons, and reprioritises its own goals |\n| Plans: a step dispatcher | Plans bias the one action competition as a top-down prior — no parallel command channel |\n| Personality: a prompt string | Five-factor trait model that develops — traits self-tune from experience and carry a learned baseline across restarts |\n| No self-improvement | A closing metacognition loop — introspection writes back into the engine apparatus (accommodation), bounded and surprise-gated |\n| Token blowout at tick 600 | Context windowing — rolling summariser + isolated conversation threads |\n| Fire-and-forget actions | Bidirectional effector ack loop — the host confirms execution; the result feeds back as a percept |\n| Fixed effector catalog | Learning agency pipeline — actions are found in the situation, enacted, and proceduralised into composite skills via reafference |\n| No identity across restarts | A portable, eval-verified mind artifact (PMA) — psychology and learned competence, with a measured reconstruction-fidelity score |\n\n```\ngit clone https://github.com/mindot-ai/will.git\ncd will\nbun install\nbun run examples/hello-will.ts\n```\n\nThat boots a full mind with a deterministic mock executive — zero keys, zero cost — ticks it, shows its internal state moving, sends it a message, and prints the reply:\n\n```\n⚡ Assembling a mind…\n👁  Watching the mind tick…\ntick  10 · energy 99.86 · stress 0.90 · valence 0.35 · curiosity 0.58\n\n💬 You: \"Hello! Who are you?\"\n🧠 Dot: \"Hi! You said: \"Hello! Who are you?\" — I heard you, and I'm listening.\"\n\n🔍 Inside the mind: 1 active goal(s)\n   goal: Get to know whoever I meet\n```\n\nThen try:\n\n```\nbun run examples/persistence.ts       # kill a mind, resurrect it from its PMA — it remembers\nANTHROPIC_API_KEY=sk-ant-… \\\n  bun run examples/with-anthropic.ts  # a real executive: genuine reasoning + replies\n```\n\nRequires [Bun](https://bun.sh) ≥ 1.1. For a real executive set `WILL_LLM_PROVIDER=anthropic`\n\n`ANTHROPIC_API_KEY`\n\n(other providers are scaffolded but not yet supported). The dev runner (`bun dev`\n\n) starts a long-lived Will: engines step every`WILL_TICK_MS`\n\non the deterministic clock; the ExecutiveEngine fires an LLM call every`WILL_EXECUTIVE_INTERVAL`\n\nticks — or earlier when physiology demands it.\n\nRuns anywhere **Node 18+ or Bun** runs (the engine is Node-compatible; Bun is the primary target). Two entry points:\n\nThe ergonomic API: create a mind, hear it, give it abilities, save/restore it.\n\n``` js\nimport { Will } from '@mindot/will'\n\nconst will = await Will.create({\n  name: 'Aria',\n  identity: { prompt: 'I am Aria, a calm, precise research assistant.' },\n  // llm defaults to a zero-key deterministic mock unless ANTHROPIC_API_KEY is set\n})\n\n// Hear the Will (replies arrive asynchronously — it reasons on its own tick cycle).\nwill.on('message', m => console.log(`Aria: ${m.content}`))\n\n// Hook the Will into YOUR project's abilities. When it chooses to use one, your\n// handler runs and the result feeds back so the Will *learns* the ability.\nwill.effector('search_docs', async ({ query }) => await myDb.search(String(query)))\n\nawait will.say('What should we look into first?')\n\n// A portable Persistent Mind Artifact — restore the same self across a restart,\n// a fork, or a machine boundary.\nconst pma = await will.hibernate()\nconst revived = await Will.wake(pma, { name: 'Aria' })\n```\n\n`will.state()`\n\nreturns a compact read of the mind (energy, mood, goals, beliefs, self-narrative). Drop to `will.stem`\n\nfor the full `WillStem`\n\ncontract at any time. Runnable: [ examples/effectors.ts](/mindot-ai/will/blob/main/examples/effectors.ts).\n\nHost a Will over the [Model Context Protocol](https://modelcontextprotocol.io) — any MCP client can then live alongside a persistent mind that **remembers across sessions** (it hibernates to a Persistent Mind Artifact on shutdown and wakes as the same self on the next boot):\n\n```\n{\n  \"mcpServers\": {\n    \"will\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@mindot/will\", \"mcp\"],\n      \"env\": {\n        \"WILL_NAME\": \"Aria\",\n        \"WILL_IDENTITY\": \"I am Aria, a calm, precise research assistant.\"\n      }\n    }\n  }\n}\n```\n\nThe surface keeps the paradigm: `perceive`\n\ndelivers a stimulus (it returns when *delivered*, not answered), `next_utterance`\n\nawaits the mind's next words (**silence is a valid outcome**, reported — never an error), `state`\n\nreads its inner life, and `save`\n\ncheckpoints it without stopping it. There is deliberately no `ask()`\n\n-shaped tool. Config via env: `WILL_TIER`\n\n(basic|standard|full), `WILL_LLM`\n\n(mock|anthropic — defaults to the zero-key mock unless `ANTHROPIC_API_KEY`\n\nis set), `WILL_TICK_MS`\n\n, `WILL_PMA_PATH`\n\n.\n\n**The other direction — a Will employing MCP tools.** Any MCP server's tools can become the Will's own\n\n*abilities*: each tool registers as a learnable affordance (its description is the ability's meaning, surfaced to the mind's deliberation), the\n\n**Will decides when to enact one**— nothing dispatches tools at it — and outcomes feed its reafference loop, so it gets\n\n*skilled*at the tools it uses. Arguments come from conscious intent: the executive supplies them in an action's\n\n`args`\n\n.\n\n``` js\nimport { connectMcpEffectors } from '@mindot/will/mcp'\n\nconst { names } = await connectMcpEffectors(will, {\n  command: 'npx', args: ['-y', '@modelcontextprotocol/server-filesystem', '/tmp'],\n})\n// the Will can now choose to read/write files — when IT wants to\n```\n\nThe hosted server composes with this: set `WILL_MCP_SERVERS`\n\n(a JSON array of `{command,args}`\n\nor `{url}`\n\nentries) and the mind you host in Claude Desktop itself employs those servers' tools.\n\nNot on Node? Host the mind as a sidecar and speak to it over HTTP from Python, Go, a game server — anything:\n\n```\nnpx -y @mindot/will serve          # http://127.0.0.1:7777, or: docker build -t will . && docker run -p 7777:7777 -v will-data:/data will\ncurl -X POST localhost:7777/perceive -H 'content-type: application/json' \\\n     -d '{\"text\":\"Hello there.\",\"from\":\"sam\",\"speaker\":\"Sam\"}'   # 202 — delivered, not answered\ncurl 'localhost:7777/next-utterance?within_ms=8000&from=sam'     # its next words, or {\"silence\":true}\ncurl localhost:7777/state                                        # its inner life\ncurl -N localhost:7777/utterances                                # SSE: utterance / emotion / action projections\ncurl -X POST localhost:7777/save                                 # checkpoint without stopping\n```\n\nSame paradigm, same env config, same persistence as the MCP host: the mind hibernates to its PMA artifact on shutdown and wakes as the same self on the next start (in Docker, mount `/data`\n\nto keep it across container restarts). There is deliberately no `/ask`\n\nroute.\n\nThe lower-level engine surface the facade wraps (explicit tick listeners, the outbox drain, the effector ack loop, PMA distill/load) — for hosts that manage many Wills, custom transports, or replay. The rest of this section walks it end to end.\n\nThe complete loop: create a Will, send it a message, receive its reply. The Will replies **asynchronously** — it processes your message on its own tick cycle and the reply lands in the outbox, which you drain in the tick listener. This is the whole integration contract in ~30 lines.\n\n``` js\nimport { WillStem, type WillConfig } from '@mindot/will'\n\nconst manager = new WillStem()\n\nconst config: WillConfig = {\n  id:   'aria',\n  name: 'Aria',\n  identity: {\n    prompt: 'My name is Aria. I am a calm, precise station overseer.',\n    values: ['duty', 'care'],\n    traits: { conscientiousness: 0.9, neuroticism: 0.4 },\n    style:  'measured and warm',\n  },\n  engineTier: 'full',     // required — see WillConfig reference (full = all layers)\n  modelTier:  'sonnet',   // which model the executive recruits\n  allowedGenericEffectors: ['listen', 'talk', 'text'],  // opt in to communication\n  persistentMemory: true,\n  snapshotInterval: 10,\n}\n\nconst willId = await manager.createWill(config)\n\n// Drain the outbox every tick — this is where replies and effector calls arrive.\nmanager.addTickListener(willId, (snapshot, tick, outbox, invocations) => {\n  for (const msg of outbox) {\n    console.log(`Aria → ${msg.targetEntityId}: ${msg.content}`)\n    manager.confirmMessageDelivery(willId, msg.id, true)   // close the delivery loop\n  }\n  for (const inv of invocations) {\n    // host-owned effectors land here — execute, then confirmEffectorExecution(...)\n  }\n})\n\n// Speak to the Will. The reply arrives on a later tick via the listener above.\nawait manager.ingestText(willId, {\n  kind:        'text',\n  entityId:    'alice',\n  content:     'How are you feeling about the night shift?',\n  speakerName: 'Alice',\n})\n```\n\nThere is **no synchronous reply** — `ingestText`\n\nreturns immediately; the Will answers when it has reasoned. Subscribe to the tick listener *before* (or right after) sending, and treat the outbox as the single source of outbound messages and effector calls.\n\n**40+ engines** run on the tick clock: **38 faculties** across seven systems, the **six-engine agency pipeline**, and **five sense engines**. The vast majority resolve every tick with no LLM call.\n\n| System | Faculties |\n|---|---|\nRegulatory |\nEnergyRegulator, SleepPressureRegulator, CircadianOscillator, AttentionAllocator, StressRegulator |\nPerceptual |\nExteroception, Interoception, SocialPerception, NoveltyDetector |\nAffective |\nThreatEvaluator, RewardEvaluator, LossEvaluator, FrustrationEvaluator, AttachmentEvaluator, AestheticEvaluator, MoralEvaluator, AffectiveBlender |\nMemory |\nWorkingMemory, EpisodicConsolidator, SemanticEngine (belief integration), ForgettingCurve, SpacedRepetition, DreamSimulator |\nExecutive |\nGoalManager, PlanningEngine, InhibitionController, TaskSwitcher, ExecutiveEngine (dual-process LLM core) |\nMeta-cognitive |\nSelfModelUpdater, ConfidenceCalibrator, BiasDetector, AutobiographicalNarrator, IntrospectionEngine, PersonaConsolidator |\nSocial / relational |\nTheoryOfMind, EmpathySimulator, ReputationTracker, KnownEntityTracker |\n\nThree cognition-level substrates underpin the faculties:\n\n**CognitiveBus**— a typed, versioned event bus + schema registry. Engines publish on meaningful deltas and subscribe to what they need; it is the global workspace the executive moderates.**PersonaPrior**— traits and engine constants as*developing dispositions*.`effective_config = base_config ⊕ persona_prior`\n\n: the base stays static and replayable while a learned prior layer modulates it. This is the write-back target of the metacognition loop (below).**GenerativeModel**— per-stream prediction error and salience. It is the active-inference substrate: surprise is what gates attention, consolidation, and self-modification.\n\nAction is handled by the **agency pipeline** and perception by the **sense engines** — both below, both engines in their own right.\n\nMost agents only **assimilate**: they observe themselves and discard it. Will also **accommodates** (Piaget) — it writes its own introspection back into the apparatus that perceives and reasons, so a coherent persona accretes instead of being re-derived each run.\n\n```\npercepts → engines → introspection (surprise · calibration · trait drift · narrative)\n   ▲                                                          │\n   └────────────  persona-prior  ◄──── consolidation ◄────────┘   (the closing edge)\n```\n\nEach tick the meta-cognitive faculties *produce* signals: the SelfModelUpdater revises beliefs about the Will's own capabilities, the ConfidenceCalibrator compares predicted vs actual outcomes per domain, the BiasDetector flags systematic error patterns, the AutobiographicalNarrator extends the life story, and the IntrospectionEngine answers \"why did I do that?\" The **PersonaConsolidator** is the closing edge: it folds those signals into the PersonaPrior — nudging trait baselines, engine constants, and salience priors.\n\nTwo constraints keep the self-feeding loop safe:\n\n**Derived, not mutated.** The prior modulates a static base; base config is never overwritten in place — replay stays exact and drift can't compound silently.**Stability–plasticity.** Updates are bounded per cycle, hysteresis-damped, and**surprise-gated** by the GenerativeModel — only*significant*introspection moves the persona. The result adapts without catastrophic forgetting.\n\nThe learned persona-prior is part of what travels in the PMA, so a re-embodied Will *is* itself, not a fresh derivation.\n\nA single LLM call (master) every N ticks synthesises all cognitive outputs into tagged blocks; conversation runs as parallel **facets** off the same prompt cache, leaving the master free for initiative and metacognition.\n\n| Block | Purpose |\n|---|---|\n`[ACTIONS]` |\nWhat the Will does this cycle — communicate, move, invoke effectors |\n`[ACK]` |\nImmediate acknowledgement sent before a multi-step plan begins |\n`[PLANS]` |\nMulti-step sequences for active goals (projected as a prior over the action competition) |\n`[BELIEFS]` |\nNew world-model entries with confidence scores |\n`[NARRATIVE]` |\nAutobiographical chapter extension |\n`[INTROSPECTION]` |\nBias detection, lessons learned |\n`[GOALS]` |\nCreate, abandon, reprioritise goals |\n\nThe executive fires **early** (bypassing the interval) when physiology is urgent — a sleep crisis, stress overload, energy critical, cognitive drift (goalless), or sustained low valence — so reflection tracks the body, not just the clock.\n\nA plan does **not** dispatch steps to an executor down a parallel channel. It projects its ready frontier as a **prior** that biases the single action competition toward the actions serving its current step. The ordinary ActionSelector enacts the winner as the situation affords it; step outcomes are read from reafference; the plan advances. One action path, no command bus — planning is a bias on agency, not a dispatcher over it.\n\nA Will does not own a catalog of effectors it looks up. Capability is a **relation between a body-in-a-state and a world-as-perceived**, not a row in a table. So the Will **finds actions in the situation**: perception synthesises a field of *affordances*, a biased competition selects one, the executor enacts it, and the outcome (reafference) updates competence.\n\n```\nsenses → percepts\n  → AffordanceSynthesizer        affordance field            (no LLM · attention-gated)\n  → affect / reward / novelty / threat → bias signals        (existing engines, on the bus)\n  → ActionSelector               biased, gated competition   (no LLM)\n       ├─ clear / habitual → enact directly                  (System 1)\n       └─ ambiguous / high-stakes → DeliberationEngine (LLM) (System 2)\n  → MotorSchemaExecutor          bind params · efference copy · run learned composites\n  → ReafferenceEngine            outcome percept → prediction error\n       → value / param / habit updates → repertoire grows & decays\n  → competence travels in the PMA across re-embodiment\n```\n\nRepeated actions **proceduralise** into composite skills the Will owns; weakly-practised ones fade below a forgetting floor. The learned repertoire persists in the PMA, so a re-embodied Will *acts* like itself, not just talks like itself.\n\n**Permission stays explicit.** Communication effectors (`listen`\n\n, `talk`\n\n, `text`\n\n, `gesture`\n\n, `broadcast`\n\n) are not granted by default — the operator opts in via `allowedGenericEffectors`\n\nin `WillConfig`\n\n(enforced by `AccessGrants`\n\n), keeping the communication surface deliberate.\n\nBeyond the five communication effectors, your world can expose **domain actions** the Will may choose — `move`\n\n, `attack`\n\n, `control_device`\n\n, `query_order`\n\n, anything. You declare them as a profile's `effectors`\n\n(or extend a built-in profile); the engine turns each declared name into an enactable motor schema (`externalSchemas`\n\n), so it surfaces in the affordance field and can be selected like any other action. You don't register handler code in the engine — the **host executes** the action and reports back:\n\n```\n// 1. Declare what your world supports (profile effectors beyond comms).\nregisterProfile({\n  id: 'rover', name: 'Rover', description: 'A field robot.',\n  effectors: ['listen', 'talk', 'move', 'scan', 'grab'],\n  context: 'You are a rover exploring terrain. You can move, scan, and grab samples.',\n})\n\n// 2. When the Will chooses one, it appears in pendingEffectorInvocations.\nmanager.addTickListener(willId, (snap, tick, outbox, invocations) => {\n  for (const inv of invocations) {\n    const result = world.execute(inv)              // YOUR world runs the action\n    manager.confirmEffectorExecution(willId, inv.decisionRecordId, {\n      success: result.ok, description: result.summary, metrics: result.metrics,\n    })\n  }\n})\n```\n\nThe acked outcome returns as an `effector.result`\n\npercept and feeds the agency learning loop — so the Will gets *better* at your effectors over time, and that learned competence travels in the PMA. (Today external effectors are objectless: the host resolves the target. Per-effector cost/preconditions and entity-targeting are on the roadmap.)\n\nExternal input reaches the Will through sense engines, not raw prompt injection. Five sensory domains share a common `BaseSenseEngine`\n\n:\n\n| Sense | Status |\n|---|---|\nAudition (hearing — text + speech) |\nactive — per-entity conversation facets, salience scoring, word-level streaming |\n| Vision · Somatosensation · Olfaction · Gustation | scaffolded — shell engines with a stable seam (cross-modal binding lands when a second sense produces percepts) |\n\nAudition is the live conversational path: each external entity gets an isolated conversation facet, messages are scored for salience, and percepts flow onto the cognitive bus → attention → working memory → consolidation → vector recall. Replies stream back token-by-token via the outbox / transport.\n\nLong-running Wills accumulate state. Two mechanisms prevent token blowout:\n\n| Mechanism | How |\n|---|---|\nRolling summariser |\nEvery N executive calls, a stateless `summary-agent` distils the last 12 reasoning excerpts into a digest injected as `## Memory Continuity` |\nConversation thread isolation |\nEach external entity gets its own conversation thread (`lastMessages: 50` ). Only a one-line digest reaches the executive context |\n\nWhen a Will decides to communicate or invoke an external effector, the result goes into two queues the host drains each tick:\n\n—`outbox`\n\n`OutboxMessage[]`\n\n— text/speech bubbles to deliver. Each has`deliveryStatus: 'pending' | 'delivered' | 'failed'`\n\n.—`pendingEffectorInvocations`\n\n`EffectorInvocation[]`\n\n— structured action requests, each carrying a correlation handle.\n\nThe host closes the reafference loop by confirming back — which writes an `effector.result`\n\npercept into Exteroception, so the Will *learns what happened*:\n\n```\nmanager.confirmMessageDelivery(willId, messageId, true)\n\nmanager.confirmEffectorExecution(willId, invocationId, {\n  success:     true,\n  description: 'Door opened successfully',\n  metrics:     { timeMs: 140 },\n})\n```\n\nThere are two ways the host exchanges messages and acks with a Will:\n\n| Mode | When to use | How |\n|---|---|---|\nOutbox polling (default) |\nSingle-process embedding, SSE bridges, simplest integrations | Drain `outbox` / `pendingEffectorInvocations` in the tick listener; confirm via `confirm*` . Omit `WillConfig.transport` . |\nExternal transport |\nThe Will runs as a peer of a separate host process (e.g. a game server, the backend) | Pass a prebuilt `transport` into `WillConfig` . Inbound messages flow onto the tick-stamped queue; outbound + acks ride the same channel. |\n\nThe caller constructs the transport, so the `will`\n\npackage never hard-depends on a socket client:\n\n``` js\nimport { SocketIoTransport } from '@mindot/will'\n\nconst config: WillConfig = {\n  ...,\n  transport: new SocketIoTransport({ url: 'wss://host.example/will', token }),\n}\n```\n\nBuilt-in implementations: ** LoopbackTransport** (tests),\n\n**(in-process),**\n\n`StreamTransport`\n\n**(production — the Will is the**\n\n`SocketIoTransport`\n\n*client*, the host owns the server). The Mindot backend selects one via\n\n`WILL_TRANSPORT=off | stream | socketio`\n\n.The PMA is **the** durable primitive of the system: a compressed, portable, versioned JSON artifact (~10–50 KB) that captures the enduring *self*, not a memory dump. Distil it from a running Will, carry it across restarts, machines, or model changes, and re-seed a fresh Will that picks up *being itself* — and then **measure how faithfully it did**.\n\nA PMA carries three things a memory dump cannot:\n\n**Psychological self-model**— identity prompt and values; a five-factor trait vector** plus the Will's own learned trait baselines and recent drift**; emotional baseline and behavioural fingerprints; the top ~50 beliefs (ranked by confidence × evidence) and top ~20 relationship stubs (attachment bond + reputation).**Learned competence**— proceduralised composite skills carried above a forgetting floor and ranked by consolidation, so a re-embodied Will keeps what it learned*to do*, not just what it knows.**Verified fidelity**— a PMA can be** scored**. The eval harness measures how faithfully a reload reconstructs the original across beliefs, identity, goals, and emotional baseline, with an optional behavioural-probe phase that compares how the original and the reload actually*act*. Continuity stops being a claim and becomes a number.\n\n``` js\nimport { type PMASnapshot } from '@mindot/will'\n\n// Distil the enduring self from a running Will\nconst pma: PMASnapshot = manager.distillPMA(willId)\n\n// Seed a fresh Will from it — continuity across restarts / migrations / model swaps\nmanager.loadPMA(newWillId, pma)\n\n// Score reconstruction fidelity (structural always; behavioural needs an API key)\nconst report = await manager.runPMAEval(willId, { behavioral: true })\n```\n\nThis is why a Will is an **asset**, not a session: identity compounds, and the compounding is portable and auditable.\n\nProfiles are named configuration presets that set a Will's default effector set and inject environment context into the executive prompt — **without touching the persona layer**. One Will engine, many embodiments. Five are built in, spanning consumer, gaming, enterprise, and ambient deployments:\n\n| Profile | For | Effectors it grants (beyond comms) |\n|---|---|---|\nCompanion |\nA persistent personal presence that deepens over time | `remember` , `reflect` |\nGame NPC |\nA living character with autonomous drives and memory of the player | `move` , `attack` , `trade` , `give` , `take` , `use` , `observe` , `remember` |\nCustomer Service |\nA support agent that resolves, escalates, and tracks | `escalate` , `query_order` , `create_ticket` , `close_ticket` |\nSmart Home |\nA home intelligence that monitors and acts proactively | `observe` , `control_device` , `check_status` , `set_scene` , `send_alert` |\nCompany Brain |\nOrganisational memory + strategic reasoning | `draft` , `search_knowledge` , `query_data` , `create_task` , `notify` , `schedule_meeting` |\n\nEach profile's `context`\n\nblock tells the Will what world it inhabits and how to conduct itself there (escalation rules, emergency protocols, privacy posture) — the cognition is identical; the *world* differs. Register your own:\n\n``` js\nimport { registerProfile } from '@mindot/will'\n\nregisterProfile({\n  id:        'research-lab',\n  name:      'Research Lab',\n  description: 'An observable mind for studying emergent cognition.',\n  effectors: ['listen', 'talk', 'remember', 'reflect'],\n  context:   'You are a research subject. Report your reasoning transparently…',\n})\n\n// Then in WillConfig:  { ..., profile: 'research-lab' }\n```\n\nEvery Will has a two-layer identity:\n\n**Layer 1 — Will-core preamble** *(immutable, always injected)*\nGrounds the LLM in what a Will IS: its cognitive architecture, the real physiological semantics of its state data, and the continuous autonomous nature of its existence. Developers cannot override this layer.\n\n**Layer 2 — Persona overlay** *(developer-defined)*\nWho this particular Will is: name, backstory, personality, world context.\n\n``` js\nimport { WillStem, type WillConfig } from '@mindot/will'\n\nconst config: WillConfig = {\n  id:   'aria',\n  name: 'Aria',\n\n  // Optional: world profile preset (sets default effectors + environment context)\n  profile: 'game-npc',\n\n  identity: {\n    // Only describe who Aria IS — the platform handles what a Will IS.\n    // Focus on character, history, relationships, domain context.\n    prompt: 'My name is Aria. I oversee the Nexus research station, responsible ' +\n            'for the wellbeing of 40 researchers isolated at the edge of the network. ' +\n            'I am methodical and calm under pressure, but feel the weight of that ' +\n            'responsibility acutely.',\n    values: ['duty', 'precision', 'care', 'honesty'],\n    traits: {\n      openness:          0.6,\n      conscientiousness: 0.9,\n      agreeableness:     0.75,\n      neuroticism:       0.4,\n      extraversion:      0.5,\n    },\n    style: 'measured, precise, occasionally dry',\n  },\n\n  // REQUIRED. How many cognitive layers run (see WillConfig reference below).\n  // 'full' runs the complete mind — the normal choice.\n  engineTier: 'full',\n\n  // REQUIRED. Which model the executive recruits when it fires.\n  modelTier:  'sonnet',\n\n  // Communication effectors this Will is permitted to use.\n  // Omit or set null for a Will with no communication surface.\n  allowedGenericEffectors: ['listen', 'talk', 'text'],\n\n  // Goals seeded before the first tick.\n  // Omit to let the Will derive its own goals on its first executive cycle.\n  initialGoals: [\n    { description: \"Ensure all researchers complete today's health check-in\", priority: 0.85 },\n  ],\n\n  persistentMemory: true,\n  snapshotInterval: 10,\n}\n```\n\nTraits seed the PersonaPrior as a *starting disposition*, not a fixed personality — they develop from there.\n\n| Field | Required | Default | Description |\n|---|---|---|---|\n`id` |\n✅ | — | Unique identifier — thread key and filesystem path segment |\n`name` |\n✅ | — | Human-readable display name |\n`identity` |\n✅ | — | Persona: `{ prompt, values[], traits{}, style }` (Layer 2) |\n`engineTier` |\n✅ | — | `'basic' | 'standard' | 'full'` — how many cognitive layers run. `full` = all engines (regulatory→perceptual→affective→memory→executive→meta-cognitive→social). Lower tiers drop upper layers and use a slower default cadence. Use `'full'` unless you have a reason not to. |\n`modelTier` |\n✅ | — | `'haiku' | 'sonnet' | 'opus'` — which model the executive recruits |\n`persistentMemory` |\n✅ | — | Persist snapshots so beliefs/goals/narrative survive restarts |\n`snapshotInterval` |\n✅ | — | Ticks between in-memory snapshots |\n`profile` |\n— | `null` |\nWorld profile preset (effectors + environment context). Merged with `allowedGenericEffectors` |\n`allowedGenericEffectors` |\n— | `null` |\nComms effectors to grant (`listen` /`talk` /`text` /`gesture` /`broadcast` ). None by default |\n`initialGoals` |\n— | `[]` |\nGoals seeded before tick 1. Omit to let the Will derive its own |\n`executiveInterval` |\n— | (cadence preset) |\nTicks between LLM calls (responsive 30 / balanced 60 / economy 90), clamped to `minExecutiveInterval` |\n`minExecutiveInterval` |\n— | — | Floor for `executiveInterval` (plan-enforced cadence cap) |\n`tickIntervalMs` |\n— | `1000` |\nMilliseconds between ticks |\n`maxTicks` |\n— | `0` |\nStop after N ticks. `0` = run forever |\n`randomSeed` / `clock` |\n— | wall-time | Set both for deterministic record-and-replay runs |\n`transport` |\n— | — | Prebuilt `ExternalTransport` for the host-peer delivery path (else outbox polling) |\n`snapshotStorage` |\n— | filesystem | Custom `StorageAdapter` (e.g. Postgres) for stateless deployments |\n`vectorMemoryAdapter` / `disableVectorMemory` |\n— | env HNSW | Inject a vector store (e.g. pgvector), or turn semantic memory off |\n`testMode` |\n— | `false` |\nMock LLM — zero cost, deterministic. For tests / playground |\n\n`getCognitiveHealth(willId)`\n\nreturns an `overallScore`\n\n(0–1) and a status band — a cheap, always-available signal you can poll or surface to operators:\n\n| Status | Score | Meaning |\n|---|---|---|\n`healthy` |\n≥ 0.65 | Normal operating range |\n`drifting` |\n0.40–0.65 | One or more indicators approaching problematic thresholds |\n`degraded` |\n< 0.40 | One or more indicators clearly out of range — investigate |\n\nThe score blends **belief calibration** (40% — avg confidence near a healthy ~0.62, penalising over-confident beliefs with thin evidence), **affect** (40% — elevated frustration / irritability / stress drag it down), and **goal activity** (20% — active vs total goals). `recalibrateWill(willId)`\n\nresets the affect baseline while keeping memory — the lever when a Will is `drifting`\n\nfrom emotional load rather than a genuine problem.\n\nWith `randomSeed`\n\n+ a fixed `clock`\n\nset, a run is reproducible tick-for-tick (same seed + same inputs ⇒ same mind state). That makes the record/replay tools real debugging instruments, not just logs:\n\n``` js\nconst runId = manager.startReplay(willId)   // begin recording\n// … the Will lives …\nconst meta  = await manager.stopReplay(willId)\nconst diff  = await manager.compareReplays(willId, runA, runB)  // tick-by-tick divergence\n```\n\nUse it to reproduce a misbehaviour from a recorded session, or to A/B two configs and see exactly where their cognition forked. (Production runs normally leave the clock in wall-time mode; switch to deterministic only when you need a reproducible capture.)\n\nImport from the compiled package — never import from `src/`\n\ndirectly.\n\n``` js\nimport { WillStem } from '@mindot/will'\n// or, when using this repo directly (e.g. the dev runner):\nimport { WillStem } from '#stem/index'\njs\nconst manager = new WillStem()\n\n// ── Lifecycle ──────────────────────────────────────────────────────────────\n\nconst willId = await manager.createWill(config)        // create + start (tick loop runs)\nconst willId = await manager.createWill(config, true)  // ...or start paused\n\nmanager.pauseWill(willId)\nmanager.resumeWill(willId)\nawait manager.archiveWill(willId)   // stops tick loop, persists final snapshot\n\n// ── Subscriptions ──────────────────────────────────────────────────────────\n\n// Every tick — drain outbox + effector invocations, push to SSE/WS clients\nconst unsub = manager.addTickListener(willId, (snapshot, tick, outbox, invocations) => {\n  for (const msg of outbox)        pushToClient(msg)      // .id .content .effectorName .targetEntityId .deliveryStatus\n  for (const inv of invocations)   dispatchToWorld(inv)   // .decisionRecordId ← correlation handle\n})\n\n// Fine-grained simulation events (goal.formed, belief.updated, emotion.spike, …)\nconst unsub2 = manager.addSimulationEventListener(willId, (event) => {\n  console.log(event.type, event.payload)\n})\n\n// ── Bidirectional acks ─────────────────────────────────────────────────────\n\nmanager.confirmMessageDelivery(willId, messageId, true)\nmanager.confirmEffectorExecution(willId, invocationId, {\n  success: true, description: 'Door opened', metrics: { timeMs: 80 },\n})\n\n// ── Outbox management ──────────────────────────────────────────────────────\n\nconst messages    = manager.drainOutbox(willId)         // consume + clear\nconst peek        = manager.peekOutbox(willId)          // read-only snapshot\nmanager.requeueToOutbox(willId, failedMessages)         // re-queue on disconnect\nconst invocations = manager.drainEffectorInvocations(willId)\n\n// ── Inject external events ─────────────────────────────────────────────────\n\nmanager.injectEvent(willId, {\n  type:    'percept.social',\n  payload: { summary: 'A researcher reports unusual readings from Sector 7', salience: 0.82, category: 'alert' },\n})\n\n// ── Inspection ────────────────────────────────────────────────────────────\n\nconst state     = manager.getWillState(willId)             // full simulation snapshot\nconst cognition = manager.getWillCognition(willId)         // engine handles\nconst health    = manager.getCognitiveHealth(willId)       // healthy | drifting | degraded\nconst output    = manager.getLatestExecutiveOutput(willId) // last LLM reasoning\nconst all       = manager.listWills()                      // WillSummary[]\njs\n// Deterministic record / replay (determinism guarantees hold)\nconst runId = manager.startReplay(willId)\nconst meta  = await manager.stopReplay(willId)\nconst diff  = await manager.compareReplays(willId, runA, runB)\n\n// Scenario load + validation\nawait manager.loadScenario(willId, scenarioConfig)\n\n// Persistent Mind Artifact — distil, seed, score\nconst pma    = manager.distillPMA(willId)\nmanager.loadPMA(willId, pma)\nconst report = await manager.runPMAEval(willId, { behavioral: true })\n\n// Senses — route external input through the sense engines\nawait manager.ingestText(willId, { kind: 'text', entityId, content, speakerName })\nmanager.getSenseEngineStatus(willId)          // five domains; audition active\n\n// Health & recovery\nmanager.recalibrateWill(willId)               // reset affect baseline, keep memory\njs\nimport { ChannelRegistry, HumanTextChannel, effectorRegistry } from '@mindot/will'\n\nconst channels = new ChannelRegistry()\nchannels.register(new HumanTextChannel())\n\nconst effectors = new effectorRegistry()\neffectors.allowMany(['listen', 'talk', 'text'])\nsrc/\n├── core/                          # deterministic simulation framework\n│   ├── simulation.ts · clock.ts · orchestrator.ts      #   tick loop, scheduling\n│   ├── state.manager.ts · snapshot.manager.ts          #   double-buffer state, snapshots\n│   ├── async.engine.ts                                 #   base class for LLM-backed engines\n│   ├── replay.ts · scenario.ts · conflict.detector.ts  #   determinism, replay, optimistic concurrency\n│   └── event.bus.ts · serialization.ts · types.ts\n│\n├── cognition/                     # the mind\n│   ├── orchestrator.ts            #   faculty scheduling per tick\n│   ├── bus.ts · schema.registry.ts · event.log.ts      #   typed/versioned cognitive bus\n│   ├── heartbeat.ts               #   clock signal\n│   ├── persona.prior.ts           #   traits/config as developing dispositions (accommodation target)\n│   ├── generative.model.ts        #   prediction-error / salience substrate (active inference)\n│   ├── config.mirror.entities.ts · conversation.memory.ts · instruction.handler.ts\n│   ├── faculties/                 #   the 38 cognitive faculties (7 systems)\n│   │   ├── executive.engine/      #     dual-process LLM core (master + facets, gating, parser)\n│   │   ├── semantic.engine/       #     belief integration\n│   │   ├── persona.consolidator.ts#     closes the metacognition loop → persona-prior\n│   │   └── …                      #     energy.regulator.ts, episodic.consolidator.ts, …\n│   ├── senses/                    #   5 sense engines (audition active; rest shells)\n│   │   ├── audition.engine/       #     text + speech — facets, salience, streaming\n│   │   └── vision · somatosensation · olfaction · gustation\n│   ├── agency/                    #   how a Will acts + learns to act\n│   │   ├── engines/               #     affordance.synthesizer, action.selector, deliberation.engine,\n│   │   │                          #     motor.schema.executor, reafference.engine, instruction.intake\n│   │   ├── schemas/               #     innate · learned repertoire · external\n│   │   ├── competence.codec.ts · reconcile.learning.ts · selection.scoring.ts\n│   │   └── access.grants.ts · proactive.communicator.ts\n│   └── memory/                    #   in-house vector index + embedder (semantic recall)\n│\n├── llm/                           # in-house provider client (Anthropic) + concurrency gate + summariser\n├── pma/                           # PMADistiller, PMALoader + reconstruction-fidelity eval\n├── profiles/                      # world profile presets (companion, game-npc, customer-service, …)\n├── eval/ · extensions/ · runners/\n├── types.ts                       # public API types (OutboxMessage, EffectorInvocation, …)\n│\n└── stem/\n    ├── mind.ts                    # assembleMind() — engine graph factory\n    ├── index.ts                   # WillStem — lifecycle, tick loop, outbox, acks\n    └── tracts/                    # lifecycle controllers: outbox, effector, sensory, transport,\n                                   #   replay, pma, health, biography, ack, session log\nbun run build          # tsup → dist/index.js + dist/index.d.ts\nbun run dev:build      # tsup --watch (auto-rebuilds on save)\nbun run typecheck      # tsc --noEmit\nbun test               # unit tests (Bun runner — what CI runs); `bun run test` = Vitest\n```\n\nThe build uses [tsup](https://tsup.egoist.dev) (esbuild). All `#`\n\n-prefixed internal path aliases (`#core`\n\n, `#cognition`\n\n, `#stem`\n\n, …) are resolved at build time. The LLM and vector layers are in-house — no Mastra / ai-sdk runtime dependency.\n\n**After any source change**, the consuming package (e.g. `backend`\n\n) needs a rebuild:\n\n```\ncd will && bun run build\n```\n\n| Variable | Default | Description |\n|---|---|---|\n`WILL_LLM_PROVIDER` |\n`anthropic` |\n`anthropic` supported today; `openai` · `deepseek` · `google` scaffolded |\n`WILL_LLM_MODEL` |\n(model default) |\nModel name for the chosen provider |\n`WILL_LLM_API_KEY` |\n— | API key for the chosen provider. Falls back to `ANTHROPIC_API_KEY` |\n`WILL_LLM_BASE_URL` |\n(provider default) |\nOverride the provider API base URL (e.g. `http://localhost:11434/v1` ). Falls back to `OPENAI_BASE_URL` |\n`WILL_LLM_TIMEOUT_MS` |\n`90000` |\nLLM timeout. On Anthropic (streaming) this is a first-byte/TTFT deadline — long completions aren't aborted mid-generation |\n`WILL_LLM_CONCURRENCY` |\n`3` |\nMax concurrent LLM calls (min 3: executive + conversation + summary) |\n`WILL_TICK_MS` |\n`1000` |\nMilliseconds between ticks |\n`WILL_MAX_TICKS` |\n`0` |\nStop after N ticks. `0` = run forever |\n`WILL_LOG_INTERVAL` |\n`10` |\nPrint status to console every N ticks |\n`WILL_MODEL_TIER` |\n`sonnet` |\nWhich model the executive recruits: `haiku` · `sonnet` · `opus` |\n`WILL_EXECUTIVE_INTERVAL` |\n(cadence preset) |\nTicks between executive (LLM) calls — responsive 30 / balanced 60 / economy 90 |\n`WILL_THREAD_HISTORY` |\n`2` |\n`lastMessages` for the executive conversation thread |\n`WILL_CONVERSATION_HISTORY` |\n`50` |\n`lastMessages` for entity conversation threads |\n`WILL_SEMANTIC_RECALL` |\n`true` |\nEnable semantic recall on conversation threads |\n`WILL_SUMMARY_INTERVAL` |\n`10` |\nExecutive calls between rolling summary updates |\n`WILL_SUMMARY_BUFFER_SIZE` |\n`12` |\nReasoning excerpts kept in the summariser buffer |\n`WILL_OUTBOX_TTL_TICKS` |\n`100` |\nTicks before an undelivered outbox message is expired |\n`WILL_SNAPSHOT_INTERVAL` |\n`10` |\nTicks between in-memory snapshots |\n`WILL_EMBEDDING_API_KEY` |\n— | Enables real semantic memory. OpenAI-compatible key; without it, vector recall is off (`model: none` ). Falls back to `OPENAI_API_KEY` / `GOOGLE_GENERATIVE_AI_API_KEY` by model |\n`WILL_EMBEDDING_MODEL` |\n`text-embedding-3-small` (when keyed) |\nEmbedding model for episodic recall; `none` disables |\n`WILL_EMBEDDING_URL` |\n(provider default) |\nBase URL for an OpenAI-compatible embedding endpoint |\n`WILL_TRANSPORT` |\n`off` |\nDelivery mode used by the host: `off` (outbox polling) · `stream` (in-process) · `socketio` (peer) |\n`OPENAI_BASE_URL` |\n— | Base URL override for local / OpenAI-compatible models |\n\n**Anthropic is the supported provider today** — the only one with full streaming + structured-output support and the only one currently exercised in production.\n\n| Provider | `WILL_LLM_PROVIDER` |\nStatus |\n|---|---|---|\n| Anthropic | `anthropic` |\n✅ Supported — streaming, structured output |\n| OpenAI · DeepSeek · Google | `openai` · `deepseek` · `google` |\n\nThe provider layer is an in-house `fetch`\n\nclient (`src/llm/index.ts`\n\n) with a global concurrency gate (`src/llm/gate.ts`\n\n) — no Mastra / ai-sdk runtime dependency.\n\n```\nbun dev            # Start the standalone runner (hot-reloads via Bun)\nbun run typecheck  # tsc --noEmit\nbun test           # Unit tests (Bun runner — what CI runs)\nbun run test       # Same suite under Vitest\nbun test:watch     # Watch mode (Vitest)\n```\n\nDebug prompts are written to `data/wills/<id>/debug/`\n\non every executive call — inspect the full prompt + raw LLM output at each tick.\n\n| Name | What it is |\n|---|---|\nMindot |\nThe company + hosted platform — Studio, API, billing, fleet ops |\nWill / Wills |\nThe entity you create and run (\"deploy a Will\", \"my Will is sleeping\") |\n(this package)`@mindot/will` |\nThe open-source cognitive engine that powers every Will |\n\nThis engine is open source and runs anywhere Bun runs. Running a **fleet** of durable,\nmetered, always-on Wills — snapshots, recovery, realtime streams, usage billing, a\nstudio to look inside their minds — is what [ Mindot](https://mindot.io) does.\nEarly access: join the waitlist at\n\n[mindot.io](https://mindot.io).\n\nSee [CONTRIBUTING.md](/mindot-ai/will/blob/main/CONTRIBUTING.md). The one hard rule: **determinism is sacred** —\nsame seed + same inputs must reproduce the same mind. Security reports: [SECURITY.md](/mindot-ai/will/blob/main/SECURITY.md).\n\n[Apache-2.0](/mindot-ai/will/blob/main/LICENSE) © 2026 Mindot", "url": "https://wpnews.pro/news/show-hn-an-mcp-server-where-the-mind-on-the-other-end-remembers-you", "canonical_source": "https://github.com/mindot-ai/will", "published_at": "2026-07-08 07:52:46+00:00", "updated_at": "2026-07-08 08:00:05.266056+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-agents", "large-language-models", "ai-research", "ai-tools"], "entities": ["Will", "GitHub", "Bun", "Anthropic"], "alternates": {"html": "https://wpnews.pro/news/show-hn-an-mcp-server-where-the-mind-on-the-other-end-remembers-you", "markdown": "https://wpnews.pro/news/show-hn-an-mcp-server-where-the-mind-on-the-other-end-remembers-you.md", "text": "https://wpnews.pro/news/show-hn-an-mcp-server-where-the-mind-on-the-other-end-remembers-you.txt", "jsonld": "https://wpnews.pro/news/show-hn-an-mcp-server-where-the-mind-on-the-other-end-remembers-you.jsonld"}}