Execution Memory
Execution Memory is the core Aionis product surface. It lets long-running Agents continue work across sessions, roles, and compaction boundaries without treating every related historical note as a valid instruction.
execution events -> state adjudication -> active path + blocked branches + reusable procedureAionis turns actions, observations, validation results, handoffs, and feedback into governed execution state.
If a strong planner has already resolved the route, Aionis can also preserve that plan as an execution memory asset. See Plan as Memory Asset.
What It Solves
Agent systems lose execution state in predictable ways:
| Problem | Aionis behavior |
|---|---|
| A new session forgets the accepted route | Compile the current active path into use_now. |
| A failed branch remains semantically relevant | Keep it visible as governed counter-evidence. |
| A handoff summary drops validator evidence | Preserve raw evidence with rehydrate pointers. |
| A useful workflow is buried in old traces | Project repeated successful paths into procedure memory. |
| A reviewer needs to know why a route is blocked | Return an auditable decision trace and receipt. |
The result is a smaller, safer Agent context that carries the state needed to act.
Execution State Model
Aionis distinguishes execution memory from ordinary facts and preferences.
| State | Meaning | Prompt posture |
|---|---|---|
| Current active path | The accepted route for the next step. | use_now |
| Passed solution | Evidence that a route or procedure worked. | use_now or procedure candidate |
| Failed branch | A route that was tried and rejected. | do_not_use or inspect_before_use |
| Contested memory | Conflicting or uncertain execution evidence. | inspect_before_use |
| Raw evidence | Too large or too detailed for the prompt. | rehydrate |
| Reusable procedure | A workflow distilled from validated traces. | Procedure context |
This is the main difference from recall memory: semantic similarity can make a failed path look relevant, but Aionis still prevents it from becoming the Agent’s next instruction.
Runtime Loop
observe -> guide -> agent action -> feedback -> measure -> snapshot1. Observe Execution Evidence
Record what happened as execution evidence:
await aionis.execution.observeStep({
agent_id: "worker-1",
team_id: "checkout-team",
role: "worker",
run_id: "run-20250615-001",
task_signature: "checkout-migration",
title: "Legacy adapter rejected",
summary: "Verifier rejected the legacy route because it changed unrelated modules.",
outcome: "failed",
target_files: ["src/checkout/legacyAdapter.ts"],
});Then record the accepted continuation:
await aionis.execution.observeStep({
agent_id: "reviewer-1",
team_id: "checkout-team",
role: "reviewer",
run_id: "run-20250615-001",
task_signature: "checkout-migration",
title: "Continue adapter migration",
summary: "Continue the accepted adapter migration path; do not extend the legacy adapter.",
outcome: "succeeded",
target_files: ["src/checkout/adapter.ts"],
});2. Guide The Next Agent Turn
Ask Aionis to compile execution state for the next Agent:
import {
agentPromptFromGuide,
feedbackFromGuide,
} from "@aionis/sdk";
const guide = await aionis.execution.guideForRole({
agent_id: "worker-2",
team_id: "checkout-team",
role: "worker",
run_id: "run-20250615-002",
task_signature: "checkout-migration",
query_text: "Continue the checkout migration from the latest accepted route.",
context_mode: "compact_agent",
});
const result = await agent.run(agentPromptFromGuide(guide));The compiled context separates:
PASSED_SOLUTIONS
FAILED_BRANCHES
CURRENT_ACTIVE_PATH
REHYDRATE_IF_NEEDEDThose sections are contract surfaces. They tell the Agent what can be used now, what should be avoided as a route, and when raw evidence should be expanded.
3. Attribute Feedback
After the Agent acts, send outcome feedback against the guide trace:
const usedMemoryIds = result.usedMemoryIds ?? [];
if (usedMemoryIds.length > 0) {
await aionis.feedback(feedbackFromGuide({
guide,
run_id: "run-20250615-002",
outcome: "positive",
reason: "The worker continued the accepted adapter path and avoided the legacy branch.",
used_memory_ids: usedMemoryIds,
used_surface: "use_now",
actor: "reviewer-1",
}));
}This is what makes Execution Memory compound. Aionis learns which admitted memories helped, which suppressed memories prevented harm, and which procedures deserve more authority later.
Trace-Derived Skill Candidates
Measured execution traces can also become trace_derived_skill candidates in
effect_report.training_candidates.
This is the Aionis version of trace-to-skill learning:
Agent trace -> feedback attribution -> measure -> skill candidate -> review -> promotion gate| Trace evidence | Candidate field |
|---|---|
| Positive continuity or workflow-reuse effect | candidate_type: "trace_derived_skill" |
| Task and workflow shape | applies_when |
| Scope mismatch, contested state, or regressions | does_not_apply_when |
| Reusable execution steps | procedure_steps |
| Validation requirements | acceptance_checks |
| Failed or demoted history | failure_counterexamples |
The candidate is deliberately not an instruction:
agent_prompt_included: false
runtime_mutation: false
authority_state: candidate
required_gate: admission_and_promotion_gateUse it for review queues, dashboards, and later procedure promotion. Do not send the candidate payload directly to an Agent as if it were current route state.
For SDK users, the normal path is:
const measure = await aionis.measure(measureInputFromGuideLoop({
task,
after_guide: guide,
feedback_result: feedback,
sufficient_evidence: true
}));
const reviewItems = traceDerivedSkillReviewItemsFromMeasure(measure);Each review item carries skill_name, applies_when, procedure_steps,
acceptance_checks, evidence_refs, and a safety block that keeps the
candidate out of the Agent prompt until a later promotion path admits it.
Multi-Agent Handoff
Execution Memory is strongest when a task moves between roles:
| Role | Writes | Reads |
|---|---|---|
| Planner | Branch strategy and success criteria. | Prior procedures and scope constraints. |
| Worker | Attempts, tool outcomes, implementation evidence. | Current active path and blocked routes. |
| Verifier | Test output, rejection reasons, acceptance evidence. | Candidate route evidence. |
| Reviewer | Handoff, final outcome, attribution. | Passed solutions, failed branches, active path. |
Each role can write scoped evidence. Aionis compiles the part that is safe and useful for the next role instead of asking every Agent to reread the full history.
Where Memory Firewall Fits
Memory Firewall is the lowest-friction way to adopt Aionis governance when your memory already lives in Mem0, Zep, Pinecone, markdown, or another store.
Use Execution Memory when Aionis is the runtime recording and adjudicating the task history. Use Memory Firewall when Aionis is governing memory candidates produced by another backend.
Both surfaces share the same principle: related memory becomes governed state before it influences action.
Run It Locally
Run the multi-agent quickstart:
npm run -s runtime:quickstart:multi-agentRun the host-template e2e:
npm run -s runtime:e2e:multi-agent-host-templateRelated docs: