Back to blog
AIRustVideo

AI Agent Harness From Scratch

August 13, 2026
•
26 minutes video
Watch on YouTube ↗

Video description

Build an AI agent harness from scratch in Rust.

In this video, I break down how coding agents such as Claude Code, Codex, and OpenCode work under the hood, then build a small working agent harness myself using Rust.

I'll cover:

  • What an AI agent harness actually is
  • How the agent loop works
  • How an LLM can decide when to execute tools
  • How tool results are returned back to the model
  • How to build a simple coding agent CLI
  • How I structured the project into core, storage, and cli
  • How chat history and durable sessions work
  • Why unrestricted Bash execution is powerful - and dangerous

Timestamps: 00:00 - Introduction 00:30 - Architecture 05:12 - Source Code 09:30 - How AI Agent Works 18:00 - JSONL format for Chats 21:50 - Demo 25:00 - Article & Source Code

This is intentionally a small implementation designed to show what an AI agent harness actually does without hiding the important parts behind a framework.

Source code - EliCode:
https://github.com/vitalii-honchar/elicode

Full article: https://www.vitaliihonchar.com/insights/how-to-build-your-own-ai-agent-harness-in-rust

If you're interested in "Rust, AI agents, LLM infrastructure, backend engineering, and building AI systems from first principles", subscribe for more engineering videos.

#rust #aiagents #llm #programming #softwareengineering

Watch on YouTube

Watch AI Agent Harness From Scratch on YouTube

📧 Stay Updated

Get weekly insights on backend development, architecture patterns, and startup building directly in your inbox.

Free • No spam • Unsubscribe anytime

Share this article

Vitalii Honchar portrait

Meet Vitalii Honchar

Senior Software Engineer specializing in high-load systems, AI/ML infrastructure, and cloud-native architectures. With experience at companies like Pinterest, Revolut, Form3, and Ajax Systems, I focus on building scalable, efficient, and robust systems that solve complex technical challenges.

More About Vitalii →
AI Agent Harness From Scratch | Vitalii Honchar's Blog