{% extends "base.html" %}
{% from '_ui.html' import page_header, empty_state, id_chip %}
{% from '_learning_tabs.html' import learning_tabs %}
{% block title %}Persona evolution - Memorizz{% endblock %}
{% block head %}{% endblock %}
{% block content %}
{% set pe_description = "Review how one account's approach adapts from its conversations: what changed, why, and the evidence behind it. Suggestions wait for approval, apply from the next turn and can be undone." %}
{% set tabs = learning_tabs('persona-evolution') %}
{% set history = (profile.persona.evolution_history or []) if profile else [] %}
{% if profile %}
{#- Account-wide commands. Approve and dismiss live with the suggestion itself. -#}
{% call page_header('Persona evolution', pe_description, 'Continual learning', nav=tabs) %}
{% if history and history[-1].action != 'undo' %}{% endif %}
{% endcall %}
{% else %}
{{ page_header('Persona evolution', pe_description, 'Continual learning', nav=tabs) }}
{% endif %}
{% if agent_personas %}
A saved agent's own persona grows from patterns across its conversations (persona learning, also job 6 of a refine cycle). Each change shows what was added, the user's words it rests on and who applied it. Guardrails are never changed this way. Waiting for review {{ row.pending.field|capitalize }} + {{ row.pending.addition }} Version {{ change.version }} {{ change.field|capitalize }} · {{ change.at }} UTC · {{ {'memorizz:refine_cycle': 'applied by a refine cycle', 'memorizz:persona-learning': 'applied by persona learning'}.get(change.by, 'by ' ~ change.by) }} + {{ change.addition }} {{ change.old if change.old is string else change.old|tojson }} → {{ change.new if change.new is string else change.new|tojson }} {{ change.reason }} {% if row.learning %}No change yet{% if row.last_review %} (last reviewed {{ row.last_review }} UTC){% endif %}. A change needs the same kind of request in several conversations.{% else %}Persona learning is off for this agent.{% endif %} Persona learning on the control plane{% if row.change_count > row.changes|length %} · {{ row.change_count - row.changes|length }} earlier change(s) on the persona record{% else %} · Persona record{% endif %}Agent personas
{{ agent_personas|length }} agent{{ '' if agent_personas|length == 1 else 's' }}
{{ row.agent_name }}{{ row.persona_name }}{% if row.role %} · {{ row.role }}{% endif %}
{% if row.pending %}1 waiting for review{% endif %}
Version {{ row.version }}
{{ ('Learning on · ' ~ ('applies itself' if row.auto_apply else 'review first')) if row.learning else 'Learning off' }}
{% if row.guardrails %}{{ row.guardrails }} guardrail{{ '' if row.guardrails == 1 else 's' }}{% endif %}
{% for quote in row.pending.evidence %}
{% endif %}
Review this change
{% for quote in change.evidence %}
{% endif %}
{{ error }}
{% endif %} {% if not connected %} {{ empty_state("Connect your application's persona adapter"|safe, "Memorizz reads each account's canonical profile from your application. Pass a persona adapter to create_app(persona_evolution=...) to enable this page; docs/persona-evolution-hosts.md describes the adapter contract. A shared agent's persona is not a per-user profile.") }} {% elif not profile %} {{ empty_state('Start with an account', "Enter an account ID above to review its approved approach, any pending reflection and its change history.") }} {% else %} {% set agent_q = profile.agent_id|default('', true)|urlencode %} {% set user_q = user_id|urlencode %}{{ profile.persona.name }} · {{ profile.persona.role }}
{{ profile.persona.goals }}
Stable foundation
Source grounding · Application rules · Explicit user preferences
Reflect now reviews recent user-authored memory. It does not force a change.
{% if not writable %}Inspection only. Persona actions must be explicitly enabled by the host.
{% elif trace_read_only %}Trace editing stays disabled. Host persona actions may append their own audit traces.
{% endif %}A suggestion is waiting for your decision. Nothing changes until you approve it; select it in the activity grid to compare the change and read its evidence.
{% else %}{{ 'The reviewed conversations did not support a durable change. Your current approach stays in place.' if profile.review_state == 'no_change' else 'No suggestion is pending. When conversations support a better approach, the suggestion and its evidence appear here before anything changes.' }}
{% if profile.review_state == 'failed' %}The last reflection failed. Your approved approach is unchanged. Wait two minutes and retry.
{% endif %} {% if profile.review_state == 'reviewing' %}Reflection is running. Refresh this page to check its result.
{% endif %} {% endif %} {% if profile.daily_enabled is defined %}Check every 24 hours, only after new conversations. Suggestions always wait for approval. This is not a midnight job; busy workers may check later.
{% if profile.daily_enabled %}{{ 'Checks paused' if profile.paused else 'Awaiting your decision' if profile.pending else 'Next check no earlier than ' ~ (profile.next_daily_check_at or 'the next worker check') }}
{% endif %} {% if profile.last_daily_check_at %}Last daily check: {{ profile.last_daily_check_at }} · {{ profile.last_daily_outcome|replace('_', ' ') }}
{% endif %}| Version | Reason | By | Status | |||
|---|---|---|---|---|---|---|
| {% if row.recorded %}{{ row.recorded }}{{ row.recorded[5:] if row.recorded_at else row.recorded }}{% else %}—{% endif %} | {{ row.kind_label }} | {{ ('v' ~ row.version) if row.version is not none else '—' }} | {{ row.summary or '—' }} | {{ row.evidence_count if row.evidence_count is not none else '—' }} | {{ row.actor or '—' }} | {{ row.status_label }} |
No activity matches this filter.
Approved changes and reflection attempts, newest first. The latest {{ profile.history_limit }} changes and reflection attempts are retained. This is an adaptation history, not model training.
{{ state_panels }}