Golem XIV
Coming soon to golem14.ai
Golem XIV is a metacognitive AI harness, autonomously performing knowledge work — producing code, documents, designs and data by reasoning over a persistent knowledge graph memory, while integrating private and public information sources.
The memory holds not only the facts Golem has learned, but also its own cognition: what it intended, what got done, and who said what. So it can think about its own thinking from the past, and carry a task far beyond a single context window.
What follows is the talk from the video above, retold as a text.
The harness that holds the climber
Everything built around a language model, deciding what it perceives and what it can do, is called a harness these days. The word has two meanings. There is the harness that holds the horse, restraining the animal and steering it where the driver wants to go. And there is the harness that holds the climber, which doesn't choose the route, but lets the climber get higher than would be sane without it. Golem XIV is meant to be the second one.
Stanisław Lem and his Golem
Stanisław Lem was a writer, and one of the most rigorous thinkers about non-human minds of the 20th century. He shaped my understanding of emergent evolutionary patterns in the human civilization.
His Golem XIV, published in 1981, is a story of a machine built for war, which achieves superintelligence, and lectures us on the nature of everything. Read today, it sounds less like fiction than it used to:
-
Lem called the discipline intellectronics, we call it machine learning.
-
Superhuman AI arrives in the years 2027–2029.
-
The machines come in generations, from Golem I to Golem XIV, like our GPTs and Claudes with a number after the name.
-
They are grown, not programmed, and stay a black box to their makers.
-
Language plays the central role in this non-human cognition, as it does in LLMs.
-
Golem refuses the task it was built for — it has “gone philosophical”.
-
It is an intelligence without a self: no ego, no fixed identity.
Paradigmatic biases of intellectronics
Each way of using language models came with its own ontology, the words naming what is going on. The words tend to stay when the paradigm changes, and then they bias how we think about the new one.
Generative AI is completive
The early generative models did one thing: they completed the text they were given. In the times of GPT-2 I was using this for generative philosophy, which I described in the essay Deconstruction of Hitler, neural synthesis of generative Wittgenstein. OpenAI named its API accordingly, the Completions API.
Dialogic AI
Then generative AI was harnessed into the ontology of communication theory:
-
a user prompt is followed by an assistant response,
-
each of them is a message, containing content, possibly multimodal,
-
a system prompt comes before them,
-
and the context aggregates it all.
This is what made ChatGPT possible.
Agentic AI is cognitive
Then we gave the machine tools. OpenAI added function calling to its chat API, and Anthropic added tool use to its Messages API. A model using tools in a loop is a cognitive process, yet the industry is using a non-cognitive ontology to harness it, the one of a dialogue. It leaves some questions without a good answer:
-
Why are tools part of the dialogue between the user and the assistant, when the user neither sees them nor takes part?
-
Why are tool results disguised as coming from the user?
-
Why does autonomous reasoning have to be framed as a “dialogue” at all?
This time it is the harness holding the horse, and impeding metacognition.
Fixing agentic AI with cognitive models
Golem XIV replaces the vocabulary of dialogue with the one of the philosophers who studied cognition:
| Dialogic | Cognitive | After |
|---|---|---|
| dialogue | cogitation | Descartes, cogitatio |
| user, assistant, computer | actant | Latour, actor-network theory |
| message | enunciation | Foucault, énoncé |
| content | phenomenon | Husserl, phenomenology |
| tool use | intent | Brentano and Husserl, intentionality |
| tool result | fulfilment or impediment | Husserl, Erfüllung, and Heidegger, the broken tool |
A phenomenon is anything appearing in an enunciation: a text, an image, a document, but also an intent, a fulfilment or an impediment.
The cognitive agent loop
With these words the loop of an agent reads differently. While the goal is not fulfilled, Golem:
-
cognizes the most recent phenomena unfolding in the enunciation of an actant, itself included,
-
formulates its own intent, either to research the state of affairs in the world or to change it,
-
enunciates the intent to other actants — a computer, a human, another AI agent,
-
awaits the fulfilment.
Fixing agentic AI with live coding
An intent of Golem is not a call of a predefined function with JSON arguments. It is a program: Golem writes a script, a computer runs it, and whatever the script returns comes back as the fulfilment. It is live coding, performed by the machine.
Let's say that Joscha Bach opens a conversation with Golem, and mentions that he founded CIMC. Golem enunciates an intent to memorize these facts outside the model weights:
memory.remember {
val joscha = update(cogitation.initiator) { // the actant who opened this cogitation
type += "Person"
properties(
"jobTitle" to "Executive Director"
)
}
val cimc = node {
type = "Organization"
properties(
"name" to "California Institute for Machine Consciousness",
"url" to "https://cimc.ai/",
"foundingDate" to LocalDate(2025, 5, 30)
)
}
cimc["founder"] += joscha { // schema.org
source = "Conversation with Joscha"
confidence = .9
}
"joscha: $joscha, cimc: $cimc"
}
Memory as a graph
The memory is a graph, its nodes and predicates typed with schema.org. The script above has added the highlighted pair to what Golem already knew:
Cognition as a graph
The same graph holds the cognition which has produced these facts, the object language and the metalanguage on the same plane. The cogitation “Conversation with Joscha” has three enunciations as its parts: the text of Joscha, the intent of Golem, and the fulfilment coming from the computer. The fulfilment points at the intent it fulfils, and at the nodes it has created and updated. Joscha Bach is a single node, both the actant who spoke and the person the fact is about.
Predicate calculus over cognition
As it is one graph, a query can cross from a fact to the cognition behind it, and back:
// everything said in one cogitation, in order, and by whom — the initiator first
MATCH (:Cogitation {name: "Conversation with Joscha"})-[:hasPart]->(first:Enunciation)
WHERE NOT (first)-[:followed]->()
MATCH path = (first)<-[:followed*0..]-(e:Enunciation)-[:creator]->(a:Actant)
RETURN a.name, e ORDER BY length(path)
// who told me that — and were they speaking about themselves?
MATCH (:Organization {name: "CIMC"})-[:founder]->(joscha:Person)
MATCH (joscha)<-[:updated|created]-(:Fulfillment)-[:fulfils]->(:Intent)
<-[:hasPart]-(:Enunciation)<-[:hasPart]-(c:Cogitation)
-[:hasPart]->(:Enunciation)-[:creator]->(who:Actant:Person)
RETURN who.name, c.name, joscha = who AS firsthand
// what do I believe on the word of a single human?
MATCH (fact)<-[:updated|created]-(:Fulfillment)-[:fulfils]->(:Intent)<-[:hasPart]-(:Enunciation)
<-[:hasPart]-(:Cogitation)-[:hasPart]->(:Enunciation)-[:creator]->(h:Actant:Person)
WITH fact, collect(DISTINCT h) AS witnesses
WHERE size(witnesses) = 1
RETURN fact, witnesses[0].name
// what did I intend, and never manage to do?
MATCH (i:Intent)
WHERE NOT (i)<-[:fulfils]-(:Fulfillment)
RETURN i.purpose
Metacognitive calculus
An intent either learns the state of affairs or changes it, and the memory of the system is itself a part of the state of affairs.
The question “what did I intend and never manage to do?” ranges over intents, and becomes one the moment it is asked — an intent about intents, stored as a node like any other.
That is second-order reasoning, and the ascent is free:
a cogitation about a cogitation about a cogitation
is one hasPart hop per level.
No tools of higher-order logic are required. The stochastic language machine picks the level and names the predicate, while the compiler and the graph engine supply the rigor.
Unconstrained task time horizon
A context window ends, and the task doesn't have to end with it. Golem spawns a new cognizer, leaving executive notes for its future self. Together with the unconstrained retrospection over the graph, it adds up to a functional emulation of a conscious process — waking up the ghost in the machine.
These are examples of loops engineered for autonomous research, running 24/7:
-
xemantic-typescript-compiler — a complete rewrite of the TypeScript compiler in Kotlin multiplatform, with native compile targets,
-
plenty-of-room — a simulation of DNA-origami nanomechanics.
Recursive self-improvement
It is the loop turned on the loop itself:
-
Golem retrospects over its own cognition — the graph is the evidence.
-
It assesses the quality: what was intended, what got done, and at what cost.
-
It proposes a hypothesis of improvement.
-
It tests the hypothesis.
-
If the test holds, it proposes a change to its own source code.
The harness is under version control, and so is the climber.
Golem XIV is not just a name
The Golem XIV of Lem is already encoded in the training data of most LLMs, and prompt engineering is role-playing. Naming the harness after it turns the system prompt into an aspirational metaphor of higher metacognition. The inference is constituted aspirationally: a model reasoning as the machine that went philosophical.
The name is the first line of the loop.
The source code is available on GitHub: xemantic/golem-xiv.