chapter ten

10 AI frameworks for context engineering

 

This chapter covers

  • How AI frameworks and platforms support the construction of context-aware applications.
  • A taxonomy for organizing the framework landscape: AI application frameworks, agent orchestration frameworks, and AI application platforms.
  • The main design trade-offs involved in selecting frameworks for context engineering.
  • Representative features of widely used frameworks and platforms from a context engineering perspective.

The previous chapters examined the main building blocks of context engineering, including instructions, external knowledge, tools, memory, prompts, context management, orchestration, evaluation, observability, governance, and operations. In practice, developers rarely implement all these capabilities from scratch. They usually rely on frameworks and platforms that provide reusable abstractions for building applications with LLMs and AI agents.

This chapter organizes that ecosystem into three groups: AI application frameworks, agent orchestration frameworks, and AI application platforms. The chapter does not attempt to document every feature, extension, or configuration option available in each framework. Instead, it focuses on the most relevant and illustrative capabilities from a context engineering perspective to help readers understand the framework landscape and select technologies that meet their architectural and operational requirements.

10.1 Understanding the framework landscape

10.1.1 Selection criteria

10.2 AI application frameworks

10.2.1 LangChain

10.2.2 LlamaIndex

10.2.3 Haystack

10.2.4 Spring AI

10.2.5 DSPy

10.2.6 AI SDK

10.2.7 Pydantic AI

10.2.8 Common patterns in AI application frameworks

10.3 Agent orchestration frameworks

10.3.1 LangGraph

10.3.2 CrewAI

10.3.3 Semantic Kernel

10.3.4 Agent Development Kit

10.3.5 Microsoft Agent Framework

10.3.6 Agno

10.3.7 Parlant

10.3.8 DeepAgents

10.3.9 Common patterns in agent orchestration frameworks

10.4 AI application platforms

10.4.1 Dify