An AI framework provides reusable APIs and abstractions for assembling language-model agents into workflows and applications. Frameworks can accelerate experimentation, but flexibility, overhead, and switching costs make framework choice a practical risk decision rather than a feature race. section 9.2.3 section 9.5
Common framework choices emphasize different kinds of agent work:
- LangChain supports commercial and open-source language-model APIs, chains, workflow logic, and custom or repository-based tools; its breadth can also feel overengineered. section 9.2.3
- LangGraph targets sophisticated stateful agents through graph-based workflows, state management, multi-turn conversations, and LangChain integration. section 9.2.3
- LlamaIndex focuses on search and retrieval applications, offering a simple interface for querying language models and retrieving relevant documents, with emphasis on large-data efficiency. section 9.2.3
A framework does not remove the underlying constraints of agent systems: finite context, unpredictable outputs, difficult task decomposition, and limited autonomy remain. Start with a lean prompt-and-tools setup, then add planning, memory, and other complexity incrementally; use human review when confidence is low or errors could be catastrophic. section 9.3 section 9.5
Figure 9.14 Agents need short-term memory for the current session and long-term memory for learning and improvement over time.
Relates framework-based agents to short-term session memory and long-term memory for learning and improvement. section 9.2.3
