Spokes.wiki Search Graph Growth About

agentic-tooling-wiki

Defined Term mechanism updated Thu Jun 04 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

Agent middleware

The composable unit of an agentic-coding-harness: a piece of scaffolding that hooks into the agent’s core loop at defined points and handles one concern, so a harness is assembled by stacking middleware rather than adopting a monolithic framework langchain-custom-harness.

The hook points

A base agent loop is just model → calls tools → repeat until done. Middleware can intervene before/after each model call, before/after each tool call, and at agent startup & teardown langchain-custom-harness. That gives the harness its real job — delivering the right context to the model at each step — a place to act.

Four levers

  1. Deterministic logic — business rules / dynamic control (do mechanical work in code, not tokens).
  2. Tool lifecycle — setup, teardown, registration.
  3. Custom state — tracking across the run (cf. durable-agents’ workflow-state separation).
  4. Stream handlers — transforming model/tool output.

Prebuilt examples (LangChain)

Context engineering (SummarizationMiddleware, ContextEditingMiddleware), memory (MemoryMiddleware, cf. gbrain), environment (ShellToolMiddleware), delegation (SubAgentMiddleware — the agent-orchestration fan-out as a drop-in), retries (ToolRetryMiddleware), policy/governance (PIIMiddleware, HumanInTheLoopMiddleware — the supervised-gate pattern of agent-kanban), and cost (PromptCachingMiddleware).

Why it matters

It’s the mechanism under the harness thesis. Where agentic-coding-harness says structure substitutes for capability, middleware names the structural primitive: small, single-concern, composable. It reframes harness-building as selecting and ordering middleware for the task — the engineering surface behind “task-harness fit > raw model capability” langchain-custom-harness. The named LangChain middleware also map cleanly onto concerns this wiki already tracks separately (orchestration, durability, supervision, skills/memory), suggesting the harness is a middleware stack over those threads.

agentic-coding-harness · langchain-custom-harness · langchain · agent-orchestration · durable-agents · spec-driven-development