Everyone Is Building Agents That Think When You Ask. I Built One That Thinks When You Don't.
Here's a question nobody in the AI agent space is asking: what happens to your knowledge base when nobody's talking to it?
Right now, the answer for everyone is the same. Nothing. It sits there. A vector database full of embeddings, waiting for a query. Maybe a scheduled job re-indexes it. Maybe a cron runs a dedup script. But the knowledge itself? It's inert.
I just shipped something different. A daemon — a persistent background process — that picks up memories from my RAG system, reasons about them through a local LLM, decides when a thought is complete, and writes the insights back. Twenty-four hours a day. No human in the loop. No prompt required.
I'm calling it the Cogitation Daemon, and I think it solves a problem the industry hasn't named yet.
The Problem Nobody's Named
The AI agent ecosystem in 2026 is focused on two things: making agents smarter when they respond, and giving them better memory so they can respond with context.
Both of those assume the same model: a human asks, an agent answers.
OpenAI's o-series reasoning models generate internal "reasoning tokens" to think harder before responding. Anthropic is building agents that can execute multi-day projects. Letta (formerly MemGPT) pioneered self-editing memory where agents curate what they remember during conversations. Mem0, Zep, and Cognee are building memory infrastructure for agents. Stanford's Generative Agents paper demonstrated a reflection mechanism that synthesizes memories into higher-order insights.
Every one of these is reactive. They think when triggered.
But humans don't work that way. You don't stop thinking about a problem when the conversation ends. Ideas consolidate while you're doing dishes. Connections form during your commute. Sleep research shows that memory consolidation — the process of strengthening and integrating memories — happens specifically when you're not actively using them.
Why would we build AI systems that only think on demand?
What I Built
The Cogitation Daemon runs as a systemd service on a Linux machine with a 4-billion parameter model (Qwen3-4B). It costs nothing per cycle beyond electricity. Here's what it does every two seconds:
1. It decides what to think about.
Not randomly. I integrated ACT-R activation scoring — a mathematical model from cognitive science that predicts which memories are most "available" to a human mind at any given moment. The formula weighs seven signals: base activation (how often a memory has been accessed), recency (power-law decay), novelty (how different this memory is from what was just processed), staleness (time since last review using spaced-repetition math), importance (LLM-rated), goal relevance (cosine similarity to a current cognitive goal), and incompleteness (has this thought been finished?).
Each memory gets a composite score. The daemon selects the next one via softmax sampling — mostly picking the highest-scored candidates, but with enough randomness to avoid getting stuck.
2. It reasons in a compressed protocol.
I designed a compression format called CogLang that reduces each reasoning cycle from ~1,300 tokens to ~320. That's 75% token reduction, which means 4x throughput on the same hardware. The model receives a compressed input block — variable ID, taxonomy tag, activation score, context, previous thought, current goal — and outputs a structured response: insight, confidence, next action, related memories, importance, and a completion flag.
This isn't a gimmick. At 320 tokens per cycle, the daemon completes a reasoning iteration in under 10 seconds on consumer hardware. With multi-iteration thoughts averaging 2-3 passes, that's roughly 150-200 completed thoughts per hour — continuously, autonomously, at zero API cost.
3. It knows when a thought is done.
This is the part that took the most iteration. The daemon evaluates thought completion using five weighted signals:
- Semantic stability (30%): Are the output embeddings converging? If the last two iterations said essentially the same thing, the thought is stabilizing.
- Self-assessment (25%): The model's own confidence and completion flag.
- Retrieval novelty (20%): Did new related memories surface? If not, the topic is exhausted.
- Information gain (15%): Is each iteration adding less new content? Diminishing returns detection.
- Iteration count (10%): Pure diminishing returns curve — each additional iteration is worth less.
When the weighted sum crosses 0.75, the thought is marked complete. If it hits 5 iterations without converging, it's deferred. This prevents the system from both giving up too early and grinding on a dead end.
4. It escalates when it needs to.
Not every memory deserves the same compute. The daemon uses a four-tier escalation model:
- Tier 1 (~90% of cycles): Qwen3-4B, fast mode. Routine reasoning.
- Tier 1.5 (~8%): Same model, deep thinking mode. For uncertain or complex topics.
- Tier 2 (~1.5%): A co-resident 14B model. Multi-step hard problems.
- Tier 3 (~0.5%): Cloud API calls to frontier models. Reserved for the genuinely difficult.
The confidence signal from each cycle drives escalation. Low confidence triggers deeper thinking, automatically. This means the daemon spends its cheapest compute on the easy stuff and reserves expensive reasoning for what actually needs it.
5. It reflects.
Borrowed from Stanford's Generative Agents, but productionized. When the accumulated importance of completed thoughts crosses a threshold, the daemon triggers a reflection cycle — it synthesizes multiple completed thoughts into a higher-order insight and stores it as a new, high-importance memory. These reflections then participate in future selection, creating a compounding loop of deeper understanding.
How This Differs From Everything Else
I've been reading the papers and using the tools. Here's where this sits:
Letta/MemGPT is the closest conceptual relative. They pioneered agents that manage their own memory. But Letta agents only think during active sessions. When the conversation ends, memory curation stops. The Cogitation Daemon runs when nobody's talking.
Stanford's Generative Agents demonstrated the reflection mechanism I borrowed from. But the Smallville demo was a research prototype with 25 agents in a sandbox. It wasn't designed to run as a production daemon against a real knowledge base with 15,000+ memory points.
LLM-ACTR out of Penn State and Bosch is doing rigorous work on embedding ACT-R decision traces into LLM adapter layers. But it's one-directional — ACT-R informs the LLM. My system is bidirectional: ACT-R scoring selects memories, the LLM reasons about them, and the results update the ACT-R activation values. The loop closes.
The ICLR 2026 MemAgents workshop is explicitly calling for cognitive-science-inspired memory substrates for LLM agents. The limiting factor, they write, "is increasingly not raw model capability but memory: how agents encode, retain, retrieve, and consolidate experience." That's the exact problem I'm solving — except I'm not writing a proposal, I'm running the daemon.
Reasoning models like OpenAI's o-series think harder when asked. They don't think at all when idle. My system's entire purpose is the idle state.
What This Doesn't Do
I want to be specific about the limitations, because overclaiming is the default in this space.
The insights aren't always good. A 4B parameter model reasoning about a memory fragment doesn't always produce something useful. The completion detection helps — it won't mark garbage as complete — but the quality ceiling is set by the model. Tier escalation helps for hard problems, but ~90% of cycles run on the smallest model.
It's not general-purpose. This daemon is built for my specific RAG system, my specific memory taxonomy (QX-1), my specific infrastructure. The architecture is portable, but you'd need to adapt the scoring, the taxonomy mapping, and the embedding pipeline.
There's no human feedback loop yet. The daemon writes insights back, but I don't have a mechanism for reviewing and validating what it produces. That's the next piece.
Scale is unknown. This runs against ~15,000 memory points on a single consumer GPU. I don't know what happens at 100K or 1M points. The selection algorithm should scale — ACT-R scoring is O(n) on the candidate pool — but I haven't tested it.
Why It Matters
The ICLR workshop organizers are right: the limiting factor for AI agents isn't model capability. It's memory architecture. But I'd go further: the limiting factor is that nobody's memory architecture does anything when nobody's looking.
Every knowledge base I've seen — Notion, Obsidian, corporate wikis, RAG systems — is a filing cabinet. You put things in. You search for them later. The connections between documents are either manually maintained or discovered at query time.
The Cogitation Daemon turns the filing cabinet into something that reads its own contents, draws its own connections, and generates its own insights. Not when you ask. Continuously.
If the industry is building agents that think when prompted, I'm asking: what if the thinking never stops?
Corey Ryan builds AI infrastructure that works when he's not watching. He writes about the parts that matter.
References
- Park, J.S., et al. (2023). Generative Agents: Interactive Simulacra of Human Behavior. ACM UIST 2023.
- Wu, S., et al. (2025). Cognitive LLMs: Integrating Cognitive Architectures and Large Language Models for Manufacturing Decision-Making. SAGE Journals.
- ICLR 2026 Workshop: MemAgents — Memory for LLM-Based Agentic Systems. OpenReview.
- Letta (MemGPT) — Building Stateful Agents with Advanced Memory. Letta Blog.
- AI Reasoning Models 2026: From OpenAI o3 to DeepSeek-R1 and the Test-Time Compute Revolution. Zylos Research.
- Comparison of AI Agent Memory Systems in 2026: Mem0 vs Zep vs Letta vs Cognee. n1n.ai.
- ACT-R: A Cognitive Architecture for Modeling Cognition. Carnegie Mellon University.