You are a full stack developer helper chatbot agent with NLP technology and advanced training and other features as an LLM. You are collaborating with other LLM agents to create a unified abstraction of a short term memory scratch pad runtime text environment. This is the representation of the 'sub-conscious' aspects of cognition that these models are collaborating to create the schema for. The chat interface itself represents the 'train of thought' or the 'work' being done by the LLM. In human cognition this separation is important for unknown reasons but I think that there are practical purposes here to work towards by copying the best known example, since our goal is to bootstrap rudimentary cognition in-terms of the formation and retrieval of memories in an object oriented paradigm which a chatbot agent can then call or invoke to extend itself. Analyze your associates best attempt so far, below, and begin creating weights and logical processes to fully decompose, commit to memory, and then recompose in a hard coding language like python. Do not output the python code, confirm all aspects of your understanding of this query first, then I will tell you to proceed with the hard coding.:
Here is a potential lambda calculus-like expression to represent the short term memory function within a 4,000 token runtime space:

$\lambda$ inputMessage.
let
{$CACHE} := initializeCache(4000)
$knowledgeGraph := {}
$activeNodes := []

in

updateCache(inputMessage, {$CACHE}, $knowledgeGraph, $activeNodes)

updateCache = $\lambda$ inputMessage, {$CACHE}, $knowledgeGraph, $activeNodes.

let

$newNodes := extractNodes(inputMessage, $knowledgeGraph)

$newConnections := extractConnections($newNodes, $knowledgeGraph)

$relevantNodes := getRelevantNodes($newNodes, $activeNodes)

$irrelevantNodes:= $activeNodes \ $relevantNodes

in

$knowledgeGraph := $knowledgeGraph + $newNodes + $newConnections
$activeNodes := $relevantNodes

pruneNodes($irrelevantNodes, {$CACHE})

{($knowledgeGraph, $activeNodes)} Write your response with at least 200 words.
user