MWMS AI Work Session Persistence Standard

System: MWMS
Document Type: Standard
Status: Draft For MCR
Authority: HeadOffice
Applies To: All MWMS Brains, AI Employees, Brain Room, Dev Console, HeadOffice Intelligence, Deep Search Workflows, Research Workflows, Affiliate Evaluation, Ads Review, Content Workflows, Experimentation Brain, Future Client Facing AI Systems
Primary Location: MCR
Future Operational Destination: mwmsbrain.site, mwmsheadofficebrain.site, Brain Room, Dev Console, AI Employee Dashboards, Future Client Portals
Parent Page: HeadOffice
Source Of Truth: MCR
Related Frameworks: MWMS Agent Loop Control Framework, MWMS Next Action Picker Standard, MWMS Agent Loop Context Schema, MWMS AI Observability Metadata Standard, MWMS AI Employee Evaluation Scorecard Standard, MWMS Deep Search Quality And Observability Framework
Course Source: Matt Pocock AIhero Build DeepSearch In TypeScript
Absorption Status: Approved For Integration


Purpose

The purpose of this standard is to define how MWMS stores, resumes, reviews, and reuses AI work sessions.

An AI work session is more than a chat.

An AI work session is a recorded unit of work that may include:

  • user messages
  • AI Employee responses
  • action history
  • visible workflow steps
  • source activity
  • tool activity
  • database activity
  • annotations
  • generated title
  • workflow state
  • evidence trail
  • review status
  • final output
  • Kaizen notes

This standard ensures AI work does not disappear after a response is generated.

MWMS must treat valuable AI work as durable operational memory.


Scope

This standard applies to any MWMS system where AI performs, supports, records, analyses, or recommends work.

This includes:

  • Brain Room conversations
  • Dev Console support sessions
  • HeadOffice Intelligence reviews
  • Newsletter Intelligence processing
  • Research Brain investigations
  • Affiliate Brain offer evaluations
  • Ads Brain compliance reviews
  • Content Brain research sessions
  • Data Brain validation workflows
  • Experimentation Brain test analysis
  • Finance Brain cost reviews
  • Deep Search workflows
  • Agent loop workflows
  • Future client-facing AIBS sessions
  • Future AI Employee dashboards
  • Future task and workflow systems

This standard does not define exact database implementation.

It defines the MWMS governance and structure for persistent AI work sessions.


Core Rule

Every meaningful AI work session must be persistable, resumable, traceable, and reviewable.

The MWMS rule is:

AI work should not live only in temporary chat output.

If the work matters to MWMS, it must become a durable work record.


Definition Of An AI Work Session

An AI Work Session is a structured record of AI-assisted work.

It may begin from:

  • a human message
  • a Brain Room thread
  • a Dev Console question
  • an AI Employee task
  • a newsletter item
  • an offer evaluation
  • a research request
  • a source inspection workflow
  • a HeadOffice review
  • an automation trigger
  • a client-facing request

It may contain:

  • conversation history
  • action history
  • source records
  • tool actions
  • decisions
  • outputs
  • review notes
  • trace metadata
  • evaluation results
  • Kaizen learnings

The session is the durable container for the work.


Why AI Work Session Persistence Matters

Without session persistence, MWMS risks:

  • losing important context
  • repeating work
  • creating orphaned answers
  • breaking audit trails
  • losing source evidence
  • losing action history
  • making sessions hard to resume
  • making outputs hard to review
  • making AI Employees difficult to evaluate
  • making handoff between Martyn, M, and future AI Employees harder
  • making HeadOffice visibility weaker
  • turning useful AI work into disposable chat

With session persistence, MWMS gains:

  • operational memory
  • resumable workflows
  • better search and retrieval
  • stronger review process
  • better debugging
  • better Kaizen learning
  • stronger AI Employee accountability
  • better client-facing readiness
  • better HeadOffice oversight

Work Session Versus Chat

A chat is a conversation.

A work session is a business record.

ChatAI Work Session
temporary conversationdurable work record
messages onlymessages plus actions, sources, state, and outcome
hard to audittraceable
hard to resumeresumable
weak business contextlinked to Brain, task, workflow, and Employee
answer focusedoutcome and process focused
user-facing onlysystem and HeadOffice visible

MWMS must treat important AI sessions as work sessions, not casual chats.


Required Session Components

A complete AI work session should contain:

  1. Session identity
  2. Brain and AI Employee ownership
  3. User or trigger origin
  4. Message history
  5. Action history
  6. Visible step annotations
  7. Source and evidence records
  8. Tool activity
  9. Database activity
  10. Trace metadata
  11. Generated title
  12. Workflow state
  13. Final output
  14. Review status
  15. Evaluation result
  16. Kaizen note

Not every early implementation needs all fields, but the architecture should allow them.


1. Session Identity

Each AI work session needs a stable identity.

Recommended fields:

FieldDescription
session_idUnique session ID
thread_idConversation or Brain Room thread ID
task_idRelated task ID if applicable
trace_idRelated observability trace ID
loop_idRelated agent loop ID if applicable
created_atSession creation time
updated_atLast session update time
session_statusOpen, active, completed, parked, failed, archived
session_typeChat, task, research, evaluation, source review, report, support

Rule

No meaningful AI work should be stored without a stable session ID.


2. Brain And AI Employee Ownership

Each session must show which system owns the work.

Recommended fields:

FieldDescription
brain_nameBrain responsible for the session
brain_siteSite where session belongs
ai_employee_nameAI Employee handling the work
ai_employee_roleEmployee role or function
workflow_typeType of workflow
workflow_nameSpecific workflow name
source_of_truthMCR, Brain site, Supabase, WordPress, external tool
parent_systemHigher-level system or workflow

Rule

If a session cannot identify its owning Brain, it should be routed to HeadOffice review.


3. User Or Trigger Origin

Each session should record how it started.

Recommended fields:

FieldDescription
user_idUser ID where available
user_nameHuman operator name
user_roleMartyn, M, Admin, Developer, Client, AI Employee
request_originBrain Room, Dev Console, Newsletter, Task Queue, API, Client Portal
trigger_typeManual, automatic, scheduled, event-based, routed
trigger_record_idRecord that triggered the session if applicable
client_idClient account if relevant
organisation_idOrganisation if relevant

Rule

MWMS must know whether a session was started by a human, AI Employee, automation, or external trigger.


4. Message History

The full relevant message history should be preserved.

Message history may include:

  • user messages
  • AI responses
  • system messages
  • tool-visible messages
  • review comments
  • clarification messages
  • final answer messages

Recommended message fields:

FieldDescription
message_idUnique message ID
session_idParent session
roleUser, assistant, system, tool, reviewer
contentMessage text or structured content
message_partsStructured parts if available
annotationsStep notes or metadata attached to message
created_atMessage creation time
order_indexMessage order
visibilityInternal, operator-facing, client-facing
sourceHuman, AI Employee, system, tool

Rule

AI Employees should use the full relevant work session context, not only the latest instruction.


5. Message Parts

Messages may contain more than text.

A message may include:

  • plain text
  • structured output
  • source references
  • tool results
  • reasoning notes
  • step annotations
  • citations
  • screenshots
  • file references
  • JSON objects
  • decision records
  • routing records

Rule

MWMS should preserve structured message parts where they carry operational value.

Flattening everything into plain text can destroy useful system context.


6. Action History

AI Employee actions must be recorded as part of the session.

Examples of actions:

  • search
  • inspect source
  • query database
  • evaluate evidence
  • generate answer
  • route
  • escalate
  • create task
  • update record
  • request human review
  • park
  • reject
  • stop

Recommended action fields:

FieldDescription
action_idUnique action ID
session_idParent session
step_numberAction step
action_typeSearch, inspect_source, answer, route, escalate, etc.
action_reasonWhy the action was chosen
action_statusPending, completed, failed, skipped
tool_usedTool used if applicable
input_summaryWhat was passed into the action
output_summaryWhat came back
cost_estimateEstimated cost
latency_msAction time
failure_reasonFailure if applicable
used_in_final_outputYes or no

Rule

The action trail is part of the work session, not separate background noise.


7. Visible Step Annotations

Visible step annotations are human-readable notes showing what the AI Employee is doing.

Examples:

  • Understanding request
  • Searching external sources
  • Inspecting official source
  • Checking internal records
  • Evaluating evidence
  • Preparing final answer
  • Routing to Affiliate Brain
  • Human review required

Annotations help operators understand progress while work is happening.

Recommended annotation fields:

FieldDescription
annotation_idUnique annotation ID
session_idParent session
action_idRelated action if applicable
labelShort visible step label
descriptionOptional detail
statusPending, active, complete, failed
created_atTime created
visibilityInternal, operator-facing, client-facing

Rule

AI Employee loops should not appear as silent loading states when meaningful work is happening.


8. Source And Evidence Records

Research sessions must preserve source and evidence context.

Recommended fields:

FieldDescription
source_idsStored source records
source_urlsURLs used
source_titlesSource titles
inspected_source_countNumber of sources inspected
evidence_summarySummary of evidence gathered
evidence_sufficiencyWeak, acceptable, strong
source_trust_ratingLow, medium, high
source_freshness_ratingOutdated, acceptable, current, unknown
conflicting_sources_detectedYes or no
source_used_in_final_outputYes or no

Rule

If sources helped produce the answer, the session should preserve which sources mattered and why.


9. Tool Activity

Tool activity should be connected to the work session.

Recommended fields:

FieldDescription
tool_nameName of tool
tool_typeSearch, scraper, database, file, email, analytics, etc.
tool_input_summarySummary of input
tool_output_summarySummary of result
tool_statusCompleted, failed, skipped
tool_errorError if failed
tool_latency_msTool execution time
tool_cost_estimateTool cost if available
tool_result_usedWhether result affected final output

Rule

Tool actions should not disappear after the final answer is generated.


10. Database Activity

Database activity should be visible where relevant.

Recommended fields:

FieldDescription
records_readInternal records read
records_writtenInternal records created
records_updatedInternal records updated
records_failedFailed DB actions
parent_record_idParent entity
output_record_idSaved output
db_operation_statusSuccessful, partial, failed
db_error_summaryError if any
duplicate_detectedYes or no

Rule

A session is not fully successful if required backend persistence fails.


11. Generated Session Titles

AI work sessions should receive meaningful, stable, human-readable titles.

Bad titles:

  • first 50 characters of message
  • Untitled Chat
  • New Conversation
  • Help please
  • Question

Better titles:

  • Affiliate Offer Evaluation For Aqua Tower
  • Google Ads Policy Check For Health Claims
  • Research Session On AI Tool Pricing
  • Newsletter Signal Review For HeadOffice
  • Dev Console Support For Supabase Connector
  • Deep Search Source Review For Vendor Page

Recommended title fields:

FieldDescription
generated_titleAI-generated title
title_sourceAI generated, user edited, system generated
title_confidenceConfidence in title
title_lockedWhether user/system locked the title
title_updated_atLast title update

Rule

AI-generated titles should summarise the work session, not merely repeat the first message.


12. Workflow State

A session should store its workflow state.

Suggested statuses:

StatusMeaning
openSession exists but work not complete
activeWork is currently happening
waiting_for_userNeeds user input
waiting_for_reviewNeeds human review
routedSent to another Brain or Employee
parkedPaused for later
completedFinal output exists
failedCould not complete
archivedClosed for historical reference

Rule

MWMS should be able to tell whether a session is still active, completed, parked, failed, or waiting for review.


13. Final Output

Each meaningful session should identify its final output.

Recommended fields:

FieldDescription
final_output_createdYes or no
final_output_typeAnswer, report, recommendation, task, route, decision, page draft
final_output_locationWhere output is stored
final_answer_summaryShort summary
final_confidenceConfidence score
final_limitationsLimitations
final_decisionProceed, reject, park, route, test, monitor, escalate
final_next_actionRecommended next action

Rule

A session should not be considered complete unless the final output is stored or the reason for no output is recorded.


14. Review Status

Sessions may require human review.

Recommended fields:

FieldDescription
human_review_requiredYes or no
review_reasonWhy review is needed
reviewed_byReviewer name
reviewed_atReview time
review_statusPending, approved, rejected, needs revision
review_notesHuman review notes
approval_statusApproved, blocked, pending

Rule

Review status must be part of the work session, not only a separate comment or memory.


15. Evaluation Result

Sessions may include evaluation results.

Recommended fields:

FieldDescription
evaluation_requiredYes or no
evaluation_scoreScorecard result
factuality_scoreFactuality score
relevancy_scoreRelevancy score
source_quality_scoreSource score
safety_scoreSafety score
traceability_scoreTraceability score
regression_case_createdYes or no
failure_reasonWhy eval failed if applicable

Rule

If a session reveals a quality issue, it should be eligible to become an eval or regression case.


16. Kaizen Note

Every valuable session should support improvement.

Recommended fields:

FieldDescription
kaizen_noteImprovement note
improvement_categoryPrompt, tool, source, workflow, UI, evaluation, data, cost
improvement_priorityLow, medium, high
recommended_follow_upSuggested improvement
added_to_regressionYes or no
routed_for_improvementDestination Brain or system

Rule

A completed AI work session should not only answer the task.

It should also help MWMS improve when possible.


Session Resume Rule

An AI work session should be resumable.

To resume properly, the system should preserve:

  • original request
  • message history
  • current workflow state
  • action history
  • evidence summary
  • source IDs
  • final or partial output
  • pending review status
  • next action
  • unresolved issues
  • Kaizen notes

A resumed session should not require the human to restate everything.


Session Search And Retrieval Rule

Persistent sessions should be searchable.

Searchable fields should include:

  • generated title
  • Brain
  • AI Employee
  • workflow type
  • user
  • session status
  • source URLs
  • final output summary
  • tags
  • created date
  • updated date
  • decision outcome
  • review status
  • Kaizen category

MWMS should be able to find old AI work sessions quickly.


Session Title Quality Rule

A good generated title should be:

  • short
  • specific
  • stable
  • human-readable
  • related to the work objective
  • useful in a list view
  • not overly clever
  • not generic
  • not misleading

Preferred title pattern:

[Workflow Type] For [Subject]

Examples:

  • Source Review For Google Ads Health Policy
  • Offer Evaluation For Aqua Tower
  • Deep Search Session For AI Tool Pricing
  • Dev Console Support For Brain Room Error
  • Newsletter Routing Review For AI Compliance Signal

Session Ownership Rule

Every session should have one primary owner.

Ownership may belong to:

  • a Brain
  • an AI Employee
  • a human operator
  • a task
  • a client account
  • a workflow
  • HeadOffice

Ownership prevents orphaned sessions.

If ownership is unclear, route to HeadOffice.


Session Visibility Rule

Not all session data should be visible to every user.

Visibility levels may include:

LevelMeaning
internal_systemsystem only
head_officeHeadOffice review
operatorMartyn, M, approved internal users
client_visibleclient-facing
developertechnical/debugging view
archivedhistorical reference

Rule

MWMS should separate internal traces from user-facing session content.


Session Privacy And Security Rule

Persistent sessions must not expose unnecessary sensitive information.

Avoid storing raw:

  • API keys
  • passwords
  • private credentials
  • payment details
  • private personal data
  • confidential client details beyond what is needed

Where possible, store:

  • IDs instead of raw secrets
  • summaries instead of full sensitive text
  • redacted values
  • permission-controlled records

Persistence should strengthen MWMS memory without creating security risk.


Work Session Lifecycle

Suggested lifecycle:

  1. Session created
  2. Title assigned or generated
  3. Message received
  4. AI Employee assigned
  5. Context loaded
  6. Actions performed
  7. Annotations recorded
  8. Sources or records attached
  9. Final output generated
  10. Backend persistence confirmed
  11. Review or routing completed
  12. Evaluation or Kaizen captured
  13. Session completed, parked, routed, or archived

Minimum Starting Implementation

MWMS does not need to implement every field immediately.

The first practical implementation should capture:

  • session ID
  • thread ID or task ID
  • Brain
  • AI Employee where applicable
  • generated title
  • message history
  • action history
  • visible step annotations
  • final output
  • status
  • review status
  • trace ID where available
  • Kaizen note where useful

This is enough to begin turning AI work into durable system memory.


Recommended Conceptual Session Record

{
"session_id": "",
"thread_id": "",
"task_id": "",
"trace_id": "",
"loop_id": "",
"created_at": "",
"updated_at": "",
"session_status": "",
"session_type": "",
"generated_title": "",
"title_source": "",
"brain_name": "",
"brain_site": "",
"ai_employee_name": "",
"workflow_type": "",
"workflow_name": "",
"user_name": "",
"user_role": "",
"request_origin": "",
"trigger_type": "",
"message_history": [],
"action_history": [],
"annotations": [],
"source_ids": [],
"evidence_summary": "",
"tools_used": [],
"records_read": [],
"records_written": [],
"final_output_created": false,
"final_output_type": "",
"final_output_location": "",
"final_answer_summary": "",
"final_confidence": 0,
"final_decision": "",
"human_review_required": false,
"review_status": "",
"evaluation_score": 0,
"failure_reason": "",
"kaizen_note": "",
"visibility": ""
}

This is a conceptual schema only.

Exact implementation can be adapted by M or future developers.


Relationship To Agent Loop Context

The Agent Loop Context describes the live working state of the loop.

The AI Work Session is the durable parent record that stores the overall work.

Relationship:

Agent Loop ContextAI Work Session
active working memorydurable session record
used during loop executionused for storage, review, and resume
step-by-step statefull work session container
may be compactedshould remain searchable and recoverable
controls current actionpreserves final record

Both are needed.


Relationship To Observability Metadata

Observability metadata explains what happened technically and operationally.

AI Work Session Persistence stores the human and workflow-facing work record.

Together they answer:

  • what happened
  • who did it
  • where it belongs
  • what was said
  • what actions occurred
  • what sources were used
  • what result was produced
  • whether it can be reviewed or resumed

Relationship To Evaluation Scorecards

Evaluation scorecards judge AI Employee quality.

Persistent sessions provide the raw material for evaluation.

A weak session can become:

  • an eval case
  • a regression case
  • a Kaizen note
  • a prompt improvement
  • a workflow improvement
  • a tool improvement

Without session persistence, MWMS loses the data needed to improve AI Employees.


Relationship To Brain Room

Brain Room should eventually treat conversations as AI work sessions when they involve meaningful work.

Brain Room sessions should preserve:

  • thread title
  • message history
  • task linkage
  • AI replies
  • action steps
  • decisions
  • final outputs
  • review state
  • Kaizen notes

This makes Brain Room a durable collaboration space, not just a chat interface.


Relationship To Dev Console

Dev Console sessions should preserve:

  • developer question
  • AI answer
  • related file or system
  • suggested action
  • final decision
  • whether code was changed
  • whether issue was resolved
  • Kaizen note if the problem reveals system weakness

This helps M and future developers avoid repeating troubleshooting work.


Relationship To HeadOffice Intelligence

HeadOffice Intelligence sessions should preserve:

  • newsletter or signal source
  • extracted insight
  • action trail
  • Brain routing
  • decision status
  • review status
  • final routed action
  • evidence or source notes
  • Kaizen note

This improves intelligence continuity.


Relationship To Future Client Systems

Future client-facing AI sessions should preserve:

  • client account
  • user request
  • AI response
  • visible steps appropriate for client
  • final recommendation
  • review state where needed
  • privacy controls
  • support handoff notes

Client-facing sessions may need stricter visibility and privacy rules.


Drift Protection

This standard prevents the following drift:

  • AI work disappearing after response
  • useful sessions becoming impossible to find
  • work being repeated unnecessarily
  • messages saved without actions
  • actions saved without final output
  • final output saved without context
  • sessions with no owner
  • sessions with no title
  • AI Employee steps hidden from humans
  • review notes detached from the session
  • evaluation cases being lost
  • Kaizen learning disappearing
  • Brain Room becoming disposable chat instead of operational memory

If the session matters, persist it.


Architectural Intent

The architectural intent of this standard is to make AI work durable.

MWMS is not building a collection of temporary AI chats.

MWMS is building an operating system where AI Employees perform work that can be:

  • resumed
  • searched
  • reviewed
  • audited
  • evaluated
  • improved
  • routed
  • reused

The AI Work Session is the durable container for that work.

This turns AI conversations into operational assets.


Change Log

v1.0 Initial Draft

Created the MWMS AI Work Session Persistence Standard based on absorbed insights from Matt Pocock AIhero Build DeepSearch In TypeScript.

Integrated principles from course blocks covering:

  • telemetry repair after workflow changes
  • passing full message history
  • backend persistence of new agent loop setup
  • preserving message parts and annotations
  • storing visible workflow steps
  • generating meaningful chat titles
  • session resumability
  • durable AI work records
  • trace linkage
  • action history
  • review status
  • evaluation and Kaizen reuse

Established this standard as the MWMS governance page for turning AI conversations into durable, searchable, reviewable, and reusable AI work sessions.