AI · AIC-66

AI Harness Engineering

AI Harness Engineering is a 12-hour training course by IT Genius Institute. When an AI agent has to work through dozens of steps, call real tools, edit real files and run commands on real systems, what makes it trustworthy is not the…

Updated
From 4,410 THB / person 4,900 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration12 hours · 2 days
  • FormatOnsite / live online
  • Next roundOn request
  • LevelAdvanced

Course overview

When an AI agent has to work through dozens of steps, call real tools, edit real files and run commands on real systems, what makes it trustworthy is not the model alone but the harness, the runtime wrapped around the model. That means a loop that knows when to stop, tools whose errors are clear enough for the agent to correct itself, policies enforced in code rather than requested in a prompt, and context management that keeps the agent from degrading as the work gets longer.

This course takes engineers who already use AI to write code and moves them from AI user to system builder. Learners dissect commercial coding agents to see how a harness differs from a framework, then write specs for each part precisely enough for a coding agent such as Claude Code or Cursor to implement: an agent loop with step and token ceilings, the tool layer, hooks and middleware, context engineering, subagents, and sandboxing with checkpoints for long-running work. Along the way they practice reading AI-written code to find design flaws that tests miss, and they finish with a capstone on a real repository where they must justify architecture decisions that go against the agent's suggestions. (2 days, 6 hours per day, 12 hours in total, Advanced level.)

What you’ll gain

  • Write specs for agent runtime components precise enough for a coding agent to implement correctly
  • Spot design flaws in AI-written code that ordinary tests do not catch
  • Build and control an agent loop with step and token ceilings and clear stop conditions
  • Design tool interfaces and error surfaces that let the agent correct its own mistakes
  • Use hooks and middleware to enforce policy deterministically instead of relying on prompts
  • Manage context with compaction, tool-result clearing and external memory, with measurable trade-offs
  • Use sandboxing and checkpoints so long-running agents can recover from failure
  • Justify architecture decisions and evaluate or adapt Agent SDK components

Who this course is for

  • AI engineers who want to move from using AI to building agent systems
  • Backend engineers who need to connect agents to real systems and tools
  • Tech leads who choose the agent architecture for their team
  • Architects who review AI-written work at the design level
  • Platform engineers who operate and maintain agents running in the organization

Prerequisites

  • Has already used AI chat or a coding agent to write code; this course is not for people looking for no-code tools
  • Writes Python fluently and understands async / await in Python 3.12
  • Basic working knowledge of Git, the command line and Docker
  • A coding agent account (Claude Code or Cursor) and an LLM API key with credit

Curriculum

Course Details

A 2-day course, 6 hours per day (12 hours in total, 09:00-16:00), alternating lectures with workshops in which learners write specs and have a coding agent build each part of the harness, one on top of the other, until the system is complete. Advanced level. Learners must be able to write async Python and should already have used AI to help write code. Every

workshop runs on the learner's own machine with Docker. Learners bring their own coding agent account and an LLM API key with credit; API usage is billed by actual use. Anyone who wants a foundation in using agents across software development first should take the AI Coding Agent for SDLC course. Learners take home a lab guide, sample spec files, and the harness source code for every workshop.

Day 1 Runtime Core: Loop, Tools and Hooks

Section 1: Anatomy of a Harness

  • How a harness differs from a framework, and who owns the control flow

  • The components of an agentic AI system: model, loop, tools, context and policy

  • Dissecting commercial coding agents to see what each part does

  • Configuring the Claude Code and Cursor setups used in class to work from specs

Section 2: The Agent Loop

  • The observe, decide, act and verify cycle of an agent

  • Setting step budgets and token budgets per task

  • Stop conditions and detecting loops that never finish

  • Structured tracing so you can replay what the agent decided at each turn

Section 3: Workshop: Building the Agent Loop from a Spec

  • Write a loop spec with explicit step and token ceilings

  • Define the stop conditions and the trace format you need

  • Have a coding agent implement the loop in async Python

  • Review the result, find design flaws the tests miss, and direct the fixes

Section 4: The Tool Layer

  • Tool descriptions are part of the prompt and must be designed deliberately

  • Schemas precise enough that the model never has to guess parameters

  • Error surfaces that state the cause and the fix so the agent can self-correct

  • Idempotency for side-effect tools, and truncating oversized results before they return to the context

Section 5: Workshop: File Read, File Edit and Run Command Tools

  • Write specs for file read, file edit and run command tools

  • Design error messages the agent can act on

  • Have the coding agent build the tools and wire them into the loop from the first workshop

  • Test failure cases and very large outputs

Section 6: Hooks and Middleware

  • Policy belongs in the runtime, not in the prompt

  • Deterministic lifecycle hooks that run before and after tool calls

  • Ordering a middleware chain and what changes when the order changes

  • Workshop: have the coding agent build a middleware chain from a spec without touching the loop code

Day 2 Context Engineering and Recovery

Section 7: Context Engineering

  • Why long-running agents gradually degrade

  • Tool-result clearing: removing old results that are no longer needed

  • Compaction: condensing history into structured blocks

  • External memory that survives a context reset

  • Why all three are needed together, and how to measure the trade-offs

Section 8: Workshop: Implementing Context Engineering

  • Write specs for tool-result clearing, compaction and external memory

  • Have the coding agent build all three and connect them to the harness

  • Measure before and after with traces, both token counts and task quality

Section 9: Subagents and Context Isolation

  • Isolating the context of each subagent

  • Short return contracts with pointers to the full details

  • The risks when each part reduces context on its own without coordination

  • Deciding when to split work into subagents and when not to

Section 10: Sandboxing and Recovery

  • Limiting filesystem, network and process access with Docker

  • Retries that do not repeat work that already succeeded

  • Checkpoint and resume with SQLite for long-running tasks

  • Cost caps and kill switches when an agent exceeds its limits

  • Exporting traces with OpenTelemetry to follow failed runs

Section 11: Agent SDK Scope and Moving to Other Domains

  • Comparing an Agent SDK with a custom-built harness

  • Criteria for extending what exists versus rebuilding

  • Evaluating and adapting Agent SDK components

  • Carrying the knowledge to customer service, data and RAG agents

Section 12: Capstone: A Coding Agent on a Real Repository

  • Use the harness and a coding agent on a real repository

  • Review the agent's work from an architectural point of view

  • Present three decisions that contradict the agent's suggestions, with reasons

  • Summarize how to bring the harness into the team's own work

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

Who is AI Harness Engineering for, and what background is needed?

Built for AI engineers who want to move from using AI to building agent systems · Backend engineers who need to connect agents to real systems and tools · Tech leads who choose the agent architecture for their team Background you should have: Has already used AI chat or a coding agent to write code; this course is not for people looking for no-code tools · Writes Python fluently and understands async / await in Python 3.12 Not sure the fit is right? Talk to our team on LINE @itgenius or call 02-570-8449.

How much does AI Harness Engineering cost and how long does it run?

THB 4,900 (currently THB 4,410 on promotion). The course runs 12 hours. The price excludes 7% VAT (for payment in a company's name). Pay by bank transfer to the company account, confirm it on our payment page, and we can issue the receipt or tax invoice in your company's name.

Do I get a certificate?

Yes. Everyone who completes the course receives a Certificate of Completion from IT Genius Institute. Each certificate carries its own number, and anyone holding that number can verify it online on our certificate page, so you can add it to your portfolio or pass it to HR as evidence of training.

Where does the training take place, and is there an online option?

You can attend onsite at IT Genius Institute or arrange to join online, and we also run it as a private in-house session for your team. Ask about dates and venues on LINE @itgenius or call 02-570-8449.

What if I fall behind or miss a session — can I retake it?

Yes. You may retake the same course free of charge in a later round, under the institute's conditions. Tell our team which course and round you attended, and we will check it and offer you the rounds that still have seats. Ask us on LINE @itgenius or call 02-570-8449.

How do I enrol, or request a quotation for my company?

Enrol online with the registration form on this page. You can register several attendees at once and enter your tax ID and billing address for the tax invoice. Or request a company quotation straight from the quote button. For anything else call 02-570-8449 or reach us on LINE @itgenius.