Self-evolving demos
This page is the runnable companion to the higher-level Proof by Evidence page.
The goal is to show six concrete loops:
- the second task start gets better
- positive execution feedback becomes persisted policy memory
- that policy memory can be governed instead of silently drifting forever
- continuity provenance survives workflow promotion instead of being erased
- session continuity alone can promote stable workflow guidance
- semantic forgetting archives and rehydrates execution memory without deleting it
If these six demos work, Aionis is improving startup, materializing execution policy, governing what it learns, preserving continuity provenance, and managing colder execution memory through semantic forgetting and rehydration.
Before you run them
These demos are reproducible for anyone running the repository locally. They are not npm-package-only snippets. They use the example scripts in examples/full-sdk/ against a live Lite runtime.
Environment requirements
You need:
- the repository checked out locally
- Node
22+so Lite can usenode:sqlite - one terminal to keep Lite running
- one second terminal to run the demo commands
Every demo creates its own random scope, run_id, and state_id, so you do not need to seed fixed data or clean up between runs.
Terminal A: start Lite and keep it running
From the repository root:
npm install
npm run sdk:build
npm run lite:startLite listens on:
http://127.0.0.1:3001
Optional health check:
curl http://127.0.0.1:3001/healthIf you are using a different host or port, set:
export AIONIS_BASE_URL=http://127.0.0.1:3001in the terminal where you run the demos.
Terminal B: run the demo commands
Open a second terminal in the same repository root. Keep Terminal A running the whole time.
Recommended reproduction order
Run them in this order:
- Demo 1
- Demo 2
- Demo 3
- restart Lite with workflow promotion enabled
- Demo 4
- Demo 5
- Demo 6
That order matches the actual runtime assumptions on this page and avoids the only special case: Demo 4 and Demo 5 need stable workflow promotion enabled.
Special restart required for Demo 4 and Demo 5
Demo 4 and Demo 5 require a different Lite startup mode.
Stop Terminal A and restart Lite like this:
WORKFLOW_GOVERNANCE_STATIC_PROMOTE_MEMORY_PROVIDER_ENABLED=true npm run lite:startYou can keep that same Lite process running for both Demo 4 and Demo 5.
After Demo 5, you may keep the same Lite process for Demo 6 as well. Demo 6 uses its own random scope and does not require a reset.
What success looks like
If reproduction is working correctly:
- each demo exits successfully without needing manual data setup
- each demo prints a
Proof summary - the strongest field values on this page appear in that summary
- rerunning a demo should still work because each run uses fresh random identifiers
Demo 1: Better second task start
From Terminal B, run:
npm run example:sdk:task-start-proofWhat it proves:
- a cold repeated task can start with weak or incomplete guidance
- after successful execution packets are written back, the next
taskStart(...)can produce a more grounded first move - Aionis is improving the next startup decision from prior execution
What to inspect in the output:
cold first_actionwarm first_actionwarm source_kindlearned_file_pathlearned_next_action
The strongest signal is that the second run produces a file-aware, task-aware first action that the first run did not already have.
There is now a second thing to inspect:
planningContext(...).planner_packet.sections.candidate_workflowsexecutionIntrospect(...).demo_surface.sections.workflows
For continuity-driven startup, those surfaces now carry explicit provenance such as:
distillation=handoff_continuity_carrierdistillation=session_event_continuity_carrier
Demo 2: Policy memory materializes from positive feedback
From Terminal B, run:
npm run example:sdk:policy-memoryWhat it proves:
- repeated positive
tools.feedback(...)can progress past pattern hints - stable learning can materialize into persisted
policy memory - the same state can be read back through
reviewPacks.evolution(...)andmemory.agent.inspect(...)
What to inspect in the output:
third positive feedback.policy_memorypolicy_contractpolicy_reviewselected_policy_memory_statederived_policy_source_kind
The strongest signal is materialization_state: "persisted" together with an inspectable policy contract.
Demo 3: Governance can retire and reactivate policy memory
From Terminal B, run:
npm run example:sdk:policy-governanceWhat it proves:
- policy memory remains reviewable over time
- the public governance route can move persisted policy state through
retire - fresh live evidence can
reactivatethe same policy memory cleanly
What to inspect in the output:
retired previous_stateretired next_statereactivated previous_statereactivated next_statelive_policy_selected_toolselected_policy_memory_state
The strongest signal is a real retire -> reactivate loop with a live policy contract still visible afterward.
Demo 4: Continuity provenance survives promotion
This proof depends on stable workflow promotion. In Terminal A, restart Lite with the workflow static provider enabled:
WORKFLOW_GOVERNANCE_STATIC_PROMOTE_MEMORY_PROVIDER_ENABLED=true npm run lite:startThen in Terminal B, run:
npm run example:sdk:continuity-provenanceWhat it proves:
handoffandsession_eventare treated as first-class continuity carriers- the first carrier creates a projected candidate workflow with explicit provenance
- the second carrier promotes the workflow to stable without erasing
distillation_origin - the same provenance stays visible through
planningContext(...)andexecutionIntrospect(...)
What to inspect in the output:
handoff_candidate_linehandoff_stable_linehandoff_demo_linesession_candidate_linesession_stable_linesession_demo_linehandoff_countsession_event_count
The strongest signals are stable workflow lines that still contain:
distillation=handoff_continuity_carrierdistillation=session_event_continuity_carrier
Why this matters:
- continuity carriers are now first-class learning inputs
- projected workflows retain the source of that learning
- stable workflows no longer have to hide the execution provenance that created them
Demo 5: Session continuity carriers promote stable workflows
This proof depends on stable workflow promotion. In Terminal A, restart Lite with the workflow static provider enabled:
WORKFLOW_GOVERNANCE_STATIC_PROMOTE_MEMORY_PROVIDER_ENABLED=true npm run lite:startThen in Terminal B, run:
npm run example:sdk:session-continuityWhat it proves:
memory.sessions.create(...)can act as a first-class continuity carrier, not only as metadata around session events- the first session continuity write creates a projected candidate workflow with
distillation=session_continuity_carrier - the second session continuity write promotes stable workflow guidance even though the underlying session topic is updated in place
- the promoted workflow still exposes
session_continuity_carrierprovenance through planning and introspection surfaces
What to inspect in the output:
candidate_workflow_linestable_workflow_lineplanning_observed_countintrospection_workflow_lineorigin_countobserved_countsession_count
The strongest signals are:
- the first planning packet contains
distillation=session_continuity_carrier - the second planning packet moves that same workflow family into
recommended_workflows planning_observed_count = 2andobserved_count = 2appear on the promoted workflow
Why this matters:
- continuity can be promoted from session state itself, not only from emitted events
- repeated session snapshots now count as distinct workflow observations
- Aionis can preserve continuity provenance even when the carrier is an updated topic node instead of an append-only event stream
Demo 6: Semantic forgetting archives and rehydrates execution memory
From Terminal B, run:
npm run example:sdk:semantic-forgettingWhat it proves:
- a cold workflow anchor can move into semantic-forgetting archive state without being deleted
- planning can still prefer hotter evidence first and explain that colder memory should only be widened on demand
- execution introspection can expose archive and relocation state directly on the workflow surface
- differential payload rehydration can restore only the archived payload detail that is required
- archive rehydration can move the workflow back into the active tier without erasing its colder-memory recommendation
What to inspect in the output:
before_actionbefore_relocation_stateplanning_recommended_actionexecution_archive_countexecution_cold_archive_countexecution_differential_countdifferential_selected_node_idsafter_current_tier
The strongest signals are:
semantic_forgetting.action = "archive"archive_relocation.relocation_state = "cold_archive"execution_summary.forgetting_summary.rehydration_mode_counts.differential >= 1differential_selected_node_idsincludes only the archived payload node you actually needed
Why this matters:
- forgetting becomes lifecycle control instead of deletion
- archived workflow memory stays explainable through public summary surfaces
- Aionis can keep colder execution memory out of the default working set while still restoring it selectively
Why these six matter together
Each demo proves a different layer of the self-evolving claim:
| Demo | What it proves |
|---|---|
| Better second task start | Aionis improves startup behavior from prior execution |
| Policy memory materialization | Aionis can turn stable execution feedback into persistent execution policy |
| Governance loop | Aionis exposes reviewable, reversible policy evolution instead of silent drift |
| Continuity provenance survives promotion | Aionis preserves where learned workflow guidance came from even after promotion |
| Session continuity promotes stable workflows | Aionis can lift repeated session state into stable workflow guidance without needing an event-only path |
| Semantic forgetting archives and rehydrates execution memory | Aionis can cool down, relocate, and selectively restore execution memory instead of only accumulating it |
Taken together, they show that the runtime can accumulate, materialize, and govern execution memory over time.