2 Instructions for AI agents
This chapter covers
- Instructions as high-level directives that shape model behavior
- System prompts as the initial instruction layer
- Agent skills as modular, reusable expertise packages
- Instruction artifacts as project-specific guidance
Chapter 1 introduced context engineering and the six context sources that LLM-based systems supply to the model. This chapter focuses on the first of those sources: instructions, which establish the rules, constraints, and behavioral expectations under which a model operates. Every interaction with an LLM-based system is interpreted in the presence of one or more instruction layers. Instructions are delivered through different mechanisms in AI agents, including the system prompt, agent skills, and instruction artifacts.
2.1 Instructions
Instructions are the foundational context source in LLM-based systems. They define the model’s role, behavioral expectations, safety boundaries, formatting requirements, and policies across a conversation, session, or task run. Instructions provide the operating rules for the LLM-based system that deploys the model. They tell the model how to interpret subsequent context, how to handle routine choices, and which boundaries remain in force even when a user asks for something different. Instructions frame user intent so that the model can satisfy valid requests while following the intended task, organizational policies, and operational constraints [14].