Agentic Pattern Libraryby Vikas Goyal
← All patterns
22

Agent Harness

Also known as: agent runtime, harness as platform, agent operating layer

A reusable runtime for loop, tools, memory, permissions and progress, instead of one-off scripts.

TrackAgentic systems FamilyRuntime & interop Maturity Emerging ChangesTool/actionContextDecision
01

Problem

Most teams build each agent from scratch: its own loop, tool wrappers, memory, permission checks and logging. The result is a dozen agents that each solve the same problems slightly differently, none of them well, and none of them governed in one place. The model is the same across all of them; the code around it is what varies and breaks.

  • Every agent needs the same plumbing (loop, tools, memory, policy, logs).
  • Teams want to ship specific agents quickly, not rebuild infrastructure.
  • Security and compliance want one place to set and audit the rules.
  • A shared platform can become a bottleneck if it’s too rigid.
02

Solution

Build the harness once and treat it as the platform. It runs the agent loop and owns the shared services: tool connections, context management and compaction, memory, skills, permission policy, sandboxes, budgets, progress tracking and logging. Agents, workflows and prompts become configuration that lives on the harness. Some of that configuration is provided centrally by the organization and some is built by teams or individual employees, all inside the same policy envelope. Improving the harness improves every agent at once.

03

Diagram

CONFIGURATION · lives on the harness Corporate layershared agents · skills · policy Employee layerpersonal workflows · prompts HARNESS · the platform agent loop tools via protocols memory · compaction skills policy · approvals sandboxes budgets · progress traces · audit Models Enterprise systems

The harness is the platform, and agents are configuration on top of it. Corporate and employee-built layers share the same services and the same rules.

04

When to use

Use it when

  • An organization plans more than a handful of agents
  • Governance, audit and security need one enforcement point
  • Employees should be able to build their own agents and workflows safely
  • Agents run long tasks that need progress tracking and recovery

Avoid it when

  • A single, narrow agent with no plans to add more
  • A prototype where speed matters more than reuse
  • The platform would be so rigid that teams route around it
05

Trade-offs

Latency Little overhead per step once built
Cost Upfront platform investment; cheaper per agent after
Complexity A real platform with owners, versions and roadmap
Reliability Shared, tested plumbing beats many one-off scripts

Gains

  • New agents become configuration, not new code
  • One place to enforce policy, audit and observe every agent
  • Improvements to memory, tools or safety reach all agents at once

Costs

  • Significant upfront investment and an owning team
  • Platform decisions constrain every agent built on it
  • Version changes in the harness need careful rollout
06

Worked example

Scenario
A company moves from 9 separately built agents to one internal harness.
  1. Before9 agents across 5 teams, with 4 different tool wrappers, 3 memory approaches and no shared audit log. Security can’t answer which agents can send external email.
  2. HarnessProvides the agent loop, tool connections through a standard protocol, tiered memory, a policy engine, sandboxes, budgets and one trace store.
  3. Corporate layerIT publishes shared skills (“book travel”, “file expense”) and the policy: external email needs approval, and spending is capped per role.
  4. Employee layerA sales engineer builds a personal “RFP first draft” workflow from existing skills in an afternoon. It inherits every policy automatically.
  5. After 6 months34 agents and workflows run on the harness. Security answers the external-email question with one query, and a memory improvement shipped once reaches all 34.
07

Failure modes

FailureSymptomMitigation
Platform too rigidTeams build shadow agents outside the harnessExtension points for custom tools and logic within the policy envelope
Leaky abstractionAgent builders need to understand harness internals to debugGood traces and docs; clear contracts for tools and skills
Big-bang upgradesA harness update breaks many agents at onceVersioned releases, canary agents and eval suites per agent
Ownership gapNobody owns the harness roadmap; it stagnatesA platform team with a backlog driven by agent builders