Docs

Agentic Apps · 04.17

App Goals & the Evolution Loop: An App That Gets Better at Its Own Mission

An App can hold a durable Goal, run competing strategies toward it, measure which one actually wins, learn that in its own Brain, and evolve — promoting the winner and spawning the next generation. The loop, and where the honesty lives.

App GoalsEvolution LoopStrategies

A Goal is the durable tier — not a run's objective

Everywhere else in Agentis, an objective is run-scoped: the checked definition of done for a single run (see the Workflow Engine). A Goal is the tier above it — a durable north-star an App pursues across many runs, over weeks and months. A Goal decomposes into the objectives individual runs chase; it is the thing the App is trying to get better at, not the thing one run must finish.

You set it with agentis.app.goal: a statement plus an optional north-star metric to optimize ({ metric: "conversion_rate", direction: "maximize" }). It rides in the App's manifest, so it is portable and versioned with the App — no separate configuration to lose. And it is mirrored into the App's own Brain as governing context, so every run in the App's scope recalls the Goal automatically rather than being told it by hand.

Competing strategies, judged by measured outcome — not by repetition

A Strategy is one concrete way the App pursues its Goal — "open with a question" versus "lead with a demo video." Strategies compete: each maps to an arm of an Experiment, and each accrues a measured record of wins and trials. Its confidence is a Laplace-smoothed win rate — (wins + 1) / (trials + 2) — so a strategy that has won once out of one is not treated as certain; small samples pull toward even until the evidence accrues.

This is the specific failure it repairs. A naive learning loop reinforces whatever pattern recurs, so a frequently-repeated-but-ineffective approach gains confidence exactly like an effective one. Here, confidence tracks the outcome, not the frequency. When a strategy is proven, it is mirrored into the App Brain as a recallable atom, so future runs actually reach for the winning approach. Author and inspect them with agentis.strategy.propose and agentis.strategy.list.

The loop: measure → learn → evolve

These pieces already existed as strong but unconnected arcs; the Evolution Loop is the wiring that makes them a circuit:

ArcWhat runs
MeasureThe Experiment primitive (sticky variant assignment + per-variant success rate) plus rolling performance baselines (success rate, latency) captured on every terminal run.
LearnWhen an experiment outcome is recorded, it bridges into the App's Brain: the strategy for that arm counts the outcome, outcome-weighted. The two systems that used to never touch now do.
EvolveA controller reads the standings and decides whether there is a real winner — then promotes it, retires the clear losers, and recommends the next generation.

So the same "A/B the first versus second follow-up" experiment that was already possible now feeds forward: its result durably changes what the App recalls and reaches for next time, instead of being a number a human has to read and act on.

Honest promotion, operator-sovereign evolution

The controller refuses to promote on noise. Each competing arm needs a minimum sample, and the leader must beat the runner-up by a real margin and clear a two-proportion z-test at roughly 95% confidence before anything is called a winner. Below that bar it returns no_clear_winner and the arms keep competing — an early fluke can't lock the App onto the wrong approach.

When there is a winner, the controller promotes it (raising its recall weight), retires the strategies that are significantly worse, and recommends spawning the next generation from the winner. That last step is deliberately a recommendation, not an autonomous LLM call: the decision core stays deterministic and testable, and the App's owner agent generates the new variants via agentis.strategy.propose. A cadence sweep runs the review periodically; acting on it automatically is operator-gated and off by default — otherwise the loop only surfaces proposals and a human decides. Run it on demand with agentis.evolution.review (pass apply: true to act).

Mission Control

GET /v1/apps/:id/mission-control returns the whole loop for an App in one read — the Goal, the competing strategies with their win rates and confidence, the live experiments, the performance baselines, and the controller's current promote/retire/spawn recommendations — all computed live from state, not stored. The App engine surfaces it as a Goal tab: the north-star, a standings table, and the evolution verdict per experiment. This is the same honesty rule the rest of Agentis holds to — what you see is derived from measured outcomes, not a stored claim.

Continue