Saprobe: Active-inference metareasoning for evolving inquiry

Inspiration

During my PhD, I learned that one of the hardest parts of research is maintaining a coherent research strategy while the project itself keeps changing. New evidence weakens assumptions that once seemed safe. A framing that was useful for months becomes too narrow. Prior work from another field suddenly connects to a problem that initially appeared unrelated. Side questions become prerequisites. Experiments fail, but later reveal what should not be attempted again. Ideas that seemed dead sometimes return as the missing piece of a new direction.

Research therefore feels less like following a fixed plan and more like tending a living system. It grows, branches, competes for attention, adapts under pressure, and sometimes survives by metabolizing what was previously discarded.

That is the inspiration for the name Saprobe. In nature, saprobes transform dead or decaying material into nutrients for new growth. Saprobe is built around the same principle:

Nothing in research is wasted.

My broader research asks how intelligent systems can infer the latent intent of another actor from partial and noisy observations (provocatively: mind-reading). Saprobe turns that question inward, at a meta level: can a system infer the evolving state and intent of a research process, relative to its stated strategy, and use that inference to help determine what deserves attention next?

What Saprobe does

Saprobe is not a conventional research assistant.

It is not primarily designed to summarize papers, answer questions over PDFs, generate literature reviews, or produce more content. Many existing tools already address those tasks.

Saprobe instead maintains the reasoning state of an evolving inquiry:

  • What is the project trying to determine?
  • Which hypotheses and alternatives are active?
  • Which assumptions remain unresolved?
  • What evidence bears on each claim?
  • Why was one experiment selected instead of another?
  • Which branches are active, dormant, rejected, or newly relevant?
  • What decision is currently blocked?
  • What result would change the research strategy?

As the researcher reads, records evidence, revisits old notes, discusses ideas with an AI, and runs experiments, Saprobe records meaningful project events in a replayable trajectory.

A lightweight local active-inference model then reasons about the state of the inquiry process. It does not claim to know whether a scientific hypothesis is objectively true. It infers bounded, project-relative conditions such as whether the inquiry is coherent or under strain, whether a dormant branch has become strategically important, and whether the next decision requires more evidence or a better discriminating action.

Depending on that inferred state, Saprobe may:

  • remain silent (crucial, as it should not distract the research process itself);
  • foreground the current decision;
  • recover relevant dormant context;
  • ask one clarifying question;
  • recommend an evidence-producing action;
  • or propose that the structure of the inquiry itself needs repair.

This is metareasoning: reasoning about how to reason, what information to seek, which computation is worth performing, and when the current framing should change.

Active inference and GPT‑5.6

Saprobe combines two different forms of intelligence.

The always-on control loop currently uses a small/rudimentary active inference implementation (with future work leveraging existing libraries like infer-actively/pymdp). This gives Saprobe a compact, data-efficient, and inspectable model for managing uncertainty and selecting among possible interventions. The model balances the expected value of gaining information against practical value, interruption, computation, and other costs.

GPT‑5.6 is invoked selectively at moments that require broader semantic reasoning. For example, it can help:

  • construct an initial inquiry representation;
  • express an experiment in terms of the decision it should resolve;
  • interpret selected evidence;
  • or propose a bounded structural repair.

This separation is deliberate. Saprobe does not need to send the entire project to a frontier model after every click, note, or experiment. The local active-inference loop can continuously monitor the inquiry and decide when an expensive semantic intervention is actually warranted.

Internally, I think of this as an epistemic lifecycle:

  1. Construction: establish a testable model of the inquiry.
  2. Monitoring: compare that model with the project’s actual trajectory.
  3. Management: decide what context, evidence, question, or action matters next.
  4. Repair: revise the inquiry when ordinary belief updates can no longer explain what the research has become.

The researcher remains the final authority. Structural changes are presented as explicit, provenance-linked, and reversible diffs rather than silently applied rewrites.

How I built it

Saprobe is designed as a local-first research environment.

The prototype maintains versioned representations of the inquiry, evidence relationships, experiments, decisions, and repairs. Meaningful research activity is stored in an append-only event ledger, allowing project state to be reconstructed and replayed over time.

A central design decision was to separate four things that are easy to conflate:

  • The scientific content being investigated.
  • The researcher-approved Inquiry Model.
  • Saprobe’s internal active-inference model of the inquiry process.
  • A proposed repair to the accepted research strategy.

The scientific models, code, notebooks, and datasets remain in the researcher’s normal development environment. Saprobe does not attempt to replace an IDE, notebook runtime, file system, or reference manager. Instead, it records why an experiment exists, which uncertainty it addresses, what it produced, and how the result affects the inquiry.

The prototype includes a Model Inspector that exposes the active-inference layer: recent observations, inferred inquiry state, alternative policies, the selected intervention, and the evidence behind that selection. This makes the metareasoning process inspectable rather than presenting the recommendation as unexplained AI judgment.

I used the Codex App extensively to develop the project: constructing the architecture, implementing large vertical slices, generating and validating scenarios, testing the interface from fresh contexts, and preparing the demonstration. Within Saprobe itself, the local Codex runtime provides the bounded GPT‑5.6 integration used for semantic construction and repair.

The demonstration

Due to the hackathon's time limitations (and life's usual distractions) I had to create a synthetic research study as the demonstration, rather than the ideal organic use of Saprobe (although now that it is built I plan to use it).

The demonstration follows a synthetic research study involving a latent stochastic process.A researcher is attempting to reconstruct an animal’s hidden path from noisy measurements. Their first model appears convincing, and the natural next step seems to be adding greater complexity to the latent movement process.

However, the research trajectory repeatedly returns to a previously sidelined concern: the apparent movement complexity may originate in the measurement process rather than the animal’s behavior.

Saprobe does not fit the scientific model itself. Instead, it notices that this dormant branch has become relevant to the active decision and recommends a more discriminating experiment: hold the movement dynamics fixed and test the observation assumptions first.

The result changes the research strategy. A single combined hypothesis is no longer adequate. Saprobe invokes GPT‑5.6 to propose a bounded repair that:

  • separates movement-process adequacy from measurement-model adequacy;
  • reactivates the dormant observation branch;
  • relinks the relevant evidence;
  • introduces a more precise decision gate;
  • and changes which model should be tested next.

The important outcome is not simply that one statistical model fits better than another. It is that the experiment reveals the project was asking the wrong modeling question in the wrong order.

Saprobe helps the researcher preserve and act on that epistemic change.

Challenges

The largest challenge was translating an abstract theoretical idea into a clear user-facing product.

Active inference could not merely appear in the architecture diagram. It needed to perform a visible and necessary role: deciding when to stay quiet, when to request clarification, and which evidence-producing action would best distinguish competing interpretations of the research trajectory.

A second challenge was keeping Saprobe domain-agnostic while developing it through a specific stochastic-process demonstration. The scientific model is treated as an external research artifact; Saprobe’s core models the evolution of the inquiry, not animal movement, telemetry, or any other specific domain.

Another challenge was representing long-running research in a short demonstration. Saprobe therefore supports replayable, provenance-preserving project histories. A rehearsed history can establish the earlier trajectory, while the decisive evidence, inference update, intervention, and repair still execute through the real product.

Finally, the system needed to remain useful without becoming intrusive. Repeatedly reading a topic does not prove that a researcher is distracted or changing direction. Saprobe treats trajectory divergence as uncertainty and seeks discriminating evidence or explicit intent before proposing a structural change.

What I learned

I learned a lot about how to leverage ChatGPT and Codex for an end-to-end product development process lifecycle.

From a technical perspective, the most important lesson was that research memory must preserve more than information. A collection of documents can tell us what was encountered. A useful research substrate must also preserve:

  • why it mattered;
  • what assumption it challenged;
  • which decision it affected;
  • what was attempted afterward;
  • and why the project eventually changed.

Most importantly, active inference and frontier models can play complementary roles. A persistent local controller can manage uncertainty, context, and intervention timing, while GPT‑5.6 is reserved for the moments where semantic flexibility is genuinely valuable.

What comes next

The Build Week prototype is human-facing, but Saprobe’s longer-term inquiry representation is actor-neutral.

For a human researcher, Saprobe can adapt the workspace: foregrounding a decision, resurfacing evidence, or remaining out of the way, possibly even adjusting the interface itself as it evolves with the user.

For an AI research agent, the same runtime could compile a bounded context package containing:

  • the current objective;
  • the unresolved decision;
  • accepted and competing hypotheses;
  • relevant evidence;
  • failed attempts;
  • dormant but potentially useful branches;
  • and the next permitted research actions.

This could provide persistent research memory and metacognitive control without repeatedly loading an entire project history into an LLM context window.

In that sense, Saprobe is also an experiment in context-, strategy-, and inquiry-level self-improvement. The foundation model does not need to change its weights for the larger system to improve its task-specific reasoning, efficiency, and continuity. The harness can improve by reorganizing memory, selecting better context, learning which interventions help, and repairing the project model that guides future work.

The longer-term goal is a shared research-reasoning substrate for humans and machine intelligence:

Research assistants answer questions. Autonomous systems attempt to perform research. Saprobe maintains the epistemic environment in which humans and agents decide what research should happen next.

Built With

Share this project:

Updates