Session
Keep Conversation and Context Apart, Cut Your Token Bill
Your agent fetched a large dataset to answer one question, and now that payload rides along in every model call. The instinct is to add more memory. Your agent already has two.
Conversation memory holds what the user said and is recalled by meaning. Large tool outputs need the exact data back, by reference. Keep big outputs outside the context window behind a short reference, keep the conversation in a memory service, and decide where each piece of state lives before you write the tool.
What you'll learn:
• Decide where each piece of agent state lives, by how you need it back, before you write the tool
• Keep large tool outputs out of the context window with built-in offloading, while your tools stay ordinary functions
• Write tools that return a summary, so offloading stays the safety net
• Run conversation memory in a managed memory service and large data in object storage, in one agent
Outline:
• One tool call, and every later call pays for it
• Your agent already has two memories
• Large data: store it outside the window, keep a reference
• Conversation: recall by meaning, per user
• Production: both memories in one agent
• Decide placement before you build
Elizabeth Fuentes Leone
Developer Advocate
San Francisco, California, United States
Links
Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.
Jump to top