{"id":10132,"date":"2026-02-05T17:15:27","date_gmt":"2026-02-06T01:15:27","guid":{"rendered":"https:\/\/cppcon.org\/?page_id=10132"},"modified":"2026-02-05T17:15:27","modified_gmt":"2026-02-06T01:15:27","slug":"class-2026-ai101","status":"publish","type":"page","link":"https:\/\/cppcon.org\/class-2026-ai101\/","title":{"rendered":"AI++ 101 : Build a C++ Coding Agent from Scratch 2026"},"content":{"rendered":"<p><em>AI++ 101 : Build a C++ Coding Agent from Scratch<\/em> is a one-day <strong>onsite<\/strong>\u00a0training course with programming examples, taught by <strong>Jody Hagins<\/strong>. It is offered at the <a class=\"docs-creator\" href=\"https:\/\/cppcon.org\/venue\/\">Gaylord Rockies<\/a> from 09:00 to 17:00 Aurora time (MDT) on Sunday, September 13th, 2026 (immediately <strong>prior to<\/strong>\u00a0the conference). Lunch is included.<\/p>\n<h2>\u25c8 <a href=\"https:\/\/cppcon.org\/registration\/\">Register Here<\/a> \u25c8 <a href=\"https:\/\/cppcon.org\/cppcon-academy-2026\/\">See Other Offerings<\/a> \u25c8<\/h2>\n<h2>Course Description<\/h2>\n<p>Remember writing a compiler in university? Not a real compiler, but something that handled a subset of a language and generated naive code. You&#8217;d never ship it. But decades later, you still understand how compilers work because you built one.<\/p>\n<p>That&#8217;s what we&#8217;re doing here. In one intensive day, you will build a working AI coding agent in C++.<br \/>\nNot Claude Code. Not Cursor. A simple thing you fully understand, that talks to an LLM, defines tools, executes them, and runs the same agentic loop that powers every AI coding assistant on the market.<\/p>\n<p>This workshop emerged from my own AI\/C++ journey. I watched AI stumble through C++ like a freshman who skipped the first three weeks of class, until I discovered the problem wasn&#8217;t the models, it was me. The breakthrough came from understanding what&#8217;s actually happening under the hood.<\/p>\n<p>In this workshop, you will write a fully functioning agent harness in C++. Like those university compilers, it will not be production ready, but will serve as a laboratory for learning how generative AI large language models can be used as C++ programmers.<\/p>\n<p>By end of day, your agent will read code, write code, compile it, fix its own errors, and even modify its own source code to add new capabilities.<\/p>\n<p>You won&#8217;t ship this agent. But you&#8217;ll understand what Claude Code and Cursor are actually doing. When they break, you&#8217;ll know why. When new tools emerge, you&#8217;ll evaluate them with comprehension instead of hype.<\/p>\n<p>What You&#8217;ll Build:<\/p>\n<p>A C++ program that talks to an LLM API<br \/>\nSystem prompts that shape model behavior<br \/>\nTool definitions (read_file, write_file, run_command)<br \/>\nA working agentic loop<br \/>\nAn agent capable of modifying its own source<\/p>\n<p>What You&#8217;ll Understand:<\/p>\n<p>Why the same model acts completely different with different prompts<br \/>\nWhat &#8220;tool calling&#8221; actually means (spoiler: you do all the work)<br \/>\nHow context windows work and why you send the whole conversation every time<br \/>\nWhat &#8220;turns&#8221; are and how the conversation builds up<br \/>\nWhy agents sometimes go off the rails and how to prevent it<\/p>\n<p>Format: Lab-heavy. Students build; instructor guides. Starter code provided for API plumbing.<\/p>\n<h2>Prerequisites<\/h2>\n<p>In order to benefit from this class, you will need:<\/p>\n<p>Professional C++ experience\u2014you should be comfortable writing and debugging C++ code<br \/>\nBasic familiarity with REST APIs and JSON (we won&#8217;t teach HTTP or JSON parsing)<br \/>\nAn OpenRouter account with API key (free tier is sufficient for the workshop)<br \/>\nA laptop with a working C++ build environment (C++17 or later, CMake)<br \/>\nWillingness to experiment, break things, and discuss discoveries with fellow participants<\/p>\n<p>Starter code is provided that handles API communication and JSON parsing. You&#8217;re here to learn how AI agents work, not to debug libcurl.<\/p>\n<h2 class=\"p1\">Course Topics<\/h2>\n<p><strong>The &#8220;Dumb Model&#8221; Problem<\/strong><\/p>\n<p>How models generate responses<br \/>\nWhat happens when you ask an LLM to read a file it can&#8217;t access<br \/>\nWhy models hallucinate confidently, and what this tells us about how they work<br \/>\nThe fundamental statelessness of LLM interactions<\/p>\n<p><strong>System Prompts: Programming the Model<\/strong><\/p>\n<p>How the same model behaves completely differently with different prompts (and even with the same prompts).<br \/>\nThe three message roles: system, user, assistant<br \/>\nCrafting effective system prompts for coding tasks<br \/>\nLive experiments: helpful assistant vs. grumpy reviewer vs. pedantic standards lawyer<\/p>\n<p><strong>Tool Definitions and Tool Calling<\/strong><\/p>\n<p>JSON schema for describing tools<br \/>\nThe critical insight: tool definitions say how, system prompts say when and why<br \/>\nExamining tool call responses: finish_reason, tool_calls array, arguments<br \/>\nWhy adding a tool definition alone doesn&#8217;t make the model use it<\/p>\n<p><strong>Executing Tools and Returning Results<\/strong><\/p>\n<p>The tool result message format<br \/>\nSending results back to the model<br \/>\nWatching the model continue with new information<br \/>\nImplementing read_file, write_file, and run_command<\/p>\n<p><strong>The Agentic Loop<\/strong><\/p>\n<p>The fundamental pattern: Think \u2192 Request Tool \u2192 Execute \u2192 Observe \u2192 Repeat<br \/>\nDetecting when to stop: finish_reason, max iterations, user interrupt<br \/>\nError handling: what happens when tools fail<br \/>\nBuilding the complete loop in C++<\/p>\n<p><strong>Understanding Turns and Context<\/strong><\/p>\n<p>Why you send the entire conversation every time<br \/>\nHow the messages array builds up over multiple tool calls<br \/>\nContext window limits and their implications<br \/>\nWhat &#8220;turns&#8221; mean in practice<\/p>\n<p><strong>The Self-Improvement Challenge<\/strong><\/p>\n<p>Pointing your agent at its own source code<br \/>\nAsking it to add a new tool or improve error handling<br \/>\nWatching code that writes code<br \/>\nDiscussion: what worked, what didn&#8217;t, what surprised you<\/p>\n<h2>Course\u00a0Instructor<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-10135 alignright\" src=\"https:\/\/cppcon.org\/wp-content\/uploads\/2026\/02\/JodyHagins-1.jpeg\" alt=\"Jody Hagins\" width=\"175\" height=\"175\" srcset=\"https:\/\/cppcon.org\/wp-content\/uploads\/2026\/02\/JodyHagins-1.jpeg 1999w, https:\/\/cppcon.org\/wp-content\/uploads\/2026\/02\/JodyHagins-1-300x300.jpeg 300w, https:\/\/cppcon.org\/wp-content\/uploads\/2026\/02\/JodyHagins-1-1024x1024.jpeg 1024w, https:\/\/cppcon.org\/wp-content\/uploads\/2026\/02\/JodyHagins-1-150x150.jpeg 150w, https:\/\/cppcon.org\/wp-content\/uploads\/2026\/02\/JodyHagins-1-768x768.jpeg 768w, https:\/\/cppcon.org\/wp-content\/uploads\/2026\/02\/JodyHagins-1-1536x1536.jpeg 1536w\" sizes=\"auto, (max-width: 175px) 100vw, 175px\" \/><\/p>\n<p><strong>Jody Hagins<\/strong>\u00a0a Director at LSEG, working on high-frequency trading infrastructure, including feed handlers, normalization processes, and low-latency systems. His background spans four decades, from graduate work in AI during the 1980s (Lisp, Smalltalk, model-based reasoning) through Unix kernel development in C, to modern C++ for financial systems.<\/p>\n<p>After approaching generative AI with healthy skepticism born of living through two AI winters, Jody discovered that the tools had finally caught up, but only for those who understand how to use them effectively. His 2026 talk, &#8220;Meet Claude, Your New HFT Infrastructure Engineer,&#8221; demonstrated building a complete OPRA feed handler without writing code by hand.<\/p>\n<p>Jody has spoken at numerous C++ conferences on a wide range of C++ topics.<\/p>\n<h2>\u25c8 <a href=\"https:\/\/cppcon.org\/registration\/\">Register Here<\/a> \u25c8 <a href=\"https:\/\/cppcon.org\/cppcon-academy-2026\/\">See Other Offerings<\/a> \u25c8<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>AI++ 101 : Build a C++ Coding Agent from Scratch is a one-day onsite\u00a0training course with programming examples, taught by Jody Hagins. It is offered at the Gaylord Rockies from 09:00 to 17:00 Aurora time (MDT) on Sunday, September 13th, 2026 (immediately prior to\u00a0the conference). Lunch is included. \u25c8 Register Here \u25c8 See Other Offerings [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-10132","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/cppcon.org\/wp-json\/wp\/v2\/pages\/10132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cppcon.org\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/cppcon.org\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/cppcon.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/cppcon.org\/wp-json\/wp\/v2\/comments?post=10132"}],"version-history":[{"count":3,"href":"https:\/\/cppcon.org\/wp-json\/wp\/v2\/pages\/10132\/revisions"}],"predecessor-version":[{"id":10137,"href":"https:\/\/cppcon.org\/wp-json\/wp\/v2\/pages\/10132\/revisions\/10137"}],"wp:attachment":[{"href":"https:\/\/cppcon.org\/wp-json\/wp\/v2\/media?parent=10132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}