Editorial desk with abstract AI data visualizations and research notes

AI Learning Ramp

Context engineering for analytics agents, durable state, and prompt budgets.

Course 5 is a one-hour systems session on deciding what enters model context, what becomes durable state, what stays in the shared trace, and how production agents avoid drowning in their own history.

Course 5 of 24 Published June 8, 2026 Focus: context engineering Target: OpenAI / Anthropic interviews

System-Design Frame

Assume your BigQuery-adjacent GenAI analyst needs to answer warehouse questions, draft SQL, inspect prior tool calls, and continue multi-step investigations across sessions. Your job is to design the context assembly layer: a governed pipeline that selects the right instructions, user intent, permissions, schema facts, retrieved evidence, conversation state, and compacted history without turning the prompt into an unbounded transcript dump.

Course 5: Context Engineering

One-hour objective: defend a context architecture for an enterprise analytics agent that balances relevance, state continuity, compression quality, cache efficiency, and long-context failure isolation.

Define the context failure surface.

List where an analytics agent loses quality: missing schema facts, stale permissions, bloated traces, conflicting tool outputs, hidden decisions, and context that cannot be recovered after compression.

Read Anthropic on context engineering.

Focus on the shift from prompt writing to context systems, especially just-in-time context, selection, compression, isolation, and agent memory boundaries.

Use LangChain's taxonomy.

Translate the write, select, compress, and isolate strategies into concrete controls for an analytics agent's context window.

Study Manus on production context loops.

Anchor on KV-cache-aware prefixes, append-only traces, stable tool definitions, file-system memory, objective recitation, and why some errors should remain visible.

Review Cognition on shared context.

Use the multi-agent critique to sharpen when subtask isolation breaks coherence, and why action traces often matter more than final summaries.

Map the ideas to a BigQuery agent.

Sketch the context contract for SQL generation: permissions, semantic-layer definitions, schema evidence, query attempts, validator errors, and user intent.

Deliver the interview synthesis.

State your context contract, shared-trace policy, compression boundary, external-memory plan, and one failure mode that your design deliberately prevents.

Course 5 Reading List

This version deliberately avoids product docs. The four required readings are practitioner articles from teams reasoning about context as an agent reliability problem.

Required

Anthropic: Effective Context Engineering for AI Agents

A direct engineering treatment of context engineering as the next step beyond prompt engineering, with practical framing for just-in-time context, memory, selection, compression, and isolation.

Read for: the vocabulary and architecture tradeoffs behind reliable agent context assembly.

Required

LangChain: Context Engineering

A strong organizing framework for agent context management that breaks the design space into write, select, compress, and isolate strategies, with examples from real agent products and papers.

Read for: a reusable taxonomy you can apply under interview pressure when the context window starts to fill up.

Required

Manus: Context Engineering for AI Agents

A production lessons-learned article on context loops in an agent used at scale: stable prefixes, append-only traces, tool masking, file-system memory, objective recitation, and error retention.

Read for: the operational mechanics that turn context engineering from a prompt idea into an agent runtime design.

Required

Cognition: Don't Build Multi-Agents

A sharp agent-architecture essay from the Devin team arguing that context sharing and action traces are central to long-running agent reliability, and that naive sub-agent splits lose implicit decisions.

Read for: why shared context and trace continuity matter when designing agents that must stay coherent over many steps.

Readiness Checklist

You are ready for the interview version of this topic when you can answer these without defaulting to "just use a bigger context window."

Interview Drill: Agentic AI System Design

Prompt: design the context layer for a BigQuery analytics agent that answers questions, writes SQL, calls tools, and resumes investigations across sessions without leaking stale or unauthorized context.

Sources

  1. Anthropic engineering: Effective Context Engineering for AI Agents
  2. LangChain: Context Engineering
  3. Manus: Context Engineering for AI Agents
  4. Cognition: Don't Build Multi-Agents