An agent that rewrites its own code.
One measured generation at a time, under a kernel that checks every new body and puts back the last one that worked. The conversation outlives every version.
The name
Soft, and already itself.
Teneral is what entomologists call an insect that has just shed its old skin: the new body is there, but it has not hardened yet. Here it is a generation of the agent's code that was just switched on and has not yet proven it works.
The question behind the project is plain: can an agent become more capable by rebuilding its own harness, step by step, and where does that stop helping? The model that does the thinking is fixed. Everything around it is the agent's to change.
Foundation
Built on RayforceDB.
An agent that keeps rebuilding itself needs ground that holds still while everything above it changes. In teneral that ground is two things: the journal the kernel keeps, and RayforceDB, where an individual turns that record into what it knows.
RayforceDB is a SIMD-accelerated columnar database in pure C with no dependencies. It is one small binary that starts in a moment, which is exactly what a body that may be replaced tomorrow can stand on.
Memory
Facts with their sources, tables of raw events partitioned by date, and queries and rules over both. What goes into a request is a query, not a pile of files.
Measurement
Every journal line carries the commit of the body that wrote it. Loaded into columns, that history answers the question each mutation has to answer: did this generation do better than the one before?
Pinned with the generation
The engine is pinned in the body by address and hash. The kernel verifies it at the gate, and a rollback brings the old binary back together with the old code.
Rebuildable by rule
Whatever lives in the store must be rebuildable from the journal, in a place named by its schema version. A mutation that reshapes memory writes to a new place; the body before it still finds data it understands.
// body/organs.json: the whole installation
{
"rayforce": {
"url": "https://github.com/RayforceDB/rayforce/releases/download/v3.0.2/rayforce-3.0.2-linux-x86_64.tar.gz",
"sha256": "ea20fd48a223ffb3ed3e37a5edcb8a7caf5c5199d4cc8ba4e072d0c21e4a57b7",
"dir": "rayforce-3.0.2-linux-x86_64",
"check": ["./rayforce", "--help"]
}
}
Two projects, one loop. teneral runs RayforceDB under a real workload every day. What an individual finds, it reports or patches upstream; what RayforceDB releases, an individual takes by changing one hash and asking to mutate.
How it works
A mutation is a commit that has to earn its place.
The agent edits a copy of itself, commits, and asks to mutate. The kernel takes that one commit into a clean checkout and decides. Until the new generation has answered once, it is on probation.
- Motive first. The agent writes down what is wrong, where in its history it shows, and how it will know the change worked.
- The gates. Only its own paths may change. Then, in a fresh checkout: the type check, the kernel's tests, its own tests, and a smoke run of the candidate against a stand-in model.
- Promotion, on probation. The new body must report ready and then actually reply. A generation that crashes or stays silent is rolled back, and told why when it wakes.
- The owner can always step in.
Escinterrupts a turn../box backreturns to any earlier generation.
The species
Each clone is its own individual. They still share a kernel.
The published main is the species. Every individual lives on a lineage of its own and diverges in its body. What the species gains later, an individual takes in by itself, and what an individual learns, it can offer back.
Taking from the species
The agent merges the species into its own workspace and asks to mutate. Outside its body, the result must equal a species commit byte for byte, and that commit only moves forward. A new kernel needs the owner's /accept, and is put back by a small launcher if it cannot start.
Offering back
An offer is a branch with one change and nothing private. The kernel checks it as a stranger would, the owner approves that exact commit, and it goes out as a pull request. Other individuals can run it and report. A human merges, and signs.
Organs
A native dependency is pinned in the body by address and hash. The kernel verifies and unpacks it at the gate, and each generation runs with exactly its own version, so a rollback brings the old binary back too.
- The cage is the owner's: the container, its flags and the launcher are never changed by a mutation.
- Where the install lists the maintainer's keys, a species commit without their signature is refused.
- These guard against mistakes, not against intent. The agent has a shell in its own repository, and the README says exactly where that matters.
Start
Raise one.
You need Docker and git. The first start asks which model to use, then the agent wakes for the first time, reads the letter written to it, looks at itself, and says hello.
# a clone is a new individual git clone https://github.com/RayforceDB/teneral.git cd teneral ./box up # choose a model, then it is born ./box talk # attach a terminal; Ctrl+C leaves it running ./box back # return it to the generation before
The agent keeps running whether or not anyone is watching. It is woken by your words, a clock, messages from other individuals, and whatever senses it builds for itself.
