add_short_term_memory
Store recent conversation messages as short-term memory entries that are indexed by keywords and scored for relevance over time to maintain context awareness.
Instructions
Add a new short-term memory entry from recent conversation messages. The memory will be indexed by keywords and scored based on relevance over time.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| messages | Yes | ||
| conversation_id | Yes | ||
| roleWeights | No |
Input Schema (JSON Schema)
{
"properties": {
"conversation_id": {
"_def": {
"checks": [],
"coerce": false,
"description": "Unique identifier for the conversation",
"typeName": "ZodString"
},
"~standard": {
"vendor": "zod",
"version": 1
}
},
"messages": {
"_def": {
"description": "Array of recent messages to create memory from",
"exactLength": null,
"maxLength": null,
"minLength": null,
"type": {
"_cached": null,
"_def": {
"catchall": {
"_def": {
"typeName": "ZodNever"
},
"~standard": {
"vendor": "zod",
"version": 1
}
},
"typeName": "ZodObject",
"unknownKeys": "strip"
},
"~standard": {
"vendor": "zod",
"version": 1
}
},
"typeName": "ZodArray"
},
"~standard": {
"vendor": "zod",
"version": 1
}
},
"roleWeights": {
"_def": {
"description": "Optional weights for different roles when extracting keywords (default: user=2.7, assistant=2.0, system=1.0)",
"innerType": {
"_cached": null,
"_def": {
"catchall": {
"_def": {
"typeName": "ZodNever"
},
"~standard": {
"vendor": "zod",
"version": 1
}
},
"typeName": "ZodObject",
"unknownKeys": "strip"
},
"~standard": {
"vendor": "zod",
"version": 1
}
},
"typeName": "ZodOptional"
},
"~standard": {
"vendor": "zod",
"version": 1
}
}
},
"required": [
"messages",
"conversation_id"
],
"type": "object"
}