Agent Control

Memory

BaseLLM stores conversation history, summarizes long conversations, and gives the model the user's recent days and the project's approved rules. Session, daily and project memory, plus two caches, are enabled per project.

Session, daily and project memory

MemoryWhat it doesDefault / range
SessionKeeps history; summarizes long conversationsLast 6 messages (2–50); 30 days (1–365)
DailySummarizes the user's recent days, once a dayLast 7 days (1–30); 1,000 tokens
ProjectItems an admin has approved and published2,000 tokens; up to 10 suggestions a day
# Request (1–128 characters)
X-FFM-Session: <session-id>
# Response
X-FFM-Memory: session=continued; summarized=14; kept=6
X-FFM-Cache: SHADOW

Caches

Response cache modeBehavior
OffEvery request goes to the model
Shadow (default)The request goes to the model; potential savings are logged
OnRepeated requests are served from the cache at zero cost

The response cache applies only to identical requests with a temperature of 0. Retention ranges from 5 minutes to 7 days; the default is 1 hour. The X-FFM-Cache header carries HIT, MISS, SHADOW or BYPASS.

For provider prompt caching, the cached token count is read from OpenAI, Anthropic, Gemini, OpenRouter and vLLM, and reflected in the budget. BaseLLM adds the cache marker to Claude requests itself, so your application doesn't need any changes.

Measurements and personal data safeguards

MeasurementResultConditions
Prompt cache savingsgpt-5-mini 77%; Claude Haiku 4.5 89%Real provider, repeated prompt
Cache hit rate with memoryClaude 99.3%; OpenAI 97.9%Real provider, 4-turn conversation
Response cache hitp50 ~0.5 ms; p99 ~1.8 msTest environment
Session memory, 56 messagesp50 1.0 msTest environment
  • No raw personal data is written to Redis; text is masked and values are encrypted
  • With protection off, nothing is written to Redis
  • If a response contains personal data, the response cache doesn't store it
  • If Redis is unreachable, requests still go through