WhoBuilt

How we solved Context Management in Agents

May 10, 2026· 16 min· 54K views·Watch on YouTube

Speaker

Sally-Ann Delucia, head of product at Arize and a core contributor to Alex, explains how her team manages context in AI agents at an AI Engineer event.

Context is a product decision

Delucia says agent quality depends on choosing which information the model sees, not simply filling the available token window. Alex analyzes large volumes of trace data, so the team had to decide what information mattered and how the agent could access more when needed.

Escaping the context growth loop

Alex was built to analyze Arize traces, but those traces grew until the agent hit context limits and failed. Naive truncation broke follow-up reasoning, while summarization was too inconsistent about what information to preserve.

Combining truncation with memory

Alex now keeps the first and last 100 characters of context, removes the middle, and stores that material for later retrieval. This approach preserves recent results and lets the agent retrieve earlier messages or tool calls when they matter.

Testing long sessions and delegating heavy work

As users kept chats open while moving through the application, failures began appearing late in conversations. The team tests long sessions by loading 10 turns and evaluating the 11th. For data-heavy searches across traces with hundreds of spans, Alex delegates work to sub-agents and returns results to a main agent with lighter context.

What remains unresolved

Very large inputs can still exceed provider limits, and Alex does not yet have long-term memory across new chats. Context selection also relies on a basic first-and-last-100-character heuristic, without a principled context budget or clear quality metrics.

Takeaways

  • Choose context for the task instead of trying to fill the token window.
  • Pair truncation with retrievable storage so removed information remains available.
  • Test later turns in long sessions before users encounter memory failures.
  • Delegate data-heavy work to sub-agents to keep the main conversation focused.
  • Treat context selection as an iterative process and use evaluations to assess it.

Mentioned in this talk

Search inside this talk

What was claimed 10

Show all 10 facts

Related talks