liveBook · Manning

Chapter 10: AI frameworks for context engineering

What you will learn in chapter 10 of Context Engineering

The introduction explains why framework choice matters for context engineering: frameworks package capabilities that teams rarely build entirely from scratch, while affecting visibility and control over the context lifecycle.

After this chapter you will be able to

What it builds on

Section by section

Introduction

The introduction explains why framework choice matters for context engineering: frameworks package capabilities that teams rarely build entirely from scratch, while affecting visibility and control over the context lifecycle.

Key terms: frameworks and platforms, reusable abstractions, context lifecycle

10.1 Understanding the framework landscape

Defines the scope of context-engineering frameworks and classifies them by the context they govern and how developers use them.

Key terms: AI framework, context-aware applications, model training, AI application frameworks, agent orchestration frameworks, AI application platforms, scope of context governed, operating model, primary architectural orientation, taxonomy

10.2 Choosing a framework for your AI application

This section gives criteria for choosing the simplest AI framework category that meets an application's context, control, and operational needs.

Key terms: AI application frameworks, agent orchestration frameworks, AI application platforms, context flow, context sources, tool boundaries, state model, orchestration, deterministic pipeline, operational surface

10.3 AI application frameworks

Introduces the shared context-management role of AI application frameworks and the need to keep their context construction inspectable.

Key terms: AI application frameworks, context management, prompt composition, retrieval augmentation, tool integration, session memory, accidental complexity, context construction, prompt templates, retrieval

10.3.1 LangChain

This section describes LangChain’s context-building primitives, its boundary with LangGraph, and the trade-off of its abstractions.

Key terms: LangChain, LangGraph, templated prompts, retrievers, structured output, output schema, abstraction density, retrieval, prompting, tool invocation

10.3.2 LlamaIndex

This section explains how LlamaIndex supports retrieval-based context engineering and why a short pipeline does not guarantee good retrieved context.

Key terms: LlamaIndex, retrieval, query engines, retrievers, retrieval quality, document preparation, index design, metadata quality, evaluation data

10.3.3 Haystack

Haystack makes the flow of context through search, RAG, and agent pipelines explicit, while requiring careful pipeline design to avoid poor context.

Key terms: Haystack, pipeline, reusable components, explicit data flow, production RAG, retrieval behavior, generation, pipeline design

10.3.4 Spring AI

Introduces Spring AI’s application-integrated abstractions and explains when it is a good framework choice.

Key terms: Spring AI, advisors, Spring-managed components, structured output, tool calling, Java, Spring, security model, observability stack, deployment workflow

10.3.5 LangChain4j

This section explains how LangChain4j’s AI services assemble context in Java, along with the visibility and framework-choice implications of that design.

Key terms: AI service, annotations, return type, chat memory, content retriever, tool objects, declarative style, assembled prompt, request and response logging, model builders

10.3.6 Pydantic AI

This section positions Pydantic AI as a type-safe agent framework and explains both its integration benefits and its limits.

Key terms: Pydantic AI, type-safe agent applications, typed dependencies, result validation, agent abstraction, integration reliability, semantic correctness, validated data structures, evals, test cases

10.3.7 DSPy

This section explains how DSPy shifts context design from hand-written prompts to measurable optimization, and when that approach is useful.

Key terms: DSPy, structured signatures, modules, optimizers, classification, extraction, RAG pipelines, metric, training examples, feedback loop

10.3.8 AI SDK

This section positions the AI SDK as a TypeScript integration toolkit for user-facing AI applications and clarifies where its scope ends.

Key terms: AI SDK, unified abstractions, user interface integration, TypeScript, application integration layer, retrieval, orchestration runtime

10.4 Agent orchestration frameworks

This section explains why agent orchestration frameworks are useful for multi-step applications and how they differ in the amount of agent behavior they provide.

Key terms: agent orchestration frameworks, state, tool outputs, harness, loop, boundaries

10.4.1 LangGraph

This section explains LangGraph’s stateful graph model and the control it offers for multi-step agents, along with its architectural trade-off.

Key terms: LangGraph, LangChain, nodes, edges, state object, deterministic steps, agentic decisions, architectural overhead, conditional edge, human review

10.4.2 CrewAI

Explains how CrewAI organizes role-based agent workflows and why explicit roles alone do not ensure reliability.

Key terms: agent, task, crew, goal, expected outputs, dependencies, role-based workflows, task boundaries, output validation, evaluation datasets

10.4.3 Agent Development Kit

Introduces Google’s Agent Development Kit as a framework for structured multi-agent development and explains when its control and portability trade-off may suit a team.

Key terms: Agent Development Kit, ADK, model- and deployment-agnostic, sessions, evaluation, shared or isolated state, code-level control, local development loop, evaluation harness, ecosystem alignment

10.4.4 Microsoft Agent Framework

This section positions Microsoft Agent Framework as a .NET and Python framework for structured multi-agent orchestration and explains its lineage and best fit.

Key terms: structured orchestration, handoff, shared state, Semantic Kernel, AutoGen, maintenance mode, migration path, enterprise-grade abstractions, .NET, Python

10.4.5 Agno

This section positions Agno as a production-oriented agent SDK and runtime and explains when its broad scope is useful or excessive.

Key terms: SDK, runtime, sessions, memory, traces, control-plane APIs, reusable platform, agentic services, agent SDK, orchestration layer

10.4.6 Embabel

Explains how Embabel uses typed actions to plan agent work and limit context, along with its cost-based choices and design trade-offs.

Key terms: annotated methods, parameter and return types, goal-oriented action planning engine, declared goal, shared blackboard, domain objects, typed slice, accumulated transcript, cost, deterministic lookup

10.4.7 Parlant

This section explains how Parlant selects conversational guidance dynamically and where that approach is useful and limited.

Key terms: Parlant, dynamic context selection, behavioral guidance, conversation state, monolithic system prompt, customer-facing agents, support flows, regulated conversations, behavioral consistency, guidelines

10.4.8 DeepAgents

This section describes DeepAgents as a pre-assembled harness for long-running agents and explains the trade-off between its ready-made defaults and the need to inspect them.

Key terms: DeepAgents, agent harness, context management, file-like state, human review, research agents, coding agents, state, tools, skills

10.4.9 Claude Agent SDK

The section describes what the Claude Agent SDK packages into an agent harness and what teams should check before relying on its defaults.

Key terms: Claude Agent SDK, agent loop, built-in tools, permission model, subagents, file-based skills, defaults, harness, instructions, compacted

10.5 AI application platforms

This section defines AI application platforms, distinguishes their main architectural roles, and explains the control and production-management trade-offs they introduce.

Key terms: AI application platforms, product surface around the harness, context flows, design surfaces, execution runtimes, managed hosting environment, control, debugging, governance, versioning

10.5.1 Dify

This section describes Dify’s visual approach to building LLM applications, its value for seeing context flow, and where teams may need to go beyond it.

Key terms: Dify, visual environment, workflow, visibility, prototype, deployable application, code-level customization, automated tests

10.5.2 LangFlow

This section describes LangFlow’s visual approach to building AI flows, who it suits, and what helps growing flows remain predictable.

Key terms: LangFlow, components, canvas, final context, low-code interface, Python and LLM application ecosystem, naming conventions, documentation, version control, tests

10.5.3 Flowise

Flowise combines visual workflow building with deployment and operational features, while requiring safeguards when workflows use tools and data sources.

Key terms: Flowise, visual builders, APIs, tracing, evaluations, access control, network isolation, secret management, monitoring

10.5.4 Zapier

This section describes how Zapier connects AI applications to business software through no-code workflows and why those integrations need review.

Key terms: no-code automation platform, trigger-action workflows, SaaS applications, runtime internals, credential management, action authorization, error handling, sensitive data

10.5.5 n8n

This section presents n8n as a visual workflow platform that connects AI components to enterprise processes and explains its deployment trade-off.

Key terms: n8n, workflow, visual, node-based editor, approval nodes, self-hosted, managed deployment, transparent automation, deployment flexibility

10.5.6 OpenClaw

OpenClaw illustrates how an assistant gateway connects messaging channels and local resources to agents, while creating a broad trust boundary.

Key terms: personal AI assistant gateway, assistant gateway pattern, control plane, personal automation, self-hosted assistants, trust boundary, transparent approvals, auditable action logs

10.5.7 Temporal

This section explains why Temporal’s durable workflows can support long-running agentic tasks and what complexity that reliability entails.

Key terms: Temporal, durable execution, long-running workflows, reliability, visual simplicity, workflows

10.5.8 Amazon Bedrock AgentCore

This section presents Amazon Bedrock AgentCore as a managed production runtime and explains how using it shifts context-related responsibilities to the cloud platform.

Key terms: managed layer, session isolation, memory persistence, tool routing, tool schemas, managed service, framework-agnostic, operational simplicity, execution environment

10.5.9 Gemini Enterprise Agent Platform

This section describes Google Cloud’s managed agent runtime and explains why teams must identify which context-engineering responsibilities a managed platform takes over.

Key terms: Gemini Enterprise Agent Platform, Agent Runtime, managed sessions, memory bank, Agent Development Kit, context lifecycle, managed memory, managed gateway, managed sandbox

10.6 Hands-on

This section gives readers a framework-independent way to inspect executable examples and evaluate how a framework handles context-engineering decisions.

Key terms: instructions, external information, tools, intermediate state, validation, context lifecycle, underlying decisions, critical choices, evaluating a candidate

10.7 Summary

Where this is used later

Concepts explained in this chapter

← Chapter 9: Governance and operations Chapter 11: Context engineering for software development →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.