How packtpublishing/ai-agents-in-practice works
This repository is a book companion containing independent AI-agent examples, not one integrated application. Its clearest end-to-end workflow is Chapter 6’s restaurant assistant: a customer chats in Streamlit, an agent uses conversation memory and tools to answer questions, search restaurant documents or product data, and add confirmed items to a cart. Other chapters demonstrate standalone external tools and an MCP stock-price server; Chapter 7 documents a multi-agent example. Connections for unsampled notebooks are not inferred.
Main entry points: app.py Agent executor · calendar_tool.py Calendar lookup · asynch_summarizer_tool.py Report batch · server.py Stock MCP server
Components 18
Restaurant assistant
- Chat interface
Chapter 6/app.py - Agent executor
Chapter 6/app.py - Chat memory
Chapter 6/app.py - Azure chat model
Chapter 6/app.py - Agent tools
Chapter 6/app.py - Restaurant database
Chapter 6/piadineria.db - Restaurant PDFs
Chapter 6/documents - Document retrieval
Chapter 6/app.py
Agent tool examples
- Multi-agent example
Chapter 7/multiagent.ipynb - Calendar lookup
Chapter 5/calendar_tool.py - Sales report tool
Chapter 5/asynch_summarizer_tool.py - Report batch
Chapter 5/asynch_summarizer_tool.py - Temperature converter
Chapter 5/temperature_tool.py
MCP server
- Stock MCP server
Chapter 8/server.py
Other components
- Customer
- Cart service
- Microsoft Graph
- Yahoo Finance
Connections 12
- Customer → Chat interface: sends prompt
Chapter 6/app.py - Chat interface → Agent executor: invokes
Chapter 6/app.py - Agent executor → Azure chat model: uses
Chapter 6/app.py - Agent executor → Agent tools: dispatches tools
Chapter 6/app.py - Agent executor → Chat memory: uses
Chapter 6/app.py - Agent tools → Restaurant database: queries
Chapter 6/app.py - Agent tools → Document retrieval: includes
Chapter 6/app.py - Document retrieval → Restaurant PDFs: indexes
Chapter 6/app.py - Agent tools → Cart service: posts cart item
Chapter 6/app.py - Report batch → Sales report tool: gathers reports
Chapter 5/asynch_summarizer_tool.py - Calendar lookup → Microsoft Graph: requests events
Chapter 5/calendar_tool.py - Stock MCP server → Yahoo Finance: fetches prices
Chapter 8/server.py