Skip to content

Context Engineering

Context Engineering: Build Consistent, Accurate, Predictable AI Systems

Install: git clone https://github.com/bonigarcia/context-engineering

Install

$git clone https://github.com/bonigarcia/context-engineering

Install command taken from the project's README or registry entry. Always review code before running it.

Context Engineering

Context engineering can be defined as the practice of designing systems that provide a Large Language Model (LLM) and AI agents with all the necessary information to complete a task effectively. It goes beyond prompt engineering since it focuses on building a comprehensive and structured context from various sources like instructions, external knowledge, memory, tools, and state. The central idea is that the success of a complex LLM-based system depends more on the quality and completeness of the context provided than on the specific wording of the prompt itself.

Tobi Lütke, the CEO of Shopify, coined the term context engineering in a tweet on June 19, 2025. He defined context engineering as the art of providing all the context for the task to be plausibly solvable by the LLM. This novel concept captures the essence of the current evolution of LLM-based systems, inspiring others (like me) to understand and define this emerging discipline. Since then, I've been working on a book entitled Context Engineering: Build Consistent, Accurate, Predictable AI Systems, published by Manning. Currently, the early access version of the book is available, and you can get it here.

This GitHub repository is intended to be a companion resource for this book and a reference for practitioners looking to understand and adopt the context engineering principles.

Table of contents

This book aims to provide a strong, general-purpose theoretical foundation for context engineering, supported by hands-on examples. Its table of contents is the following:

  1. Introduction to context engineering
  2. Instructions for AI agents
  3. External knowledge and retrieval
  4. Tools in AI agents
  5. Memory and state in agentic systems
  6. User prompts for LLMs
  7. Context management and orchestration
  8. Evaluation and observability
  9. Governance and operations
  10. AI frameworks for context engineering
  11. Context engineering for software development
  12. The state of the art in context engineering
    Appendix A. The AI ecosystem
    Appendix B. References and further reading

Each chapter of this book begins by explaining the underlying principles and patterns of each thematic block. The final part of each chapter then presents specific examples, all of which are available in this GitHub repository. New examples will continue to be added, and existing ones maintained, even after the book is published. The goal is to provide an open-source, up-to-date reference for everyone interested in context engineering.

Examples

This repository organizes examples by chapter to help you explore context engineering concepts in practice.

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

MCP serverDatabases+105 this week

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

Explore related