Practical tips to cut agent memory costs on OpenAI: cache TTL, Flex, fewer calls
gabrielchua · x · 2026-11-17
nedswaney shares practical cost-saving tips for running memory systems on OpenAI:
- Use a 12-hour cache TTL: handy for cron-driven "dreaming" agents over past sessions; keep shared instructions and tool definitions at the start of the prompt. Cache writes cost 2.5× normal input rates but pay off over time.
- Use Flex: memory tasks aren't latency-sensitive; Flex cuts token prices by 50% on supported models.
- Factor in what memory saves: an agent that remembers which tool worked and what it needs from results can skip calls and pull less context—better answers, faster responses, lower overall cost.
An accompanying diagram shows the memory architecture: scratchpad for in-session working notes, and a Dreamer component that finds patterns across sessions, merges notes, dedupes, and flags stale memories into long-term memory.
More from coding & agent
- Agent Substrate: open-source zero-trust runtime suspends idle agents, fits 10x more per hardware — Saboo_Shubham_ · 2026-11-17
- ChatGPT Wallet solves secure payment, not buying the right thing — krishnan · 2026-11-17
- Grok bot phones a store and secures a $1,511 refund for its user — elonmusk · 2026-11-17
- 10 open-source repos to build an entire AI content factory solo — aftahi_ai · 2026-11-17
- What 4 calibration papers do (and don't) say about gating agent tool calls on model confidence — Xjjjjyn · 2026-11-17
- Open-source 3D tools slash game-creature modeling from $12k to a prompt — ID_R_McGregor · 2026-11-17