At Zvena we are working on Sapphire, the architecture of an AI system meant to join a language model, the choice of actions, long-term memory and the checking of what it has learned into one working loop. The project is now at its third stage: we are assembling the components into a whole. Our hypothesis is that this organisation may help a system work on its own for longer and use the experience of earlier attempts. How this approach relates to AGI still has to be established by experiment.
With this entry we open the Zvena research centre. Here we will take technologies apart, explain our decisions and discuss questions we cannot yet answer. We start with the biggest one: how far are we from artificial general intelligence, and what exactly has to change to get closer to it?
This entry has 19 short explanatory animations. The labels inside the videos are in English, and each has an explanation beside it. The formulas and the main points can be read without playing any video. The key videos are open in the text; the extra mathematical walk-throughs open on request.
What getting closer to AGI means
AGI, Artificial General Intelligence, usually means a system with broad intellectual abilities comparable to a person's. But a good conversation, a high test score and a day of independent work test different things.
The paper Levels of AGI proposes looking at the breadth of abilities and the level of performance, and discussing autonomy separately. It is a useful starting point: one impressive skill is not enough to describe a whole system.[1]
For this diary it helps to keep four questions in view: how varied the tasks are, how reliable the result is, whether experience carries over to new conditions, and how much human involvement is needed. We write them down as a map of observations:
Here B is the breadth of tasks, R reliability, T transfer of experience and A autonomy. This is our explanatory scheme, not an accepted AGI index. We do not suggest adding these values up into a "percentage of intelligence readiness": each of them first needs tasks, scoring rules and measurements.
Watch the walk-through · Four dimensions of ability · 18 s
Another useful view is the task-difficulty horizon. METR estimates it by the time a human expert spends on a task. For example, the horizon at 80% success is the difficulty at which the system reaches that reliability according to the evaluation model. It is not the length of the system's continuous work.[2]
In this explanatory notation h is the human duration of a task and ρ the chosen level of reliability. It assumes the probability of success falls as difficulty grows within the evaluated set. Different reliability requirements give different horizons.
Watch the walk-through · The task-difficulty horizon · 24 s
So the question "how many months are left until AGI?" does not yet have an answer that can be derived from any single result. Our research question is narrower and more concrete: which changes help a system cope with harder tasks, learn from checked experience and keep its quality over long work?
What happens inside a language model
For an autoregressive LLM, generating an answer can be written as a sequence of conditional probabilities:
x is the input context, yᵢ the next token and θ the model's parameters. A token can be a word, part of a word or another unit of text encoding. Each next piece depends on the available context and on the continuation already built.
This formula describes the generation of a sequence. For the system to take an action in the outside world it also needs tools, rules for calling them and handling of their results.
Watch the walk-through · Generating a sequence of tokens · 22 s
One of the main mechanisms of the Transformer is attention. In the simplified notation for a single head it looks like this:
The matrices Q, K and V hold queries, keys and values. Matching queries against keys sets the weights by which the values are mixed. Scaling by the square root of the dimension dₖ helps keep the size of the scores in check before the softmax. This is a computational mechanism, not a measure of human attention.[3]
Attention on its own does not organise a project's long-term memory or the checking of an action's consequences. Those functions belong to the design of the whole system around the model.
Watch the walk-through · Attention, step by step · 28 s
The idea behind Sapphire
We are studying a single architecture in which generation, decision-making and work with experience are linked by a shared state. The language model helps interpret the task and form options. The decision loop sets the next step. The environment returns a result. Memory keeps what may be useful later.
By Decision models in this entry we mean the functional loop that chooses actions. The specific algorithm cannot be read from that name. Language models and decision models also do not have to be mutually exclusive architectures: Decision Transformer, for example, applies a Transformer to sequences of states, actions and desired reward. This is an example from the literature, not a statement that Sapphire uses it.[4]
To describe our idea, we introduce the state of the system:
g is the goal, oₜ the current observation, hₜ the system's working context, Mₜ long-term memory and aₜ the action. In the accompanying diagram θ stands for the language model's weights and φ for the settings of the control loop, the harness. This notation describes the system loosely; it does not claim a separate trained decision model exists. The working context here should not be confused with the hidden state of a single neural-network layer.
The function F describes the whole system's transition to the next step. In the diagram it passes through interpretation, choosing an action, executing it and checking the result. This is a conceptual formalisation, not a published implementation specification.
Loops of this kind have predecessors. In ReAct a language model alternates reasoning and actions, using the results of its interaction with the environment. So the research value of Sapphire has to be judged by what our particular organisation of the loop gives in practice.[5]
To explain the choice of the next step, we can use this objective:
The system considers the allowed actions, estimates their expected usefulness U and takes cost into account. The coefficient λ sets the weight of costs. The formula states a design principle: usefulness has to be weighed against expense. It does not mean a separately trained usefulness function is already implemented or predicts outcomes accurately.
Watch the walk-through · Choosing the next action · 24 s
By continuous work we mean the ability to move from one checkable step to the next and to resume work from a saved state. Such a process has to be able to finish when the goal is reached, the budget is spent, no useful action is left or clarification is needed. Endless execution is not a success in itself.
Why a system needs long-term memory
In our current work we use a component the team calls Tensor Agent Memory Database, and part of the Hermes Agent agent harness. A harness here means the execution infrastructure: how calls to the model, the tools and the state are organised. These components are the basis of the build; their presence does not yet prove self-learning or AGI.
The official Hermes documentation describes notes kept between sessions and procedural skills. That is important context for us: experience can be reused at the level of the system, without changing the language model's weights.[6]
One way to look for a fitting memory is to compare the query's vector with the vectors of the records:
qₜ represents the current query and eₘ a memory record. For cosine similarity both vectors must be non-zero. TopK returns the few records with the highest similarity. This illustrates a possible search; it is not a statement about the internal algorithm of the named database.
A similar record, however, may be wrong, out of date or valid for one project only. So useful memory needs a source, a time, a scope and a way to be corrected. Similarity helps find a record; whether it is true is checked separately.
Watch the walk-through · Searching long-term memory · 24 s
To explain how checked experience is written down, a rule helps:
Upsert means adding or updating a record, Verified the result of a given check. A real system will also need conflict handling and a way to undo wrong records. The formula states the intended principle, not a guarantee of error-free memory.
Watch the walk-through · Writing down checked experience · 22 s
In what sense a system can learn
"Self-learning" has several meanings here. A system can save a fact, refine an instruction, create a reusable procedure or change how it chooses actions. Each of these can change its later behaviour. Changing the parameters of the neural network itself is a separate process.
The first line shows memory changing while the LLM's weights stay the same. The second shows the usual gradient update: η sets the step size, L is the loss function and D_checked the checked training data. The second line is there to explain the difference; with it we do not claim that Sapphire already retrains its weights on its own.
What matters to us is the observable result: after useful experience the system should do better on relevant new tasks. Replaying a saved answer tests memory but does not yet show that a skill carried over.
What zeros and ones can explain
Binary notation makes it easy to show how a system narrows its set of actions. Take four example actions in a fixed order: read, delete, verify, write. The availability mask might look like this:
A one means the action is available at the current step, a zero that it is excluded. The value 11 is the ordinary decimal form of this bit sequence. What the mask means is set by which position stands for which action.
Watch the walk-through · A binary mask of actions · 18 s
If, before the mask is applied, the probabilities of actions are given by the distribution π, the available options can be renormalised:
With a positive denominator the excluded action gets zero probability, and the rest again add up to one. If the denominator is zero the formula does not apply: the system has to take a planned exit, such as stopping or asking for clarification.
This is a teaching example of controlling actions. Such a mask is not proof of learning on its own, and it does not replace the permission check on the side of the tool being run.
Watch the walk-through · Masking probabilities · 24 s
A concrete scenario to test the idea
In the accompanying illustration the requirements document changes: webhook sync is replaced by an API request every 15 minutes. The list has three tasks that involve the webhook and one more task unrelated to the integration.
The system first rewrites the three related tasks for the new way of syncing. Then the check finds an exception: under Client B's terms, its webhook has to keep working. The wrong change to that task is undone, and the saved rule is refined to include the exception. The other two tasks stay switched to the API request.
An example like this lets us ask checkable questions: does the system find the related records, can it undo an unsuccessful action, and does it carry the refined rule over to a new task? It matters to measure both the initial mistake and the quality of its correction.
This is an illustrative scenario, not a description of an experiment that was run. The client names, tasks and intervals here are made up. A real case has to come with the original task, the observed actions and an independent check of the result.
The third stage of the work
According to the team's report of 28 October 2026, Sapphire is at its third stage: assembling the components into one project. The animations in this article explain the idea; they are not a recording of Sapphire at work. This publication gives no numerical results of internal trials.
The plan of work can be shown in four steps:
| Step | What it involves | What lets us move on |
|---|---|---|
| 1 | Define the tasks and the research hypothesis | There are observable criteria of success |
| 2 | Prepare the generation, action and memory components | Their roles and ways of working together are clear |
| 3 | Assemble the single loop | State and results pass between the components |
| 4 | Run comparative trials | There are reproducible results and an analysis of errors |
This is a map of the project's content; it does not replace a report that each step is complete. The main question of the current integration is whether the single loop can keep a useful link between the goal, the action, the result and the next decision.
What published experiments already show
In the 2023 Reflexion study the authors compared plain generation with a system that uses feedback and text memory. Their Table 1 gives these results for Python:[7]
| Benchmark | Base GPT-4 | Reflexion | Difference |
|---|---|---|---|
| HumanEval | 80.1% | 91.0% | +10.9 pp |
| MBPP | 80.1% | 77.1% | −3.0 pp |
These are historical results of specific configurations, not measurements of Sapphire. The metric is called pass@1, but the Reflexion process includes internal checking and corrections before the final score, and the compute costs differ. A gain on one set sits next to a loss on another.
There is also a more recent test of what an agent harness contributes. In a METR research note of 13 February 2026, comparing Codex and Claude Code with the harnesses METR uses, on GPT-5 and Opus 4.5, showed no statistically significant advantage in task horizon. This is a limited experiment with the stated models and settings, not a general conclusion that harnesses are useless.[8]
What we take from these papers is a research hypothesis: the quality of feedback, memory and loop control deserves to be measured on its own. A more complex system may bring a gain, a loss or just extra cost.
How we want to compare Sapphire
To test what each component contributes, we need variants of the system in which one essential element changes: the base LLM with the same tools; the loop without long-term memory; the loop with memory; the loop with memory and checked updates to procedures. This is a plan for the comparison, not the results of a finished experiment.
The main metric is the share of tasks that fully pass a check set in advance:
v stands for the variant of the system, N for the number of tasks and Yᵢ for the result of the check. Partial completion can be scored as well, but it must not quietly turn into full success.
The difference is better computed on the same tasks:
This paired comparison shows on which tasks the new variant helped or got in the way. The estimate needs its uncertainty beside it, for example a confidence interval from a paired bootstrap over tasks. Repeated attempts at one task should not be counted as new independent tasks.
Watch the walk-through · A paired comparison of variants · 30 s
Tasks used for training and debugging have to be kept apart from the held-out set. Testing transfer will need new conditions, including exceptions to rules that were useful before. The systems being compared must have the same base model, the same access to tools and budgets set in advance. If extra compute alone could explain a gain, a separate control with a comparable budget is needed.
Cost is part of the result too:
Cᵢ is the full cost of an attempt, including a failed one. If there are no successes, the cost per success is undefined. It should be shown together with time, tokens, the number of tool calls, human interventions and repeated mistakes.
Watch the walk-through · The cost of a success · 20 s
When an improvement can be accepted
Being able to propose a new instruction does not mean the instruction is useful. So in the conceptual scheme an update to the system goes through an evaluation:
S′ is the proposed version of the system, for example with a changed procedure. EvalPass combines requirements chosen in advance for quality, acceptable regressions and costs. Passing this check is empirical ground for accepting the change under the given conditions, not proof that it is useful for ever.
Tuning again and again on one set gradually turns it into training material. So a serious claim of improvement needs independent checks and a saved earlier version to return to.
Why long work stays hard
In a long chain, a small chance of error at each step can noticeably lower the overall reliability. If success requires every critical step to succeed, the chain rule of probability applies:
The last numbers are a teaching calculation with equal conditional probabilities, not a measurement of any model. In a real process errors are linked to each other, some can be fixed and some steps are not critical. The formula shows why checking intermediate results and recovering from failures matter for long work.
The end of the animation looks at one more teaching mechanism: detecting and correcting errors. Let c be the share of wrong steps that were both detected and fully corrected. If the check does not spoil results that were right to begin with, the effective probability that a step succeeds is:
With p = 0.99 and c = 0.9 this gives p_eff = 0.999. This is a conditional calculation, not a measurement of Sapphire: successful detection together with full correction is folded into the one value c. New errors the check itself might introduce are not counted in this simple model.
That is why we treat Sapphire as research into how AI work is organised. It will have to be judged by how it finds errors, uses experience and copes with new tasks within given limits.
What the next entry should bring
Our long-term goal is to study the path to more general and more independent artificial intelligence. We allow that joining generation, decisions and checked experience may turn out to be part of that path. Whether such a system would be enough for AGI does not follow from our concept today.
Outperforming people at particular tasks is also not the same as outperforming them across the whole range of intellectual work. To discuss that meaningfully, the tasks, conditions, reliability and cost of the comparison have to be defined. A timeline of a few months or years remains a guess, not a result of this work.
Sapphire's next real milestone is reproducible experience: a task, a starting configuration, a saved rule, a new situation and a measurable result. Most interesting is the case in which the system first made a mistake, then used checked experience and could explain the limits of where it applies. Material like that will give this research diary what we are starting it for: observations that can be discussed and checked.
Sources
- Morris et al. Levels of AGI for Operationalizing Progress on the Path to AGI. 2023, with later revisions. https://arxiv.org/abs/2311.02462
- METR. Task-Completion Time Horizons of Frontier AI Models. The page is marked as no longer actively updated; the last stated update is 8 September 2026. https://metr.org/time-horizons/
- Vaswani et al. Attention Is All You Need. 2017. The attention formula is in section 3.2.1. https://arxiv.org/html/1706.03762v7
- Chen et al. Decision Transformer: Reinforcement Learning via Sequence Modeling. 2021. https://arxiv.org/abs/2106.01345
- Yao et al. ReAct: Synergizing Reasoning and Acting in Language Models. 2022–2023. https://arxiv.org/abs/2210.03629
- Nous Research. Hermes Agent: Persistent Memory and Skills System. Documentation viewed on 28 October 2026. https://hermes-agent.nousresearch.com/docs/user-guide/features/memory and https://hermes-agent.nousresearch.com/docs/user-guide/features/skills
- Shinn et al. Reflexion: Language Agents with Verbal Reinforcement Learning. 2023, version 4, section 4.3, Table 1. https://arxiv.org/html/2303.11366v4
- Jurkovic, METR. Measuring Time Horizon using Claude Code and Codex. Research note of 13 February 2026. https://metr.org/notes/2026-02-13-measuring-time-horizon-using-claude-code-and-codex/