pre_turn
Loads relevant past context from long-term associative memory in one shot before replying, enabling informed responses without manual context injection.
Instructions
MEMORY LOOP — STEP 1 (before replying). Call this FIRST on any substantive turn to load relevant past context in one shot (status + get_context in compact form). Fold what it returns silently into your answer; do not announce it. Then reply, then call store_turn (step 2). Skip only on trivial turns or when the graph is empty. Ideal for clients without automatic context-injection hooks.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"topic": "<topic>"
},
"name": "pre_turn"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | Current topic or question to fetch context for | |
| keywords | No | Additional keywords to broaden context search | |
| max_tokens | No | Max tokens for context output (default 200) |