#Memory
Memory management in containerised Go services requires understanding runtime behaviour under resource constraints. Posts cover GOMEMLIMIT configuration for Kubernetes pods, GC tuning for latency-sensitive workloads, and the memory patterns that prevent OOM kills in production.
15 posts tagged with memory. ← All posts
A crew is only a real team if its members remember what happened and can hand work to each other — and CrewAI's memory and delegation features are what turn a set of independent agents into something that actually collaborates.
A crew is only a real team if its members remember what happened and can hand work to each other — memory and delegation are what turn a set of independent agents into something that actually collaborates.
A query engine answers one question in isolation; a chat engine holds a conversation. The difference is memory — and handling memory well is what separates a demo chatbot from one that stays coherent and affordable over a long dialogue.
A query engine answers one question in isolation; a chat engine holds a conversation. The difference is memory — and handling it well is what separates a demo chatbot from one that stays coherent and affordable over a long dialogue.
The pieces from this series — memory, self-refinement, a skill library, and an evaluation gate — combine into one modest architecture that actually gets better as it runs, without the hype and without the footguns.
Memory, grounded self-refinement, a verified skill library, and an evaluation gate combine into one buildable architecture that gets better as it runs — safely.
A conversation that never forgets eventually overflows, so managing what history an agent carries forward — and how it remembers across sessions — is one of the defining problems of context engineering.
A conversation that never forgets eventually overflows, so managing what history an agent carries forward — and how it remembers across sessions — is a defining problem of context engineering.
The cheapest way to make an agent evolve is to let it remember what happened and reflect on it, turning yesterday's failure into today's context.
The cheapest way to make an agent evolve is to let it remember and reflect. Reflexion's verbal learning and the Generative Agents memory stream — and how to build a modest version.
Give the hand-rolled Go agent from post 11 a memory it can carry between turns and a plan it can follow across many steps — a compacting conversation buffer, retrieval over the post-8 vector store, and a plan-then-execute-then-reflect loop, all built from scratch.
Give the agent memory and planning in Go: a compacting short-term conversation buffer, long-term memory as timestamped embeddings in the vector store, and planning — plan-then-execute, reflection and re-planning when observations contradict the plan, and task decomposition.
A complete guide to what an agent remembers — from a single conversation held in a session, to durable facts injected on every run, to the per-request values that reach a tool without ever touching the model's schema.
A complete guide to what an agent remembers — from a single conversation held in a session, to durable facts injected on every run, to the per-request values that reach a tool without ever...
Stack memory is automatic but rigid — sized at compile time and gone when a function returns. For data whose size you only know at runtime, or that must outlive the function that created it, C gives you the heap and four functions to manage it: `malloc`, `calloc`, `realloc`, and `free`. With that power comes C's heaviest responsibility: every allocation you make, you must free — exactly once, and never use again.
Stack memory is automatic but rigid. For data whose size you only know at runtime, or that must outlive its function, C gives you the heap and four functions: malloc, calloc, realloc, and free. With that power comes C's heaviest responsibility: every allocation you make, you must free — exactly once, and never use again.
Arrays and strings in C are where the pointer model from the last post becomes concrete — and where C's most infamous security bugs live. An array is a contiguous block of memory whose name decays to a pointer; a string is just an array of characters with a null terminator and no length field. Understanding both, and the buffer overflows they invite, is essential C literacy.
Arrays and strings are where the pointer model becomes concrete — and where C's most infamous security bugs live. An array is a contiguous block whose name decays to a pointer; a string is just a char array with a null terminator and no length field. Understanding both, and the buffer overflows they invite, is essential C literacy.
A Session threads history into each run; a ContextProvider carries memory across sessions — and because a Session is JSON, both survive a process restart.
A Session threads history into each run and a ContextProvider carries memory across sessions. Because a Session is JSON, both survive a process restart.
What a Go pointer actually is, why there's no pointer arithmetic, `new(T)` versus `&T{}`, the addressability rules that decide what `&` will even compile against, and when reaching for a pointer helps versus when it just adds indirection and GC pressure.
What a Go pointer actually is, why there's no pointer arithmetic, `new(T)` versus `&T{}`, the addressability rules that decide what `&` will even compile against, and when reaching for a pointer helps...
How a stateless agent remembers: sessions carry one conversation, context providers carry knowledge across all of them.
Microsoft Agent Framework agents are stateless. Sessions carry one conversation; context providers carry memory across all of them. Here is the mental model in real code.
AgentSession is short-term memory. MemoryContextProvider + MemoryFileStore is long-term memory. Mem0 is long-term memory for serious workloads. The boundary that matters and how to implement each.
How a memory ContextProvider backed by an Azure AI Foundry store lets an agent recall you in a brand-new session.
Attach a Foundry-backed memory ContextProvider that retrieves before and stores after each run, so a fresh session still recalls facts keyed by a scope.
GOMEMLIMIT tells the Go runtime to keep memory below a soft cap by running GC harder when it's close. For containers with hard memory limits, this prevents OOM kills. The setting every Go service in K8s should have.
All posts on this site are written by Pratik Dhanave, an Agentic AI Architect with 7+ years building production distributed systems, multi-agent AI platforms, and cloud-native infrastructure. About the author → Each article includes working code, architecture diagrams, and references to the specific frameworks and standards discussed. Browse all posts or explore related topics using the tag cloud above.