Skip to Content
View all events

Hands-On Context Engineering

Published by O'Reilly Media, Inc.

Intermediate to advanced content levelIntermediate to advanced

Leveraging context in agentic systems

What you’ll learn and how you can apply it

  • Implement strategies to map, write, select, and compress context components (history, tool outputs, system messages) within a live application
  • Construct a functional retrieval agent that dynamically assembles context based on task requirements
  • Actively diagnose and resolve context poisoning, distraction, and confusion within your agent’s workflow
  • Engineer context-rich user experiences by forcing structured outputs and dynamic artifacts rather than raw text
  • Configure and use the Model Context Protocol (MCP) and context bundling tools to enhance developer productivity and agent reliability

Course description

Leave basic prompt engineering behind and learn how to architect robust context systems for production-ready agentic workflows. With the guidance of Lucas Soares, you’ll build a specific end-to-end agentic application—a “chat-based agentic system for continuous learning and research.” As the system evolves through each module, you’ll learn to treat context as a managed engineering resource, applying specific patterns to write, select, compress, and isolate information within your agent’s lifecycle.

Through a series of hands-on exercises, you’ll configure local environments using tools like Claude Code or Cursor, build a retrieval workflow, and deliberately stress-test your system to diagnose and fix common context failures. You’ll also use MCP, along with productivity standards like llms.txt, to optimize the agent. By the end of the course, you’ll have built and debugged a functional agentic workflow and gained the practical skills to engineer reliability and efficiency into your own AI applications.

This live event is for you because...

  • You’re a practitioner who’s actively building agentic workflows and needs to optimize reliability and overcome context window limitations.
  • You’re a developer integrating LLMs into production applications and you need to manage complex state and retrieval context.
  • You’re a technical lead who’s designing the interactions between agents, tools, and data sources and need robust patterns for information flow.

Prerequisites

  • An IDE with AI agents (Claude Code, Cursor) installed and configured for exercises (free tier sufficient)
  • A GitHub account for accessing course materials and example repositories
  • Basic familiarity with command line tools and Git operations
  • Basic experience with LLMs and AI agents (prompt engineering fundamentals, understanding of token limits, familiarity with at least one AI API or interface)
  • Programming experience in any language (Python, JavaScript, or similar) for understanding code examples and hands-on exercises
  • Understanding of basic software architecture concepts (APIs, filesystems, version control, and deployment workflows)
  • Experience with any AI-based editor such as Claude Code, Cursor, or VS Code and GitHub Copilot (helpful but not required)

Recommended follow-up:

Schedule

The time frames are only estimates and may vary according to how the class is progressing.

Introduction to context engineering (60 minutes)

  • Presentation: Defining context engineering versus prompt engineering; evolution from prompts to context systems; storage, management, and usage; context engineering principles; context windows, rot, and the context management challenge; patterns and strategies (write, select, compress, isolate)
  • Demo/hands-on exercise: Context engineering principles with Claude Code
  • Q&A
  • Break

Engineering context in agentic systems (60 minutes)

  • Presentation: Building a simple CLI-based chat app with prompt toolkit and the Claude Agent SDK; managing context in conversation for agentic workflows; managing context for efficient agentic retrieval workflows
  • Demo/hands-on exercise: Engineering context in agentic document retrieval workflows
  • Q&A
  • Break

Diagnosing and fixing context failures (60 minutes)

  • Presentation: Dealing with context poisoning, distraction, confusion, and clash
  • Demo/hands-on exercise: Visualizing the different context failures
  • Q&A

Context engineering patterns in modern AI applications (60 minutes)

  • Presentation: Structured outputs (controllable interfaces through context); artifacts (controllable, reusable, and dynamic UI elements through context engineering); contextually engineered experiences in web applications
  • Demo/hands-on exercise: Building a chat application with built-in dynamic artifacts for referenceable elements
  • Q&A
  • Break

Tools and techniques for modern development (45 minutes)

  • Presentation: Model Context Protocol and efficient agentic tools; context bundling and agent skills; code execution with MCP for enhanced context; hacks, tools, and techniques; testing the best MCP tools for Claude Code in web development
  • Demo/hands-on exercise: Exploring context engineering tools for general productivity with Claude Code

Wrap-up and Q&A (15 minutes)

Your Instructor

  • Lucas Soares

    Lucas Soares is a machine learning engineer who has worked at K1 Digital and Biometrid, where he developed computer vision and NLP models for applications such as document verification, OCR-based applications, and recommender systems. Lucas has also developed various ML models, including neural networks, Siamese networks, convolutional neural networks, LSTMs, and genetic algorithms.

    linkedinXlinksearch

Skills covered

  • AI Agents
  • Software Architecture