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.
How we solved Context Management in Agents
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.
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.
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.
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.
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
- previously atSally-Ann Delucia previously at
Arize AIML Solutions Engineer“I'm Sally, the director of RISE.”
0:21inBuild a Prompt Learning LoopYouTube Verified3 sources· Talk, Web· archived
- built
“We have an agent in product called Alex”
0:13inFrom Signal to PR: Anatomy of a Self-Improving AgentYouTube Verified4 sources· Talk
- builtSally-Ann Delucia built Alex
“I'm a core contributor to Alex.”
YouTube Unverified1 source· Talk
- featureAlex: Advanced planning, 40-plus built-in skills, and workflows for prompt optimization, data generation, data augmentation, and annotations
“We have advanced planning, 40-plus skills built into it”
YouTube Unverified1 source· Talk
- featureAlex: AI harness for building AI applications
“Alex is an AI harness. It's here to help you build your AI applications.”
YouTube Unverified1 source· Talk
- integrates with
“it's built on top of Arize, which is our observability platform.”
YouTube Unverified1 source· Talk
- featureAlex: Smart truncation keeps the first and last 100 characters and stores the middle for retrieval
“we still take the first 100 characters, and we also take 100 characters from the tail. We remove the middle and store it”
YouTube Unverified1 source· Talk
- featureAlex: Long-session evaluations load 10 turns and test the 11th
“We load 10 turns and test the 11th”
YouTube Unverified1 source· Talk











