AI Agent Harness From Scratch
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, andcli - 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
📧 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
Related articles
Why I'm Learning Neural Networks in 2026
Why I'm returning to neural networks after building AI agents, what I learned from micrograd, and my plan to work through makemore toward a small LLM of my own.
AI Software Factory with Codex: Plan, Code, Test - Indie Hacking Blog #4
An architecture walkthrough and prototype demo of an AI software factory with Codex: a persistent workflow engine for planning, coding, and testing, with YAML workflows, PostgreSQL state, retries, and human code review.
