Blank white background with no objects or features visible.

Nous vous offrons un accès gratuit à l'intégralité du Gartner Hype Cycle for AI Governance 2026. Obtenez votre exemplaire →

Context Engineering: Designing What Your AI Agent Sees

Par Ashish Dubey

Published: October 6, 202612

⚡ TL;DR

Context engineering is the practice of deciding everything a model sees on each step of an agent's run: the system instructions, the skills, the tool definitions, the conversation history, and the results coming back from tools. Prompt engineering tunes one message; context engineering designs the whole information environment an agent operates in. This guide explains what context engineering is, how it differs from prompt engineering, and how TrueFoundry's Agent Harness, Skills Registry, and gateways give you control over it.

For a single chatbot turn, wording the prompt well is most of the battle. For an agent that plans, calls tools, reads results, and keeps going, the prompt is a small part of what actually reaches the model. Each step, the model sees instructions, whatever skills are in scope, the definitions of the tools it can call, the running conversation, and the output of the last tool it used. Getting that whole picture right, not just the opening prompt, is what separates an agent that stays on track from one that drifts, hallucinates, or blows its context window. That work is context engineering.

This guide covers what context engineering is, how it compares to prompt engineering, the pieces you actually control, and how to manage them in production.

What Is Context Engineering?

Context engineering is the discipline of designing the full set of information a model receives at each step of an agent's execution. In an agent runtime, context is everything the model sees on a given step, which includes the system instructions, the skills that are in scope, the definitions of available tools, the conversation history, and the results returned by tools.

That is a much larger surface than a single prompt. And it is dynamic: every tool call adds a result back into the context on the next step, so the information environment keeps changing as the agent works. Context engineering is how you keep that environment focused, relevant, and within budget instead of letting it fill with noise.

What lives in an agent's context

  • System instructions. The standing guidance for how the agent should behave.
  • Skills. Reusable procedures the agent can pull in for specific tasks, rather than stuffing every playbook into the system prompt.
  • Tool definitions. The tools, often exposed over MCP, that the agent is allowed to call, and their schemas.
  • Conversation history. The running dialogue and the agent's own intermediate steps.
  • Tool results. The output of each call, which re-enters the context and shapes the next step.

Design your agent's context, don't leave it to chance

TrueFoundry's Agent Harness, Skills Registry, and MCP Gateway give you control over instructions, skills, and tools, inside your VPC.

Context Engineering vs Prompt Engineering

The two are related but operate at different scopes, and conflating them is why some teams plateau. Prompt engineering asks "how do I word this one request." Context engineering asks "what should the model have in front of it, on every step, to do this job well."

Prompt engineering Context engineering
Scope A single prompt or message The full context across every step of a run
Concerns Wording, examples, output format Instructions, skills, tools, history, tool results, and their budget
Failure it fixes A vague or poorly formatted answer Drift, irrelevant tools, context bloat, lost-in-the-middle recall
When it matters most Single-turn generation Multi-step agents and long-running tasks

Neither replaces the other. You still word instructions carefully, but for an agent that is a small slice of a much bigger design problem. As context windows grow, the temptation is to pour everything in, and that is exactly the trap context engineering avoids: more context is not better context, and an overloaded window degrades recall and raises cost.

Techniques That Actually Move the Needle

A few practices carry most of the value when engineering context for agents.

  • Move procedures into skills, not the system prompt. Anything that reads like a workflow or playbook belongs in a skill the agent loads when relevant, which keeps the base context lean. Load short, always-relevant guidance (style guides, safety policies) eagerly, and leave long or occasional procedures to load on demand.
  • Scope tools tightly. The more tools you expose, the more tokens their definitions consume and the more ways the agent can go wrong. Give an agent the tools its function needs and no more.
  • Manage history deliberately. Summarize or truncate old turns so the window stays focused on what matters now, rather than carrying every step forward verbatim.
  • Treat tool results as untrusted context. Results re-enter the model's context on the next step, so they need the same inspection an input does, both for relevance and for safety.

How TrueFoundry Helps You Engineer Context

Context engineering is only sustainable if the pieces are managed, not hand-assembled per agent. TrueFoundry gives you control points for each part of the context.

The Agent Harness assembles model, skills, tools, and history into one governed run
Product screenshot, TrueFoundry docs: the Agent Harness runtime.

In the Agent Harness, you configure the context when you build the agent: the system prompt, the skills in scope, and which MCP servers are available. That makes the context an explicit, reviewable configuration rather than something buried in code.

  • Skills. Skills come from the central Skills Registry, so the procedures in an agent's context are versioned, access-controlled, and reused rather than copy-pasted. You can preload short, always-relevant skills and leave long ones to load on demand, which is the core lean-context technique made into a setting. See Claude Skills for how the skill format works.
  • Tools. The MCP Gateway decides which tools an agent can reach and can scope access down to individual tools, so tool definitions in the context stay limited to what the agent actually needs.
  • Tool-result safety. Because tool results re-enter context, AI agent guardrails inspect them on the post-tool hook for injections and sensitive data before they influence the next step.
  • Observability. Every step is traced, so you can see exactly what was in the context when the agent made a decision, which is what makes context engineering iterative instead of guesswork.

Underneath all of it, the AI Gateway routes each call across 1,000+ models with roughly 3 to 4 ms of overhead, so the model best suited to a given step is a routing choice, not a rewrite. The result is that context becomes something you design and govern in one place, rather than a side effect of how each agent happened to be coded.

Conclusion

Context engineering is the shift from wording one prompt to designing everything a model sees across an agent's entire run. Get the instructions, skills, tools, history, and tool results right, and the agent stays focused and affordable; get them wrong, and no amount of prompt tuning saves it. TrueFoundry turns those pieces into managed configuration through the Agent Harness, Skills Registry, MCP Gateway, and full tracing, so context is something you design and govern rather than something that happens to you.

See how TrueFoundry gives you control over your agents' context from one control plane. Book a demo or start free.

Try now.

One gateway for all your models, MCP servers, and agents.
No credit card needed.

INSCRIVEZ-VOUS
Table des matières

Gouvernez, déployez et suivez l'IA dans votre propre infrastructure

Réservez un séjour de 30 minutes avec notre Expert en IA

Réservez une démo

Le moyen le plus rapide de créer, de gérer et de faire évoluer votre IA

Démo du livre
Summarize with
ChatGPT logo by OpenAI
Perplexity AI logo
Blurry red snowflake on white background, symmetrical frosty design with soft edges and abstract shape.

Découvrez-en plus

May 23, 2024
|
5 min de lecture

Que sont les intégrations vectorielles ? — Un guide complet 2024

May 22, 2024
|
5 min de lecture

Qu'est-ce que l'indexation vectorielle ? - Un guide complet 2024

May 22, 2024
|
5 min de lecture

LLM Embeddings 101 : un guide complet 2024

October 10, 2026
|
5 min de lecture

10 meilleurs outils LLmops en 2026

comparaison
October 10, 2026
|
5 min de lecture

5 leçons sur l'exploitation d'IA agentique en production - D'après la discussion au coin du feu

Aucun article n'a été trouvé.
October 10, 2026
|
5 min de lecture

Passer à zéro dans Kubernetes : une plongée approfondie dans Elasti

Ingénierie et produits
October 10, 2026
|
5 min de lecture

L'observabilité dans les flux de travail LLM : transformer les boîtes noires en boîtes en verre

Aucun article n'a été trouvé.
October 6, 2026
|
5 min de lecture

Claude Skills: What They Are and How to Govern Them at Scale

Aucun article n'a été trouvé.
October 6, 2026
|
5 min de lecture

AI Agent Guardrails: Inspecting Every Tool Call and Model Hop

Aucun article n'a été trouvé.
Iceberg visual representing MCP vs RAG with hidden depth of AI context and data complexity
October 8, 2026
|
5 min de lecture

MCP contre RAG : connaissez les principales différences

Aucun article n'a été trouvé.
October 6, 2026
|
5 min de lecture

Agent Interoperability: One Control Plane for Any Framework

Aucun article n'a été trouvé.
October 6, 2026
|
5 min de lecture

AI Agent Portability: Switch Models Without Rebuilding Your Agents

IA agentique

Blogs récents

Black left pointing arrow symbol on white background, directional indicator.
Black left pointing arrow symbol on white background, directional indicator.

Questions fréquemment posées

Qu'est-ce que l'ingénierie de contexte ?

L'ingénierie de contexte est la pratique qui consiste à concevoir tout ce qu'un modèle voit à chaque étape de l'exécution d'un agent : instructions système, skills, définitions d'outils, historique de la conversation et résultats des outils. Elle va au-delà de la formulation d'un seul prompt et façonne tout l'environnement d'information dans lequel l'agent opère, afin qu'il reste concentré, pertinent et dans les limites de son budget de contexte.

Quelle est la différence entre l'ingénierie de contexte et l'ingénierie de prompts ?

L'ingénierie de prompts ajuste un seul message : sa formulation, ses exemples et son format. L'ingénierie de contexte conçoit l'ensemble du contexte qu'un agent voit à chaque étape, y compris les skills et les outils qui entrent dans son périmètre et la manière dont l'historique et les résultats des outils sont gérés. L'ingénierie de prompts corrige une réponse faible ; l'ingénierie de contexte corrige la dérive, la prolifération des outils et l'inflation du contexte dans les agents à plusieurs étapes.

Comment pratiquer l'ingénierie de contexte pour les agents d'IA ?

Gardez le contexte de base léger en déplaçant les procédures dans des skills que l'agent charge à la demande, délimitez strictement les outils pour que seules les définitions nécessaires soient présentes, gérez l'historique de la conversation afin que les anciens tours n'encombrent pas la fenêtre, et traitez les résultats des outils comme un contexte non fiable qui doit être inspecté. C'est le fait de gérer tout cela comme de la configuration plutôt que comme du code qui rend la démarche reproductible.

Une fenêtre de contexte plus grande dispense-t-elle de l'ingénierie de contexte ?

Non. Une fenêtre plus grande incite à tout inclure, mais un contexte surchargé dégrade le rappel et augmente les coûts. L'ingénierie de contexte consiste à placer la bonne information devant le modèle, ce qui compte davantage, et non moins, à mesure que les fenêtres s'agrandissent.

TrueFoundry prend-il en charge MCP et les skills pour gérer le contexte ?

Oui. L'Agent Harness vous permet de configurer les instructions système, les skills issues du Skills Registry central et les serveurs MCP qu'un agent peut atteindre, et la MCP Gateway délimite l'accès aux outils : les éléments du contexte d'un agent sont ainsi gouvernés de manière centralisée.

Puis-je l'exécuter dans mon propre VPC ?

Oui. TrueFoundry s'exécute dans votre VPC, on-premise, en environnement air-gapped ou en hybride, de sorte que le trafic vers Gemini 3 Pro et tous les autres modèles reste gouverné dans votre propre domaine.

Faites un rapide tour d'horizon des produits
Commencer la visite guidée du produit
Visite guidée du produit