Files
krowworkforce_controltower/base44/entities/OperationalMemory.jsonc
2026-08-17 19:45:29 +05:30

184 lines
4.9 KiB
JSON

{
"name": "OperationalMemory",
"type": "object",
"properties": {
"memory_id": {
"type": "string",
"description": "Unique memory identifier (MEM-timestamp-random)"
},
"trigger_event_id": {
"type": "string",
"description": "ID of the WorkforceEvent that triggered this memory"
},
"trigger_event_type": {
"type": "string",
"description": "Type of the triggering event"
},
"context_snapshot": {
"type": "object",
"description": "Graph state at decision time \u2014 entities, relationships, metrics",
"additionalProperties": true
},
"decision": {
"type": "object",
"description": "The AI's decision/recommendation",
"properties": {
"prediction": {
"type": "string"
},
"recommendation": {
"type": "string"
},
"confidence_score": {
"type": "number",
"minimum": 0,
"maximum": 100
},
"proposed_actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"action_type": {
"type": "string"
},
"description": {
"type": "string"
},
"target_entity_type": {
"type": "string"
},
"target_entity_id": {
"type": "string"
},
"auto_execute": {
"type": "boolean",
"default": false
},
"executed": {
"type": "boolean",
"default": false
}
}
}
}
}
},
"reasoning": {
"type": "string",
"description": "Full reasoning chain \u2014 why the AI made this decision"
},
"causal_chain": {
"type": "array",
"description": "Structured causal chain tracing WHY the outcome occurred \u2014 each factor connected to the next, ending at root cause(s)",
"items": {
"type": "object",
"properties": {
"step": {
"type": "number",
"description": "Order in the causal chain (1 = first contributing factor, last = root cause)"
},
"factor": {
"type": "string",
"description": "The contributing factor (e.g., 'Vendor A supplied fewer experienced cooks')"
},
"evidence": {
"type": "string",
"description": "Data-driven evidence supporting this factor"
},
"category": {
"type": "string",
"enum": [
"vendor",
"operations",
"workforce",
"training",
"demand",
"external",
"compliance",
"finance",
"equipment",
"transportation",
"system"
],
"description": "What area of the operation this factor belongs to"
},
"leads_to": {
"type": "string",
"description": "What this factor caused (the next link in the chain)"
}
}
}
},
"root_causes": {
"type": "array",
"description": "The root cause(s) identified at the end of the causal chain",
"items": {
"type": "string"
}
},
"similar_memories_consulted": {
"type": "array",
"description": "IDs of past memories used as reference",
"items": {
"type": "string"
}
},
"outcome": {
"type": "string",
"description": "What actually happened (filled in during outcome review)"
},
"outcome_score": {
"type": "number",
"description": "Did it work? (-100 = made things worse, 0 = no effect, 100 = helped significantly)"
},
"outcome_metrics": {
"type": "object",
"description": "Quantified outcome data (e.g., overtime_reduction_pct, cost_savings)",
"additionalProperties": true
},
"status": {
"type": "string",
"enum": [
"pending",
"executed",
"outcome_pending",
"learned",
"rejected"
],
"default": "pending"
},
"agent_name": {
"type": "string",
"description": "Which agent made this decision"
},
"department": {
"type": "string",
"enum": [
"operations",
"procurement",
"finance",
"vendor",
"compliance",
"executive"
],
"description": "Department this memory belongs to"
},
"learned_at": {
"type": "string",
"format": "date-time",
"description": "When the outcome was recorded and learning completed"
},
"tags": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"memory_id",
"trigger_event_id",
"department"
]
}