I thought predictable, deterministic Rust state machines were enough. I was wrong.
They were enough to make decisions reproducible. They could enforce cooldowns, refuse unsafe actions, remember deadlines and explain which rule fired. What they could not do was learn which decisions deserved to be made.
I did not need more automation that waited for us to improve its thresholds. I needed a system that learned and decided for us - while remaining more accountable than an LLM with credentials.
That distinction has changed CrowdRelay Autopilot from a collection of reliable decision machines into a working brain. The Rust is still deterministic. The authority boundaries are still explicit. The difference is that the state being evaluated now includes beliefs, uncertainty, experiments and memory, and those beliefs change when reality disagrees.
The state machines were correct and still not enough
The first Autopilot answered questions such as: is a Reddit scan due, is an event close enough to pitch press, has this audience already been contacted, may this class of action execute without approval?
Those are good state-machine questions. The same input should produce the same answer, and a safety invariant should not become probabilistic because the software feels adventurous.
The weakness appeared one level above them. A scanner, a community post and a Signal invite could all be eligible at the same time. The old system knew that each action was allowed. It did not know which one was likely to create an incremental fan, which uncertainty was worth buying down, whether two actions were reaching the same people or whether waiting for an existing measurement was better than doing more.
Adding another if statement could encode my latest opinion. It could not turn yesterday's outcome into tomorrow's better decision. That is the line between a scheduler and a brain.
The brain starts with one picture of the world
The new brain builds a world model once per cycle: fan growth and its direction, Signal conversion, the configured north star, community reach, the outreach pipeline, upcoming events and progress against a growth target.
That sounds like a dashboard until uncertainty enters it. The brain does not only ask what is happening. It asks what it currently believes an action will cause in that situation.
A press pitch near a show is not treated as the same intervention as a press pitch with no event ahead. A community post into an unfamiliar scene is not assumed to behave like the tenth pass through an exhausted audience. Context includes event proximity, growth trend, community type, format, time and novelty.
From that state it derives a strategy - aggressive discovery, event-driven, content-first or Signal conversion - with hysteresis so a boundary crossing does not change the entire posture every cycle. The strategy still provides a deterministic frame. The learned model decides what the opportunities inside that frame appear to be worth.
Every action makes a prediction before it earns an outcome
A learning system needs the embarrassment of a written prediction. Without one, every result can be explained afterwards.
Before CrowdRelay dispatches work, it records how many incremental fans and Signal installs it expects, the context behind that expectation, the active strategy, the audience, the treatment assignment and the evidence quality. The candidate, prediction and initial evidence are persisted together. It cannot quietly replace the prediction after seeing the answer.
The fan-count model uses a hierarchical Gamma-Poisson model rather than pretending count data is a neat normal distribution. Templates with little history shrink toward the global belief instead of becoming heroes after one lucky result. Learned context effects adjust that belief without a pile of permanent multipliers. Signal conversion is learned separately because installing an application is not the same outcome as becoming a fan.
More importantly, every prediction carries uncertainty. 2.4 fans based on two observations is not the same claim as 2.4 fans based on two hundred. The old state machine had a value. The brain has a belief about the value and an honest statement about how little it may know.
The posteriors are checkpointed in PostgreSQL. A restart loads the last brain state and replays only newer evidence; a broken checkpoint falls back to the evidence history. Learning is durable business state, not warmth held inside one process.
An outcome is not yet evidence of causation
This was the uncomfortable part. If CrowdRelay posts into a community and five fans arrive, it is tempting to teach the model that the post created five fans. It may have created none. A release, another campaign or ordinary growth may have done the work.
The brain therefore separates raw outcomes from incremental effect. Eligible direct actions can enter experiments with deterministic treatment and holdout assignment. Control units are not fake actions with zero results; they are recorded as deliberate non-actions. The experiment population is formed before the portfolio chooses its winners, otherwise the comparison would only describe candidates the brain already liked.
Evidence also says how it was obtained. A randomized holdout moves a belief more than a before-and-after comparison. Direct attribution, matched comparisons, modeled attribution and observational evidence each carry different strength. Sample size, contamination and measurement delay can weaken even a nominally strong method.
The learning target is not the number that looks best in a weekly report. It is incremental unique durable fans: people who would not have arrived without the action, deduplicated across channels and still active after thirty days.
Thirty days is a long time for a decision loop, so the brain learns a bridge from the fourteen-day signal to the thirty-day result. Until enough paired observations exist, that bridge inflates uncertainty instead of laundering an early guess into a mature fact.
Learning what to inspect is different from deciding what to do
One of the first versions mixed everything into Expected Free Energy: expected fans, uncertainty, information gain, novelty and risk. It looked intelligent because the equation had several terms. It was also becoming a weighted soup where quantities with different meanings could make a bad action look good.
The current boundary is stricter. Expected Free Energy decides what is worth learning about. It gives uncertain or unexplored template-and-context combinations a reason to enter the candidate pool. Exploration memory makes repeated visits less novel, lets knowledge generalise partially across templates and decays old visits so a context can become interesting again when the world changes.
DecisionValue decides what is worth doing. Its economic terms are expressed in one unit: expected incremental durable fans at day thirty. It preserves where the estimate came from, its sample size, evidence quality, uncertainty, bridge confidence, contamination and calibration. Unknown risk is labelled unmodelled rather than smuggled in as zero.
That separation matters. Curiosity may justify measuring an uncertain action. It must not silently rewrite the action's expected fan value.
The choice is a portfolio, including the choice to wait
The old evaluator considered each bounded context separately. That was locally tidy and globally naive. Two individually sensible actions can hit the same audience, consume the same budget and produce less together than either model predicts alone.
The brain now collects eligible candidates into one portfolio. It compares their marginal value after audience overlap, fatigue and resource limits. A community engager can be evaluated per actual community, so r/djent and r/metalcore do not disappear inside one generic worker score.
Doing nothing is a real candidate. So is waiting. If several measurements are about to resolve and the best current action has weak expected value, another dispatch may be less useful than learning from work already in flight. Silence is no longer only the absence of a matching rule; it can be the selected decision.
The portfolio also records why candidates lost: negative marginal value, insufficient value, exhausted budget or a better candidate for the same audience. Six months later I want to inspect why the brain chose one action, not receive a confidence number and a shrug.
LLMs became less important as the brain became more capable
There is no language model inside this decision path. LLMs scan sources, gather intelligence and draft material. CrowdRelay constructs their prompts from owned data, checks their output and measures what happened after execution. A worker can be slowed down, moved to a cheaper tier or retired when its outcomes keep disappointing. Operator approvals and cancellations can adjust how often a type of work is surfaced, but preference is not allowed to override economic value.
This is the opposite of giving an agent a goal and hoping its chain of thought resembles strategy. The models are replaceable workers. The Rust brain owns the goal, evidence, experiment, budget, authority and final choice.
Determinism was never the mistake. Confusing deterministic execution with fixed reasoning was. A Bayesian update is deterministic given the prior and evidence. A holdout assignment can be reproducible. A portfolio can make the same choice from the same beliefs while those beliefs continue to change with observed reality.
A working brain is not an omniscient one
The priors begin sparse. Thirty-day outcomes necessarily arrive late. Some channels offer clean attribution and others only weak comparisons. Risk is still explicitly unmodelled in the canonical decision value. Waiting currently understands pending measurements, uncertainty and immediate opportunity cost; its longer-term option value is not modelled yet. The high-level strategy posture remains rule-derived, and learned strategy evidence is not permitted to manufacture fan value. Those are limits, not reasons to hide behind a larger model.
What makes the system a working brain is not that every subsystem has a biological name or that every decision is already good. It is that the loop is closed and durable:
form a belief→ choose an action or a holdout→ record what was predicted→ observe what actually happened→ grade the evidence→ update the belief→ choose differently next timeThe original state machines still guard every edge of that loop. They decide what is legal, due, idempotent and authorised. The brain now decides what is worth our next unit of attention, can spend one action to learn rather than exploit, and can discover that its previous answer was wrong.
That was the missing part. I did not need CrowdRelay to imitate a person. I needed it to remember what we tried, learn what genuinely grew the fanbase and make the next decision with us no longer standing in the middle of every loop.