Context Engineering

Context Engineering

The discipline of feeding an AI agent or workflow the information it needs at the moment it needs it – distinct from prompt engineering (which focuses only on instructions). Analogy: a system prompt is like studying the night before an exam; good context is like having a cheat sheet during the exam. Both matter, but context is the bigger lever because LLMs don't know your business, clients, or internal processes until you give them that context.

Key points

  • System prompt = rules, tone, structure, base knowledge (studying for the exam)
  • Context = exact details at the exact moment needed (cheat sheet during the exam)
  • LLMs are not mind-readers – they only know what you feed them
  • Context rot: long agent sessions degrade quality as context window fills up
  • Mitigation: shorter sessions, project summaries, compacting, plan-mode gatekeeping
  • Applies equally to n8n AI agents and Claude Code projects
  • Datadog reframes the production bottleneck as context quality rather than context volume: long context windows are now large enough for most uses, but noisy, redundant, or poorly ordered context can bury the details that matter [src-037].
  • Production context engineering includes retrieval quality, summarization, deduplication, compression, and information hierarchy so agents receive high-signal inputs [src-037].
  • Prompt layout also matters for cost: stable system instructions, policies, and tool schemas should be placed where providers can reuse cached prefixes, while dynamic state should come later [src-037].
  • Google Cloud warns that stuffing all organizational policy into every agent context creates cognitive burden; governance should be enforced by environment guardrails where possible so the agent can focus on the task [src-043].
  • Preston Holmes introduces Context Sharding as the multi-agent complement: split a problem across role-specific context windows when one context cannot carry the whole problem cleanly [src-043].
  • Next '26 adds enterprise context products: Projects confine agent memory to selected files/conversations, Workspace Intelligence grounds agents in workflow context, and Knowledge Catalog maps data semantics for agent grounding [src-044].
  • The AI Engineer corpus broadens context engineering into a portfolio: RAG, GraphRAG, knowledge graphs, expert indexes, memory, context windows, search, embeddings, hybrid retrieval, and domain-specific knowledge apps all appear as ways to build better model inputs [src-077].
  • The repeated lesson is that context is not "more text." Production systems need retrieval evaluation, information hierarchy, freshness, permissions, cost awareness, and observability around which context was supplied and why [src-077].
  • The late-May update makes this sharper: Agent Skill Minimalism shows that too much skill context can hurt coding agents, while Context Graphs show that high-value context may be structured as entities, policies, precedents, and decision traces rather than prose alone [src-088].
  • Supabase's "Combine Skills and MCP" talk adds a division of labor: skills can teach an agent product-specific judgement and workflow, while MCP supplies live tools and data access; both are needed to close context gaps without bloating every prompt [src-088].
  • [src-094] frames context engineering as the bridge between Vibe Coding and Agentic Engineering, because generated code quality depends on structured project, architecture, convention, and intent context.
  • The paper lists six context types that production agents need: instructions, knowledge, memory, examples, tools, and guardrails [src-094].
  • It also clarifies the cost trade-off between static and dynamic context: static context is always loaded and expensive, while dynamic context such as skills, tool results, and retrieval can be loaded only when relevant [src-094].
  • Open Knowledge Format adds a portability layer: context can be packaged as markdown plus YAML frontmatter so agents and humans can inspect the same knowledge bundle across tools [src-100].
  • Google's ADK guide adds the durable-state rule: production agents should read workflow progress from explicit session state and state machines, not infer it from long chat history [src-101].
  • Herk adds a practical routing rule: the way context will be accessed later should determine how it is stored up front, whether as exact-file routing, wiki pages, semantic chunks, graph relationships, or live tool access [src-103].
  • The same source separates durable context from changing connections. Evergreen decisions, project state, and operating knowledge belong in memory; volatile Slack, email, customer, or task data may be better reached through live connectors when needed [src-103].

Related entities

Related concepts

Source references

  • [src-005] Nate Herk cluster — Nate Herk — n8n cluster (18 videos)

– Videos referenced: Fqeo8q8-nJg, ZeJXI2MAhj0, 3GAxd90fEE4

  • [src-037] Datadog — "State of AI Engineering" (2026-04-21)
  • [src-043] Google Cloud Events — "Operationalize AI: A blueprint for managing enterprise agents at scale" (2026-04-24)
  • [src-044] Thomas Kurian — "Welcome to Google Cloud Next '26" (2026-04-22)
  • [src-077] AI Engineer channel transcript cluster (678 saved transcripts, 2023-10-20 to 2026-05-15)
  • [src-088] AI Engineer late-May 2026 channel update (48 transcripts, 2026-05-15 to 2026-05-31)
  • [src-094] Addy Osmani, Shubham Saboo, Sokratis Kartakis – "The New SDLC With Vibe Coding" (2026-05)
  • [src-100] Sam McVeety and Amir Hormati – "How the Open Knowledge Format can improve data sharing" (2026-06-12)
  • [src-101] Shubham Saboo and Eric Dong – "Build Long-running AI agents that pause, resume, and never lose context with ADK" (2026-05-12)
  • [src-103] Nate Herk – "Every Level of a Claude Second Brain Explained" (2026-06-17)

Robin Cartier perspective

This page is part of Robin Cartier's working AI knowledge graph: a practical research layer for production AI, recommendation systems, experimentation, GEO, and agentic web readiness.

The useful next step is to connect this concept back to applied product leadership and operating models.

Recommended next

Keep reading from this thread

From 491 indexed pages and articles.

  1. Wiki concept Prompt Caching for Agents The practice of arranging stable instructions, policies, and tool schemas so providers can reuse repeated prompt prefixes Related by 037
  2. Wiki concept Workflow Automation Fundamentals The mental model and skill stack that every automation builder needs before touching AI agents. Related by exam
  3. Insight AI Measurement and Experimentation How to measure AI product impact with evals, adoption metrics, online experiments, guardrails, and cost tracking Readers have engaged with this next