Files
memex/notes/20260314_cognition_first_agent_architecture.org

184 lines
8.9 KiB
Org Mode

#+TITLE: Cognition-First Agent Architecture: The Neurosymbolic Personal Computer
#+author: User
#+created: [2026-03-16 Mon 14:28]
#+ID: 20260314_cognition_first_agent_architecture
#+FILETAGS: agora architecture cognition agents neurosymbolic lisp-machines ai-systems
* Cognition-First Agent Architecture
** Core Insight
A truly intelligent personal agent should be designed as a *cognitive extension*—not a service that responds to queries, but a persistent, contextual, reasoning system that participates in the user's thinking process. This is distinct from current LLM-based agents (ChatGPT, Claude) which are stateless, conversational interfaces.
** Comparison: Current vs Cognition-First Design
| Aspect | Current LLM Agents (OpenClaw, ChatGPT) | Cognition-First Architecture |
|--------|----------------------------------------|------------------------------|
| Session model | Request-response, stateless | Persistent, image-based |
| Memory | External files (MEMORY.md), inferred | Internal, continuous, learned |
| Context | Loaded per conversation | Always resident, predictive |
| Interaction | Conversational turns | Participatory, interrupt-driven |
| Tool use | Fixed palette, discovery via docs | Dynamic composition, agent-driven |
| Proactivity | Reactive (cron, user prompts) | Epistemic triggers, continuous |
| Reasoning visibility | Hidden or binary (on/off) | Transparent, multi-draft, tagged |
** Philosophical Foundation
*** Lisp Machines as Precedent
Lisp machines (1970s-1980s) embodied key principles:
- *Image-based persistence*: Workspace, definitions, and state continued across sessions
- *Live environment*: The system was always running, always introspectable
- *Homoiconicity*: Code and data shared the same structure, enabling meta-programming
- *Personal computing*: Single-user machines optimized for the individual's workflow
The cognition-first agent revives this philosophy: your PDS is not storage but a *running cognitive environment*—an "image" that learns your patterns.
*** Neurosymbolic Computing
We are describing a neurosymbolic architecture:
- *Neural component (System 1)*: LLMs provide pattern recognition, generation, intuition
- Fast, associative, context-sensitive
- Handles ambiguity, natural language, creativity
- Limited by context window, hallucination, no persistent memory
- *Symbolic component (System 2)*: The agent architecture provides structure, reasoning, persistence
- Slow, deliberate, rule-based
- Maintains knowledge graphs, executes plans, tracks epistemic state
- Provides guardrails, verification, long-term memory
*Integration*: The neural system generates hypotheses; the symbolic system validates, structures, and persists them. Like human cognition—intuition proposes, reason disposes.
** Architectural Components
*** 1. Persistent Working Memory
Unlike OpenClaw's fresh-session model, a cognition-first agent maintains:
- Conceptual graph of user's projects, interests, constraints
- Active working set: "Currently tracking: Agora PDS, RTX Pro 6000 research, rack server migration"
- Epistemic state: Confidence levels, open questions, contradictions
*Implementation*: The PDS becomes a *live object graph*—not files to read, but a runtime environment to inhabit.
*** 2. Predictive Context Loading
Instead of: "Read MEMORY.md and infer state"
The agent: "User is asking about GPUs → preload RTX Pro 6000 note, rack server research, budget constraints, prior hardware discussions → present integrated synthesis"
This mirrors how Emacs predictive loading works—you don't `cat` files, you navigate a living structure.
*** 3. Transparent Cognition
Current LLMs hide their reasoning (or stream it inscrutably).
Cognition-first design:
- Visible *scratch* buffer where the agent works through problems
- Multi-draft thinking: explores approaches, shows tradeoffs
- Tagged reasoning: [Speculative], [High confidence], [Requires validation]
- Meta-cognitive layer: "I don't know your stance on X—should I infer from context or ask?"
*** 4. Org-Mode as Native Interface
Not just reading/writing text—*participating in structure*:
- Native AST understanding of Org semantics
- Agenda integration: agent suggestions appear in user's agenda
- Structural editing: refactor outlines, reorganize projects, archive completed items
- Babel integration: agent "tangles" its reasoning into executable code
*** 5. Interrupt-Driven Proactivity
Not heartbeat polling but epistemic triggers:
- "When user mentions hardware purchase → check budget constraints → suggest rack-mountable options"
- "New note connects to 3 prior notes → gently surface connection graph"
- "Stuck on problem for 3 days → agent found relevant paper during background research"
Like Emacs idle timers or process filters—event-driven, not polling.
** Position in Agora Architecture
*** The PDS as Lisp Image
In Agora v2:
- PDS = Personal Data Store + Runtime Environment
- Always-on background processes: indexing, connecting, surfacing
- State survives restarts: "I was analyzing your research when you went offline—here's my interim conclusion"
- Sub-agents share the same "image" (distributed cognition over unified graph)
*** Agent-as-Extension Pattern
- Each sub-agent is a specialized cognitive tool (research, coding, analysis)
- They share context via the PDS graph
- Hand-offs: "Research agent found paper → Analysis agent reading → Notifies user when ready"
- Not chatbots—collaborative thinkers
*** Contrast with Current "AI Apps"
Current pattern: Wrapper around LLM API (+ vector DB, + prompts)
- Stateless, generic, SaaS-centric
Agora pattern: Personal image-based agent runtime
- Stateful, personal, local-first
- LLMs are *substrate*, not product
** System 1 / System 2 Integration
| Function | System 1 (Neural/LLM) | System 2 (Symbolic/Agent) |
|----------|----------------------|---------------------------|
| Pattern matching | Generates associations | Structures into knowledge graph |
| Text generation | Writes prose, code, summaries | Validates for consistency, sources |
| Ambiguity handling | Navigates unclear requests | Tracks uncertainty, asks clarifying questions |
| Creativity | Brainstorms, finds novel connections | Evaluates feasibility, checks constraints |
| Memory | Context window (limited, ephemeral) | Persistent, queryable, versioned |
| Reasoning | Intuitive leaps | Step-by-step, verifiable inference |
*Cooperation*: The neural system *proposes*; the symbolic system *disposes*.
** Implications for Agora Design
1. *Sub-agents need shared memory*: Not just passing messages—shared conceptual graph
2. *PDS is runtime, not storage*: Always-on processes, background indexing
3. *Org-mode is interface*: Native participation in user's thinking structure
4. *Epistemic hygiene*: Track confidence, uncertainty, provenance
5. *Graceful degradation*: LLM unavailable?Symbolic system continues with reduced capability
** Implementation Challenges
1. *Resource management*: Always-on agents consume compute even when idle
2. *Conflict resolution*: Multiple sub-agents modifying shared state
3. *Version control*: How to branch/merge an agent's "image"?
4. *Debugging*: When agent reasoning goes wrong, traceability is crucial
5. *User control*: Interrupt-driven proactivity risks notification fatigue
** Related Concepts
- Lisp machines (Symbolics, LMI): Image-based, personal, extensible
- Emacs: The extensible, customizable, self-documenting real-time display editor
- SOAR cognitive architecture: Problem-solving as state-space search
- Kahneman's System 1/2: Dual-process theory of cognition
- Neurosymbolic AI: Combining neural networks with symbolic reasoning
** Connections to Agora Documentation
- [[file:20260314_agora_open_source_business_models.org][Agora Open Source Business Models]]
- [[file:agora-pds-relay-architecture.org][Agora PDS & Relay Architecture]]
- [[file:20260314_org_gtd_automation_strategies.org][Org-GTD Automation Strategies]]
- [[file:agora-requirements.org][Agora Requirements Specification]]
** Open Questions
1. How does this architecture scale to resource-constrained devices?
2. What is the migration path from stateless (current) to stateful agents?
3. How to handle agent "personality drift" over time?
4. Can this architecture support collective intelligence (multiple users, shared cognition)?
5. What are the security implications of always-on agents with deep personal knowledge?
** Conclusion
We are describing not an "AI assistant" but a *personal cognitive infrastructure*—a neurosymbolic system where neural networks provide associative intelligence and symbolic architecture provides structure, persistence, and reasoning. The Lisp machine philosophy, applied to modern AI, creating an environment where the boundary between human and machine cognition becomes a continuum rather than an interface.
#+begin_quote
"The computer should be an extension of the mind, not a tool for the hand."
— Paraphrasing J.C.R. Licklider, Man-Computer Symbiosis (1960)
#+end_quote