Loading…
Managing context in long-run agentic applications
SlackDominic Marks
Summary
Long-running multi-agent systems struggle with context management because accumulating raw message histories degrades inference quality, increases latency, and exceeds context window limits. In a collaborative security investigation platform, passing unrestricted history can also introduce confirmation bias across specialized agents. To maintain coherence across unbounded rounds of investigation, the system eliminates raw message history carryover between invocations. Instead, it coordinates agents through three structured context channels: a Director's Journal for orchestration memory, a Critic's Review that scores findings to filter hallucinations, and a Critic's Timeline of validated chronological events. This architecture provides agents with tailored context without overwhelming their inference capacity.
Context
In long-running multi-agent security investigations spanning hundreds of inference requests, accumulating complete message history between API calls consumes context window capacity, increases latency and cost, and degrades response quality. Furthermore, sharing excessive unfiltered message history across specialized agents can encourage confirmation bias and stifle independent reasoning.
Approach / What changed
The architecture replaces raw inter-round message history accumulation with three specialized context channels. A Director agent maintains a structured Journal containing categorized entries such as decisions, observations, findings, questions, actions, and hypotheses to track investigation progress. A Critic agent evaluates domain Experts' findings to produce a credibility-scored Review report and constructs a chronological Timeline of credible events.
Takeaways
- Rather than passing full raw message histories across invocations, long-running agent workflows can prevent context window exhaustion by utilizing structured online context summarisation channels.
- The Director's Journal acts as a shared working memory categorized into six entry types: decisions, observations, findings, questions, actions, and hypotheses.
- The Critic agent filters hallucinations and misinterpretations by validating expert findings against cited tool artifacts and assigning credibility scores to generate reviews and timelines.
Related reading
Slack ·
Streamlining Security Investigations with Agents
Slack's Security Engineering team handles billions of daily security events and needed a reliable way to streamline on-call alert triage. An initial prototype relying on a single 300-word prompt produced inconsistent results and frequently reached spurious conclusions without properly challenging assumptions. To gain precise control, the team decomposed the workflow into chained model invocations with structured JSON outputs organized across three agent personas: a Director, four domain experts, and a Critic. Domain experts gather raw evidence through tool calls, the Critic evaluates finding quality and synthesizes a timeline, and the Director steers investigation phases using tiered model costs. The multi-agent system enables engineers to supervise investigations via a real-time dashboard while uncovering emergent issues like credential exposures across process ancestry chains.
Dominic MarksSlack ·
From SSH to REST: A Security-Driven Modernization of Slack’s EMR Data Pipelines
Slack's data platform accumulated over 700 SSH-based Airflow operators executing jobs directly on AWS Elastic MapReduce clusters, creating broad security surfaces and operational instability. Stateful SSH connections frequently failed when Kubernetes pods restarted, leaving orphaned zombie processes and preventing infrastructure modernization such as migrating EMR clusters to child accounts. To eliminate SSH access, Slack adopted a REST-based architecture using Quarry, a gateway providing unified REST APIs and token authentication across compute engines. For non-Hadoop CLI workloads, Slack leveraged YARN Distributed Shell to execute arbitrary shell scripts stored in Amazon S3 within managed, isolated YARN containers. The phased migration achieved zero downtime across eight data regions, unlocking reliable monitoring, simplified onboarding, and future initiatives like Spark on Kubernetes.
Mahendran VasagamGrab ·
From firefighting to building: How AI agents restored our team’s core productivity
Grab's Analytics Data Warehouse team spent roughly 40% of their engineering bandwidth answering repetitive questions, tracing data lineage, and handling basic pipeline enhancement requests across more than 15,000 tables. To eliminate these manual investigative bottlenecks, the team implemented a multi-agent AI architecture using FastAPI, LangGraph, Redis, and PostgreSQL. Incoming requests route through two dedicated pathways: an enhancement pipeline for generating code changes and an investigation pipeline for diagnosing data anomalies. Specialized agents interact with underlying engines like Trino, GitLab, and observability platforms to query data, trace transformations, and check ongoing incidents before synthesizing findings. This system automates the context-gathering process within minutes while maintaining human-in-the-loop review for merge requests and production changes.
Sneh AgrawalGrab ·
How AI is transforming analytics at Grab
Grab is restructuring its analytics operations using a five-level AI autonomy ladder, transitioning analysts from manual artifact creation to problem framing and decision governance. The architecture leverages domain-specific systems like Spartan to process natural language queries through certified metric indexes and Scarlet to triage and repair failing data pipelines. To prevent agent hallucinations, ContextIQ manages context lifecycles by automatically updating metric definitions, SQL references, and golden-dataset test cases when instrumentation changes or failures occur. Furthermore, data teams use an internal portal called BriX to configure custom analytics surfaces and automated root-cause analysis commentaries using reusable Model Context Protocol connections. Autonomy scales mechanical query and validation tasks while keeping human oversight focused on canonical metric definitions and strategic sign-offs.
Maanas Prabhakar