OPENAI AGENTS SDK AND AGENTIC APPLICATION ENGINEERING
A Researcher’s and Developer’s Textbook on Agent Architecture, Tool Orchestration, the Responses API, and Migration from the Assistants API
Build intelligent applications. Orchestrate AI agents. Engineer reliable workflows.
Discover how to design, implement, evaluate, and deploy modern agentic applications using the OpenAI Agents SDK and Responses API.
This comprehensive 19-chapter textbook explores agent architecture, function tools, multi-agent orchestration, sessions, memory, guardrails, tracing, evaluation, and migration from the legacy Assistants API.
Featuring five practical engineering projects, structured explanations, implementation guidance, and research-oriented learning, this book helps developers, students, and researchers move beyond simple AI interactions toward reliable agentic software systems.
RESEARCH • DESIGN • IMPLEMENT • EVALUATE • DEPLOY
Minimum price
$12.99
$19.99
You pay
Author earns
About
About the Book
About the Book
OpenAI Agents SDK and Agentic Application Engineering: A Researcher's and Developer's Textbook on Agent Architecture, Tool Orchestration, the Responses API, and Migration from the Assistants API is a comprehensive technical textbook for understanding, designing, implementing, evaluating, and deploying modern agentic AI applications.
Artificial Intelligence is evolving beyond conventional question-and-answer interactions toward intelligent applications capable of using tools, managing context, coordinating specialist agents, processing structured information, and executing multi-step workflows.
Building such applications requires more than connecting a language model to a prompt. It requires a systematic understanding of agent architecture, execution runtimes, API integration, tool contracts, state management, security boundaries, testing, observability, and responsible engineering.
This book uses the OpenAI Agents SDK as its primary agent-development framework and explores the Responses API as a foundation for modern model interactions. It also examines architectural choices between SDK-managed agent orchestration and direct API integration.
A dedicated chapter explains the historical Assistants API architecture and the engineering considerations involved in migrating legacy implementations to modern development approaches.
What Does This Book Cover?Across 19 comprehensive chapters, readers explore:
- Foundations of Agentic AI: Intelligent applications, agent environments, goals, tools, actions, and the agent lifecycle.
- Agent Architecture and Design: Model configuration, instructions, context, planning, task decomposition, memory, and architectural patterns.
- OpenAI Platform Fundamentals: API authentication, model selection, HTTP concepts, SDK configuration, rate limits, and credential management.
- Responses API: Request structures, response items, tool calling, conversation continuity, structured outputs, and streaming.
- OpenAI Agents SDK: Installation, project structure, agent configuration, execution, and reproducible development environments.
- Agents and Runner Execution: Agent definitions, runtime context, synchronous and asynchronous execution, streaming events, and run management.
- Tools and API Integration: Function tools, parameter schemas, input validation, external services, retries, idempotency, and permission boundaries.
- Multi-Agent Orchestration: Specialist agents, handoffs, agents-as-tools, manager-style orchestration, routing, delegation, and shared context.
- Sessions and Memory: Conversation state, session management, persistence, context windows, summarisation, privacy, and data retention.
- Guardrails and Safe Execution: Input and output validation, human approval, prompt injection defence, sensitive actions, and failure containment.
- Tracing and Observability: Execution traces, spans, debugging, logging, metrics, dashboards, and privacy-aware monitoring.
- Testing and Evaluation: Unit testing, integration testing, evaluation datasets, task success, tool-use quality, regression testing, security, and performance analysis.
- Assistants API Migration: Legacy architecture, concept mapping, migration planning, tool refactoring, regression testing, and post-migration validation.
The book goes beyond conceptual explanations by introducing five application-oriented projects:
- Personal Research and Knowledge Agent: Research planning, search tools, evidence capture, summarisation, and structured reports.
- Document Analysis and Data Extraction Agent: Document processing, structured extraction, validation, confidence checks, and human review.
- Multi-Agent Software Engineering Workflow: Architect, developer, and reviewer agents working through coordinated development tasks.
- Enterprise Workflow and Approval Agent: Business rules, role-based access, approval gates, audit trails, and exception handling.
- Customer Support and Service Desk Agent: Knowledge retrieval, request classification, specialist routing, response generation, and human escalation.
This textbook combines research-oriented thinking with practical software engineering.
Instead of treating agents as unrestricted autonomous systems, it presents them as engineered applications operating within explicit responsibilities, permissions, validation rules, and measurable performance criteria.
The learning approach emphasizes:
- Understanding the architecture before implementation.
- Designing explicit and testable tool interfaces.
- Selecting suitable orchestration strategies.
- Managing state and conversational continuity.
- Evaluating reliability and execution quality.
- Protecting credentials and sensitive information.
- Implementing human oversight for consequential actions.
- Documenting experiments and maintaining reproducibility.
This book is particularly suitable for:
- Computer Science, Information Technology, and AI students.
- Undergraduate and postgraduate researchers.
- Python developers and software engineers.
- AI application developers and automation engineers.
- Software architects and technical leads.
- API integration and enterprise application developers.
- Technical educators and professional trainers.
- Researchers exploring multi-agent systems and human-AI interaction.
After studying this book, readers should be able to design agentic application architectures, configure agents using the OpenAI Agents SDK, integrate model capabilities through the Responses API, develop function tools, implement multi-agent workflows, manage sessions and state, apply guardrails, evaluate agent performance, troubleshoot execution through tracing, and plan migrations from legacy Assistants API implementations.
They will also gain experience in designing research agents, document-processing agents, multi-agent software workflows, enterprise approval systems, and customer support applications.
OpenAI Agents SDK and Agentic Application Engineering is designed as both an academic learning resource and a practical engineering reference for readers who want to move from experimenting with AI models to building reliable, secure, and maintainable agentic applications.
RESEARCH • DESIGN • IMPLEMENT • EVALUATE • DEPLOY
Author
About the Author
Anshuman Kumar Mishra, M.Tech (Computer Science) Assistant Professor, Doranda College, Ranchi University
Prolific Author of 50+ Books on AI, Machine Learning & Computer Science | 20+ Years Experience
Anshuman Kumar Mishra is a dedicated educator, researcher, and highly prolific author with over 20 years of experience in Computer Science and Information Technology. Holding an M.Tech in Computer Science from BIT Mesra, he brings a rare combination of academic depth and practical teaching expertise.
Currently serving as Assistant Professor at Doranda College under Ranchi University, he has mentored thousands of students, helping them build strong foundations in programming, data science, and artificial intelligence. His student-centric teaching style emphasizes conceptual clarity, hands-on practice, and real-world application.
Anshuman is a prolific author with more than 50 books published across a wide spectrum of computer science and emerging technology domains. From foundational programming languages to advanced topics in Artificial Intelligence, Machine Learning, Reinforcement Learning, Decision Theory, and Computer Vision — his books are widely appreciated by students, educators, and professionals for their clear explanations, strong theoretical foundation, and practical approach.
His extensive body of work reflects his deep commitment to making complex subjects accessible and meaningful for learners at all levels. He is particularly recognized for creating well-structured learning paths that help readers progress from beginner to advanced levels with confidence.
Driven by the mission to democratize quality technical education, Anshuman continues to write and update books that bridge the gap between academic theory and industry practice.
When not teaching or writing, he actively follows and explores new developments in AI, Quantum Machine Learning, and Ethical Intelligence systems.
Contents
Table of Contents
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Write and Publish on Leanpub
You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!
Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.
Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.