Spokes.wiki Search Graph Growth About

agentic-tooling-wiki

Blog Posting source ↗ source url updated Thu Jun 04 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

How to Build a Custom Agent Harness (LangChain)

langchain‘s how-to argument for building agents as model + harness, where the harness is “the scaffolding around the model that connects it to the real world.” Its sharpest claim is the agentic-coding-harness thesis stated cleanly: task-harness fit determines agent usefulness more than raw model capability. The contribution this source adds is a concrete composition mechanism for that scaffolding — agent-middleware.

The core loop + middleware

Prebuilt middleware catalogued

Context (SummarizationMiddleware, ContextEditingMiddleware), memory (MemoryMiddleware), environment (ShellToolMiddleware), delegation (SubAgentMiddlewareagent-orchestration), failure (ToolRetryMiddleware), policy (PIIMiddleware, HumanInTheLoopMiddleware → supervised gates like agent-kanban), cost (PromptCachingMiddleware), and autonomy steering.

Frameworks it names

Why it matters here

It’s the mechanism page the harness thesis was missing: prior instances (agentsys, gstack, …) asserted “structure substitutes for capability” as architecture; this names the unit of that structure — composable middleware on a minimal loop — and restates “everything else > the model” as task-harness fit.

agent-middleware · agentic-coding-harness · langchain · agent-orchestration · oh-my-pi · anthropic