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
How To Keep Building Side Projects in AI era?
How do you stay motivated to build projects when AI tools are taking over more of the coding? Building projects is an essential part of the indie hacking journey. But as a software engineer, it can be difficult to keep going when AI is changing the work that made you excited about building software in the first place.
A Better Way to Brainstorm Startup Ideas | Indie Hacking Vlog #3
In this video, Iām improving my indie hacking brainstorming process by using the How Might We technique to move from problems and product vision toward concrete product ideas. Instead of immediately brainstorming features or startup ideas, I start by defining the product vision: what problem I want to solve, who I want to help, and what outcome the product should create. I also explain the criteria I use to evaluate and vote on different directions.
