Awesome Context Engineering

repository·main·Indexed 25 days ago

https://github.com/meirtz/awesome-context-engineering

A curated repository of resources, survey papers, and research on context engineering, prompt engineering, RAG, and memory systems for Large Language Models. It focuses on the transition from static prompting to dynamic, context-aware AI systems, covering agent runtimes, interoperability protocols like Model Context Protocol (MCP), and memory architectures such as MemGPT and GraphRAG. Includes a foundational survey paper, 'A Survey of Context Engineering for Large Language Models', and guides for the 'Agent Era'.

Tokens
10K
Snippets
2
Records
64
Agent score
35%

What's inside awesome-context-engineering

  1. Overview of Awesome Context Engineering

    main
    Awesome Context Engineering is a comprehensive survey and resource collection focused on the evolution from static prompting to dynamic, context-aware AI systems. It covers topics ranging from long context and RAG to agent runtimes, memory systems, interoperability protocols, and observability stacks. The project provides academic insights through a published survey paper and serves as a central hub for techniques in the 'Agent Era'.
  2. Explore Production Systems and Enterprise AI Infrastructure

    main

    This section covers how context engineering is applied in enterprise and production environments.

    Context Engineering as a Core Discipline

    • From Prompt Craft to System Design: Context Engineering as a Core Discipline for AI-Driven Delivery (Forte Group Team)
    • Context Engineering: A Framework for Enterprise AI Operations (Shelly Palmer)
    • How MCP Handles Context Management in High-Throughput Scenarios (Portkey.ai Team)

    Enterprise AI Case Studies

    • JPMorgan's COiN Platform – Agentic AI for Financial Analysis
    • EY's Agentic AI Integration in Microsoft 365 Copilot
    • Context Is Everything: The Massive Shift Making AI Actually Work in the Real World (Phil Mora)

    Enterprise Applications and Infrastructure

    • The Context Layer for Enterprise RAG Applications (Contextual AI Team)
    • Navigating AI Model Deployment: Challenges and Solutions (Dean Lancaster)
    • 2024: The State of Generative AI in the Enterprise (Menlo Ventures)
    • How 100 Enterprise CIOs Are Building and Buying Gen AI in 2025 (Andreessen Horowitz)

    Developer Tools

    • Autohand Code CLI: An autonomous coding agent with semantic search, memory, and context management.
  3. Explore Platform Stacks and Hosted Agent Runtimes

    main

    The production ecosystem is moving toward full agent stacks that combine tools, memory, runtime orchestration, sessions, observability, and interoperability. Supported platforms include:

    • OpenAI Agents Guide (OpenAI)
    • Google Agent Development Kit (ADK) (Google)
    • Vertex AI Agent Engine (Google)
    • LangGraph Memory Overview (LangChain)
    • Microsoft Agent Framework (Microsoft)
    • Puppyone (Puppyone): A file system for agents to connect, govern, version, and share context across agent workflows.
  4. Conceptualize LLMs through Artificial Embodiment

    main

    Context Engineering treats LLMs as reasoning engines that require 'artificial embodiment' to interact with the world:

    • Synthetic Sensory Systems: Using retrieval mechanisms as a form of artificial perception.
    • Proxy Embodiment: Using tool use to provide artificial action capabilities.
    • Artificial Memory: Implementing structured information storage and retrieval to provide a sense of continuity.
  5. Understand the Definition of Context Engineering

    main

    Context Engineering is the discipline of designing and optimizing the assembly and formatting of the complete information payload provided to an LLM at inference time. Unlike traditional prompt engineering, which treats context as a single static string, Context Engineering treats context as a dynamic assembly of multiple structured components to maximize task performance (Reward).

    Core Components of Context

    Context is modeled as the result of an assembly function: Assemble(instructions, knowledge, tools, memory, state, query).

    • instructions: System prompts and rules.
    • knowledge: Retrieved relevant information.
    • tools: Available function definitions.
    • memory: Conversation history and learned facts.
    • state: Current world or user state.
    • query: The user's immediate request.

    Fundamental Principles

    1. System-Level Optimization: Context generation is a multi-objective optimization problem over assembly functions.
    2. Dynamic Adaptation: The assembly function adapts to each query and state at inference time.
    3. Information-Theoretic Optimality: The retrieval function must maximize relevant information relative to the query.
    4. Structural Sensitivity: Formatting functions must encode structure that aligns with LLM processing capabilities.
  6. Explore Coding Agents and Project Memory

    main

    In production coding agent settings, context engineering evolves into 'agent engineering,' where context includes repository instructions, project memory, task plans, file diffs, test results, and tool traces. Key technologies include:

    • Codex (OpenAI)
    • Claude Code Memory (Anthropic)
    • Claude Code Subagents (Anthropic)
    • Letta Memory Blocks (Letta)
    • LangChain Deep Agents (LangChain)
    • nv:context (NichevLabs)
  7. Explore Complex Research Systems and Automated Scientific Discovery

    main

    The repository provides a curated list of research and systems focused on AI-driven scientific discovery. Key areas include:

    Hypothesis Generation and Data-Driven Discovery

    • Hypothesis Generation with Large Language Models (Liu et al.)
    • GFlowNets for AI-Driven Scientific Discovery (Jain et al.)
    • Literature Meets Data: A Synergistic Approach to Hypothesis Generation (Liu et al.)
    • Machine Learning for Hypothesis Generation in Biology and Medicine (FieldSHIFT Team)

    Automated Scientific Discovery

    • The AI Scientist: Towards Fully Automated Open-Ended Scientific Discovery (Lu et al.)
    • Automating Psychological Hypothesis Generation with AI (Johnson et al.)
    • Can Large Language Models Replace Humans in Systematic Reviews? (Khraisha et al.)
    • Solving Olympiad Geometry without Human Demonstrations (Trinh et al.)
    • GenoMAS: A Multi-Agent Framework for Scientific Discovery via Code-Driven Gene Expression Analysis (Liu et al.)
    • aiXiv: A Next-Generation Open Access Ecosystem for Scientific Discovery Generated by AI Scientists (Zhang et al.)

    AI for Science Integration and Deep Research

    • AI for Science 2025: Convergence of AI Innovation and Scientific Discovery (Fink et al.)
    • Towards Scientific Discovery with Generative AI (Anonymous et al.)
    • Accelerating scientific discovery with AI (MIT News)
    • Accelerating scientific breakthroughs with an AI co-scientist (Google Research)
  8. Understand the shift from Prompt Engineering to Context Engineering

    main

    Context Engineering is a strategic discipline focused on building the architectural foundation for LLM applications, moving beyond simple 'prompting tricks' to systems-level design. While prompt engineering focuses on the dialogue (the string), context engineering focuses on the environment (the system) required for reliable reasoning.

    Key differences include:

    • From Static to Dynamic: Moving from static strings to dynamic information assembly that combines databases, APIs, and real-time data.
    • From Reasoning to Environment: Providing the 'set, lighting, and backstory' (context) so the model's reasoning engine can function effectively.
    • From Single Tasks to Systems: Addressing complex, multi-step, stateful, and multi-user workflows that simple prompting cannot handle.
  9. Implement Project Memory and Instruction Artifacts

    main

    For coding agents, memory is often implemented through concrete artifacts rather than just vector stores. Use these patterns to provide context to agents:

    • Repository instruction files: Files within the repo that guide agent behavior.
    • Scoped rules: Rules applied to specific parts of a project.
    • Reusable skills: Modular capabilities the agent can invoke.
    • Long-lived project notes: Persistent documentation for the agent to reference.
  10. Implement Runtime Context Management in Production

    main

    In production agent systems, context engineering shifts from prompt construction to runtime management. Key patterns and tools include:

    • Runtime Management Patterns: Utilizing conversation state, prompt caching, and compaction (e.g., via OpenAI Tools or Google ADK).
    • Scoped Instructions: Using memory and scoped project instructions (e.g., Claude Code).
    • Filesystem-Based Management: Managing context via filesystems (e.g., LangChain Deep Agents).
    • Optimization Engines: Using tools like Entroly for information-theoretic context optimization (reduces tokens by ~78%, works with Cursor, Claude Code, Copilot, and OpenClaw via MCP server or HTTP proxy).
  11. Contribute to the Awesome Context Engineering survey

    main

    To contribute new research papers to this repository, follow these steps:

    1. Fork the repository.
    2. Create a new feature branch.
    3. Add relevant papers using the required Markdown formatting.
    4. Submit a pull request with a clear description of your changes.
  12. Reading Guide for Agent Era Topics (2026 Update)

    main

    For developers focusing on the shift toward Agent Engineering, the following resources and topics are recommended:

    Agent Harnesses and Runtime Systems

    Focus on planning, subagents, checkpoints, sandboxes, and human approval loops. Key inspirations include:

    • Anthropic's effective agents guide
    • OpenAI's Agents and Tools documentation
    • Google ADK
    • LangChain Deep Agents

    Open Protocols and Interoperability

    Focus on how agents communicate and share context. Key protocols include:

    • Model Context Protocol (MCP)
    • A2A
    • AG-UI
    • AgentSchema

    Coding Agents and Project Memory

    Focus on how agents manage long-term context in development environments. Key concepts include:

    • OpenAI Codex
    • Claude Code memory
    • Letta memory blocks

    Evaluation and Observability

    Focus on monitoring long-running agent systems. Key tools include:

    • LangSmith observability
    • OpenTelemetry semantic conventions for GenAI