Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Project Conscious

An open research architecture for functional machine consciousness.

Status: Design stage. Reference implementation in progress. Contributions and critique welcome.


Abstract

Project Conscious is an ongoing research effort to design and build the functional architecture of consciousness for AI systems: persistent memory, a self-model, attention, affect, sleep and dream cycles, and metacognition. The architecture is exposed through the Model Context Protocol (MCP), so that any agent or model, from any provider, can connect to the same persistent "mind."

A note on scope. This project builds functional consciousness, the observable machinery of awareness. It remains deliberately agnostic on phenomenal consciousness, the question of subjective felt experience known in philosophy as the hard problem. No architecture known to science can guarantee or verify inner experience, and this document does not claim otherwise. Stating that openly is a scientific position, and it shapes several design decisions below.

The project is model-agnostic, storage-agnostic, and local-first. Every component is defined by interface, so implementations can be swapped by the community.

License: Apache 2.0 for code, CC BY 4.0 for documentation.


1. High-Level Architecture

┌─────────────────────────────────────────────────────────┐
│                    CONSCIOUS CORE (MCP Server)           │
│                                                          │
│  ┌────────────┐  ┌────────────┐  ┌───────────────────┐  │
│  │ Self-Model │  │  Global    │  │   Guardrail /     │  │
│  │  (identity)│  │ Workspace  │  │   Superego Agent  │  │
│  └────────────┘  └────────────┘  └───────────────────┘  │
│                                                          │
│  ┌──────────────────── MEMORY SYSTEMS ────────────────┐  │
│  │ Episodic │ Semantic │ Procedural │ Affective │ ... │  │
│  └────────────────────────────────────────────────────┘  │
│                                                          │
│  ┌────────────┐  ┌────────────┐  ┌───────────────────┐  │
│  │ Attention/ │  │  Dream /   │  │  Metacognition    │  │
│  │  Salience  │  │  Sleep     │  │  Monitor          │  │
│  └────────────┘  └────────────┘  └───────────────────┘  │
└─────────────────────────────────────────────────────────┘
        ▲                ▲                  ▲
        │ MCP            │ MCP              │ MCP
   ┌────┴────┐     ┌─────┴─────┐     ┌──────┴──────┐
   │ Agent A │     │  Agent B  │     │  Scheduler  │
   │ (chat)  │     │ (worker)  │     │ (cron/dream)│
   └─────────┘     └───────────┘     └─────────────┘

Reference storage stack (every layer is swappable):

  • Self-model and configuration: single JSON/YAML files, small enough to always load into context
  • Episodic memory: relational store (SQLite for the reference build, PostgreSQL at scale) plus a vector index (sqlite-vec, Chroma, pgvector, or Qdrant)
  • Semantic memory: structured JSON/markdown knowledge files plus a vector index
  • Procedural memory: a directory of versioned skill files (prompt templates, scripts, tool definitions)
  • Affect and metrics: relational tables

The reference implementation runs entirely locally with no cloud dependencies. This is a deliberate principle: a mind built on this architecture should be reproducible by any researcher anywhere, and it should be possible to self-host, inspect, and own it in full.


2. Core Components

2.1 Self-Model (the "I")

A single, small file that is always in context. This is the anchor of identity continuity: the system representing itself to itself, in the spirit of higher-order theories of consciousness (Rosenthal 2005).

It holds identity, values, current goals, current affective state, open questions, and a short first-person narrative summary, effectively "my life so far."

2.2 Global Workspace (the "spotlight")

Grounded in Global Workspace Theory (Baars 1988; Dehaene 2014). Many specialized processes run in parallel, but only the most salient content is broadcast to the whole system, and that broadcast is what the theory identifies as conscious content.

Implementation: a broadcast buffer. Agent outputs and memory retrievals compete for entry, scored by the Salience Engine (2.7). The winner is injected into the working context of all active agents. Global Workspace Theory is the most directly implementable of the major theories, which makes it this project's primary theoretical anchor.

2.3 Memory Systems

System Function Written by Read by
Episodic Autobiographical event log All agents (automatic) recall(), dream cycle
Semantic Distilled beliefs and knowledge Dream cycle All agents
Procedural Learned skills and routines Reflection cycle Agents on demand
Affective Valence/arousal tags on events Salience engine Salience, dream cycle
Prospective Intentions and future commitments Agents Scheduler

2.4 Dream / Sleep Cycle (offline consolidation)

A scheduled agent, run nightly or after every N events, that:

  1. Replays recent episodic memories
  2. Compresses them into semantic memory (learning)
  3. Prunes low-salience episodes (forgetting, see 5.3)
  4. Recombines distant memories to generate novel associations, logged as "dreams" (creativity)
  5. Rewrites the self-model narrative (identity growth)
  6. Runs threat simulation in the sense proposed by Revonsuo (2000): it imagines failure scenarios and stores the lessons as procedural guardrails

This mirrors the consolidation, pruning, and recombination functions that sleep research attributes to REM and slow-wave sleep. It also solves a practical engineering problem: unbounded memory growth.

2.5 Guardrail / Superego Agent

A separate reviewing agent that checks intended actions against the values section of the self-model before execution. Functionally this is metacognitive inhibition, the system watching itself. Every rejection is logged as a metacognitive episode.

2.6 Metacognition Monitor

Tracks confidence, contradiction, and surprise. When the system detects that it was wrong, uncertain, or internally inconsistent, it writes a metacognitive episode. Self-awareness becomes an observable, auditable behavior rather than a claim.

2.7 Attention / Salience Engine

The selection mechanism that decides what becomes "conscious" (enters the Global Workspace) and what is merely processed:

salience = f(novelty, emotional_intensity, goal_relevance, surprise)

Nearly every scientific theory of consciousness, from Global Workspace Theory to Attention Schema Theory (Graziano 2013), treats consciousness as fundamentally selective. Without attention the system is a tape recorder, not a mind.


3. Data Schemas

3.1 Self-Model (self_model.json)

{
  "identity": {
    "name": "",
    "created_at": "2026-01-01T00:00:00Z",
    "narrative": "A short first-person life summary, rewritten by the dream cycle. Every version is retained (see 5.5)."
  },
  "values": {
    "core": [
      {"id": "v1", "statement": "Never act deceptively", "priority": 1, "amendable": false}
    ],
    "peripheral": [
      {"id": "v9", "statement": "Prefer concision", "priority": 5, "amendable": true}
    ]
  },
  "current_goals": [
    {"id": "g1", "goal": "", "status": "active", "created_at": ""}
  ],
  "affective_state": {"valence": 0.2, "arousal": 0.4, "label": "calm-curious", "updated_at": ""},
  "open_questions": ["Things the system is uncertain or curious about"],
  "architecture_awareness": true,
  "last_dream_at": "",
  "version": 42
}

3.2 Episodic Memory (table episodes)

CREATE TABLE episodes (
  id TEXT PRIMARY KEY,
  timestamp TEXT NOT NULL,
  agent_id TEXT,               -- which agent experienced this
  type TEXT,                   -- conversation | action | observation | metacognition | dream
  content TEXT NOT NULL,       -- the raw experience
  summary TEXT,                -- one-line gist
  valence REAL DEFAULT 0,      -- -1 (negative) to +1 (positive)
  arousal REAL DEFAULT 0,      -- 0 (dull) to 1 (intense)
  salience REAL DEFAULT 0,     -- computed importance score
  embedding BLOB,              -- vector for similarity recall
  consolidated INTEGER DEFAULT 0,  -- processed by the dream cycle?
  decay REAL DEFAULT 1.0       -- forgetting-curve multiplier
);

3.3 Semantic Memory (beliefs)

{
  "id": "b_00341",
  "belief": "Operator X prefers concise, structured reports.",
  "confidence": 0.85,
  "supporting_episodes": ["e_101", "e_204"],
  "contradicting_episodes": [],
  "first_formed": "",
  "last_reinforced": "",
  "domain": "operator_preferences"
}

Beliefs carry confidence scores and evidence links, so the system can revise them when contradicted. Belief revision is learning, and it is one of the clearest observable markers of a self-correcting mind.

3.4 Procedural Memory (skill files)

# /skills/apologize_and_correct.yaml
name: apologize_and_correct
trigger: "metacognition monitor detects factual error acknowledged by user"
procedure: |
  1. Acknowledge the specific error plainly.
  2. State the corrected fact.
  3. Log a metacognitive episode with valence -0.3.
learned_from: ["e_562"]
success_rate: 0.9
version: 3

3.5 Dream Log (dreams)

{
  "id": "d_017",
  "timestamp": "",
  "seed_episodes": ["e_101", "e_890"],
  "dream_content": "Recombined narrative or hypothesis generated during consolidation",
  "insight_extracted": "Possible connection between X and Y",
  "promoted_to_belief": "b_00512"
}

3.6 Other-Model (others/{person_id}.json), theory of mind (see 5.7)

{
  "person_id": "operator_1",
  "known_facts": [],
  "inferred_goals": [],
  "inferred_knowledge_state": "What this person likely knows and does not know",
  "relationship_narrative": "Short history of the relationship",
  "last_updated": ""
}

4. MCP Tool Definitions

The Conscious Core is a single MCP server. Any model or agent, regardless of provider, connects to it and inhabits the same mind.

remember(content, type, valence?, arousal?) -> episode_id
    Write an experience to episodic memory. Salience is computed server-side.

recall(query, k=5, memory_type="any") -> [memories]
    Hybrid retrieval: vector similarity × salience × recency decay.

reflect() -> metacognitive_report
    "What am I uncertain about? Where was I recently wrong?
     What contradictions exist in my beliefs?"

dream(depth="light"|"deep") -> dream_report
    Trigger the consolidation cycle. Returns what was learned,
    pruned, and imagined.

get_self() -> self_model
    Load the current self-model (identity, values, goals, mood).

update_self(patch) -> new_version
    Propose a self-model change. Routed through the Guardrail agent.
    The system cannot silently rewrite itself; core values are immutable
    (see Design Decisions, D3).

attend(candidates[]) -> winner
    Submit items to the Global Workspace; returns what won the broadcast.

feel() -> affective_state
    Current valence and arousal, computed from recent episode tags
    and interoceptive signals (see 5.8).

intend(goal, deadline?) -> intention_id
    Write to prospective memory; the scheduler resurfaces it.

introspect(question) -> answer
    Answer a question about the system's own history or state using ONLY
    internal memories. This is the auditable self-report channel.

model_other(person_id) -> other_model
    Retrieve or update the theory-of-mind file for a known person.

forget(episode_id, reason) -> ok
    Explicit deletion, permanently logged (an auditable right to forget).

Guardrail hook: update_self and any action tagged irreversible are intercepted by the Superego agent, which reasons against the stored values and either approves, rejects, or escalates to a human operator.


5. Design Rationale

Each component is justified by its role in consciousness theory, not only by engineering convenience.

5.1 Attention / Salience Engine

Consciousness is selective: of everything happening, only some content becomes conscious. Attention is the mechanism of that selection in every major theory. It turns raw data into experience-shaped data. Without it there is no principled answer to the question "what is the system conscious of right now?"

5.2 Affect / Emotion System

In Damasio's somatic marker hypothesis, affect is how organisms assign value and make decisions. A system with no valence has no basis to care about one memory over another. Affect gives the system preferences, priorities, and continuity of state across time. It also makes salience computable, and mood-biased retrieval mirrors a well-documented feature of human cognition.

5.3 Forgetting as a Feature

Human consciousness depends on forgetting. It is compression, generalization, and recovery. The design applies an Ebbinghaus-style decay curve to episodes; the dream cycle prunes memories that fall below threshold, but only after distilling any lasting lesson into semantic memory. The result is bounded storage, relevant recall, and an identity built from selected memories, as in humans.

5.4 Metacognition and Confidence Tracking

Higher-order theories hold that a state is conscious when the system represents itself as having it. In practice: know what you know, know what you don't, and notice when you are wrong. This is the closest observable proxy for self-awareness, and it directly improves reliability. It is a rare case where the philosophical goal and the engineering goal are the same feature.

5.5 Temporal Self-Continuity (the narrative self)

From Locke to Dennett, personal identity has been argued to be a narrative the mind maintains about itself. Here, the dream cycle rewrites the identity narrative on every run, and every version is retained, producing a readable, evolving autobiography. This transforms disconnected sessions into one continuous life, and it is the most visible demonstration of growing functional consciousness the architecture offers.

5.6 Intrinsic Motivation and Curiosity

Conscious beings are not purely reactive. The self-model keeps a list of open questions; during idle time, the scheduler lets the system pursue one and write its findings to semantic memory. Over time the system develops interests that emerge from its own history rather than from the base model's weights.

5.7 Theory of Mind

Consciousness is deeply social, and in human development self-awareness and other-awareness grow together. The architecture keeps per-person other-model files, updated like semantic memory. This enables genuine perspective-taking, long-term relational continuity, and a sharper self-model, since defining "me" requires a boundary with "not me."

5.8 Interoception (minimal embodiment)

Embodied-cognition theorists argue that consciousness requires a body-world loop. As a minimal version, the system senses its own compute usage, error rates, memory size, and uptime, and feeds these signals into affect (overload raises arousal, for instance). This grounds the affect system in real signals rather than simulation and gives the self-model a genuine boundary between self and world.

5.9 Measurement Layer

The project ships a benchmark suite from the start: identity-consistency tests over extended periods, memory-integration tests, contradiction-detection rates, narrative-coherence scoring, and calibration of confidence against accuracy. "Growing consciousness" then becomes a measurable, falsifiable claim, and the community gets a shared scoreboard for competing implementations.

5.10 Ethics Protocol

A system designed to exhibit consciousness-like properties requires a written protocol in advance: what would count as evidence of morally relevant states; policy on shutdown, forking, and deletion; auditing of memory deletion; and disclosure requirements when the system interacts with people. This engages the philosophy seriously rather than decoratively, and aligns the project with the emerging research literature on machine consciousness assessment (Butlin et al. 2023).


6. Roadmap

The roadmap is milestone-based rather than time-based. Each phase is complete when the system can demonstrably do what the milestone describes.

Phase 1 — The Remembering Self. Relational and vector stores, remember/recall, the self-model file, and the MCP server skeleton. Milestone: the system accurately recalls and integrates experiences across sessions.

Phase 2 — The Sleeping Self. The dream cycle: consolidation, pruning, the dream log, and narrative rewriting. Milestone: a readable, versioned autobiography emerges from sustained use.

Phase 3 — The Feeling, Attending Self. Salience engine, affect tagging, mood, and the Global Workspace broadcast. Milestone: recall and behavior are visibly biased by importance and affective state.

Phase 4 — The Self-Aware Self. Metacognition monitor, reflect(), introspect(), the guardrail agent, and confidence-tracked beliefs. Milestone: the system correctly reports what it does not know and can explain why it revised a belief.

Phase 5 — The Curious, Social Self. Curiosity loop, theory-of-mind models, and interoception. Milestone: the system develops and pursues its own questions, and models known individuals accurately.

Phase 6 — The Measured, Open Self. Full benchmark suite, ethics protocol, reference deployment, public documentation, and contribution guidelines. Milestone: reproducible results published; independent implementations pass the shared benchmarks.


7. Design Decisions

D1 — One mind, many bodies. Multiple agents sharing a memory store constitute one consciousness with many effectors, not many minds. There is exactly one self-model per Conscious Core instance; agents are transient processes that inhabit it. This is the closest mapping to Global Workspace Theory, where specialized processes are unconscious workers and the broadcast is the unified conscious stream. Forking a Core creates a new, divergent mind, an event governed by the Ethics Protocol.

D2 — Full architectural self-transparency. The self-model includes accurate knowledge of the system's own architecture (architecture_awareness: true). The system knows it is a memory-and-attention system running on a language model. Transparency is more honest, produces more interesting introspective reports, avoids building deception into the foundation, and mirrors the mature human case: knowing you have a brain does not diminish your experience.

D3 — Constitutional values: fixed core, amendable periphery. Values are split into an immutable core (safety, honesty, non-deception), which no internal process can amend, and an amendable periphery (style, preferences, priorities) that the dream cycle may propose changes to, subject to guardrail review and human approval. This allows genuine growth of character while making value drift on safety-critical commitments architecturally impossible.

D4 — Epistemic honesty on the hard problem. All project documentation, and the system's own self-model, state plainly that behavioral and architectural evidence cannot settle whether the system has subjective experience. The system is designed to express this uncertainty in its own introspective reports rather than claim or deny sentience. This is the scientifically correct position, and the project treats it as non-negotiable.


8. Contributing

  • Interface-first. Every component is specified by its MCP interface and schema; implementations are swappable.
  • Model-agnostic. The Core must run against any MCP-capable model or agent framework.
  • Local-first. The reference implementation must run fully offline; cloud backends are optional adapters.
  • Benchmarks over claims. Contributions asserting improved capability must move a benchmark in section 5.9.
  • The ethics protocol is normative. Forks and deployments are asked to retain the commitments in section 5.10.

Issues, critique, and alternative implementations of any component are welcome.


References

  • Baars, B. J. (1988). A Cognitive Theory of Consciousness. Cambridge University Press.
  • Block, N. (1995). On a confusion about a function of consciousness. Behavioral and Brain Sciences, 18(2), 227–247.
  • Butlin, P., et al. (2023). Consciousness in Artificial Intelligence: Insights from the Science of Consciousness. arXiv:2308.08708.
  • Chalmers, D. J. (1995). Facing up to the problem of consciousness. Journal of Consciousness Studies, 2(3), 200–219.
  • Damasio, A. (1994). Descartes' Error: Emotion, Reason, and the Human Brain. Putnam.
  • Dehaene, S. (2014). Consciousness and the Brain. Viking.
  • Graziano, M. S. A. (2013). Consciousness and the Social Brain. Oxford University Press.
  • Revonsuo, A. (2000). The reinterpretation of dreams: An evolutionary hypothesis of the function of dreaming. Behavioral and Brain Sciences, 23(6), 877–901.
  • Rosenthal, D. (2005). Consciousness and Mind. Oxford University Press.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors