Creating an Agent Harness: From the Loop to a Multi-Agent Architecture

At nowtec solutions we come from an activist background, and it left us with a habit: when a tool doesn’t exist the way we need it, we build it. Right now the tool everyone is talking about is the “AI agent” — and most of what gets sold under that name is a single model call in a trench coat. So we started building a real one, from scratch, in public. It’s called Whale, I’m the one at the keyboard, and the first two build sessions are online.

An agent harness is the software around a language model — a control loop, memory and tool access — that turns a single model call into an agent that pursues a goal. This is the through-line of those two sessions: the one idea that makes agents click, and the architecture that takes them beyond the usual limits.

A harness is a loop, not a call

The moment agents start to make sense is when you stop thinking “prompt in, answer out” and start thinking in a loop:

act → observe → decide → repeat → exit

A single LLM call answers a question. A harness pursues a goal: it calls a tool, observes the result, decides the next move, and repeats until an exit condition is met. Everything else — the skills it can use, the memory it reads and writes, which model sits behind it — hangs off that loop. Get the loop right first, and the rest has somewhere to attach.

The first build

In the first session we go from definitions to something that actually runs. The stack is deliberately boring and portable, because boring is what you can still maintain in a year: a uv-managed Python project, a Typer command-line interface for the surface, and LiteLLM as a model-abstraction layer so the harness is model-agnostic — DeepSeek by default for cost, any provider on a flag. Underneath sits a config architecture in the user’s home directory — skills, agents, MCP connectors, and memory — plus a structured logger so every step is inspectable.

The payoff at the end of Part 1 is small but real: the first prompt routes all the way through to a completion, with logging in place. That skeleton is what every later capability hangs on.

Creating an AI Agent Harness: Iteration 1 Creating an AI Agent Harness: Iteration 1 — watch on YouTube →
Part 1 — concepts and the first build. Chapters: 00:00 Intro · 04:00 Anatomy of a harness · 11:00 Config architecture · 16:00 Start coding (uv, DeepSeek) · 30:00 Model abstraction (LiteLLM) · 42:00 Coding agents · 48:00 It works · 56:00 Recap.

Beyond ReAct

Most agent frameworks stop at ReAct: reason → act → observe, looping over tools and memory. In the second session we step back and ask what a richer architecture looks like — because architecture, not the model, is what decides whether you build something genuinely new or just another wrapper.

Our pipeline goes further than the standard loop:

  • retrieve — pull back what happened before, from memory.
  • learn — a sub-loop that builds higher-level understanding of that context, not just recall.
  • plan — planning agents that lay the work out over a tree or graph, not a flat list. And because it’s a loop, the plan itself can be iterated.
  • research — go deeper down the plan with a swarm of agents before committing to act.
  • execute — produce the output for the user, again parallelisable across a swarm.

A swarm here is a set of agents generated on the fly, working in parallel on a slice of the problem. That dynamic, multi-agent generation is the part we think separates a harness from a wrapper.

Creating an AI Agent Harness: Iteration 2 — In-Depth Architecture Creating an AI Agent Harness: Iteration 2 — In-Depth Architecture — watch on YouTube →
Part 2 — in-depth architecture. Chapters: 00:00 Recap · 03:45 Beyond retrieve: “learn” · 05:00 Plan, research, execute · 15:00 Analyzing an existing harness · 22:30 Memory as a semantic wiki · 45:00 Session memory · 55:00 A directed-graph architecture · 90:00 Wiring it into Whale.

Why we build it in public — and local-first

Two reasons. First, the design decisions are the actual value. Watching them get made — including the wrong turns — is far more useful than a polished result with the reasoning sanded off.

Second, we run this local-first. The models can sit on our own hardware, and that matters when you care where your data and your intellectual property go. It’s the same reason we argue for digital sovereignty everywhere else in our work: the more of the stack you own, the less you depend on someone else’s terms of service. It’s also why we built nowLLM, a sovereign AI for organisations that want to keep their data in their own hands. An agent harness you run yourself is sovereignty at the level of automation.

Parts 3 and 4 continue the build. If you work with agents — or you’re an NGO wondering what “agentic AI” will actually mean for your operations — this is a good moment to follow along.

Watch the build

This article was written with the support of AI tools and reviewed by our team before publication (EU AI Act, Art. 50).

Let’s connect.

Fill out the form below and tell us what you are looking to solve. We will get back to you with tailored advice and solutions to match your needs.

Vladimir Stajilov

CTO @nowtec solutions | nowCRM | nowCDP | 🤖 Automation with AI and LLMs 🔌 Low-Code ☁️ Cloud
Browse Posts