A Simple Formula for GenAI: Model + Harness = Deployable Agent

Part of my continuous learning approach is to understand what the leading (sometimes bleeding) edge approaches are to using gen AI effectively for business.

We’ve seen prompt engineering, context engineering, agents, workflows, and many other terms that have been adapted to provide understanding about what could be done with gen AI.

A more recently adapted term is “harness”. Using a harness provides away to bring a number of components into a single functional structure. The attached images are iterative representations of what harnesses might include.

Using Perplexity as my research assistance and Google AI‘s Gemini to generate the images, here’s the gist of a harness.

Big picture: “Agent = Model + Harness”

Think of an AI agent like a very talented intern on The Office:

  • The model is the intern’s brain (Claude, GPT, etc.).
  • The harness is everything else around them: their job description, tools they’re allowed to use, how their work is checked, and how it plugs into your app.

Formula people keep using:

Agent = Model + Harness

So when you say “harness development, tool calling, and build to a specific AI model provider,” you’re talking about three layers:

  1. Designing the harness (the “agent shell” around the model).
  2. Implementing tool calling (letting the model actually do stuff, not just talk).
  3. Wiring all of this to a particular model provider (OpenAI, Anthropic, Azure, etc.).

Let’s walk through each, in high‑school‑friendly, sitcom‑compatible terms.


1. What a harness actually does

A harness is the runtime environment that governs how the model behaves in your system. In practice, a harness usually includes:

  • Context builder
    Assembles what the model sees: system prompt (“you are a coding agent”), recent conversation, relevant files, retrieved docs, etc.
  • Tool registry & dispatcher
    Keeps a list of allowed tools (file I/O, HTTP, DB queries, tests) and actually runs them when the model asks.
  • Safety and permissions
    Guardrails like “no shell commands that rm -rf” or “can’t read .env”. Often hooks that run before and after a tool call.
  • State & observability
    Logs what happened, tracks intermediate artifacts (scratch files, plans, test runs), and makes long‑running sessions manageable.

One author describes harness engineering as designing constraints, feedback loops, and quality gates so agents don’t turn into chaos goblins. Without it, the agent is just “a model behind a chat box.” With it, it becomes a deployable workflow component.

A lot of harness patterns for coding agents now use multiple roles—planner, generator, evaluator—and pass files or structured artifacts between them.


2. Tool calling: how the model “pushes buttons”

Tool calling is the mechanism that lets a model say, “I can’t just guess; let me call this function.” Under the hood, most providers do something like this:

  1. You define tools as functions with schemas (name, description, parameters).
  2. You send user input and tool definitions to the model.
  3. The model chooses tools and arguments in a structured format.
  4. Your harness executes those tools and feeds results back to the model.

For example (conceptually, not exact code):

  • Tool: run_tests({ test_suite: string })
  • The model replies: “Call run_tests with test_suite = ‘payments’.”
  • Harness runs your test runner, gets output, then calls the model again with: “Here’s the test output: …”.

Microsoft’s .NET abstractions (and similar ones in other stacks) formalize this pattern: tools are configured on options, models return structured tool call responses, and your code dispatches them.

Modern harnesses add a bunch of extras around tool calling:

  • Pre‑tool hooks: block risky calls, sanitize arguments, enforce permissions.
  • Post‑tool hooks: validate results, summarize logs in LLM‑friendly form, or generate auto‑feedback for self‑correction.
  • Error handling: retries, fallbacks, circuit breakers if a tool keeps failing.

So tool calling is not just plumbing; it is the main way the harness turns “predicted text” into “actual actions in your system.”


3. Building to a specific AI model provider

Different providers are like different casting agencies: they all supply actors, but the contracts, APIs, and quirks differ.

Most “agentic harness” platforms now support multiple providers with unified abstractions. To build to a specific one, you typically care about:

  • Model selection & capabilities
    • Does this model support tool/function calling? Parallel tool calls?
    • Context window size, streaming support, latency vs cost tradeoffs.
  • Provider client & endpoints
    You integrate with the provider’s SDK or HTTP API and map your harness’s generic “call_model()” into provider‑specific requests, including things like temperature, max tokens, stop sequences, etc.
  • Auth, rate limits, and throughput
    Provisioned throughput, quotas, throttling behavior; the harness often manages retries and backoff tied to these limits.
  • Vendor‑specific features
    • Some providers expose special logging, evals, or trace metadata.
    • Some have their own tool/plugin ecosystems (MCP servers, internal tools).

A lot of modern harnesses treat providers as pluggable backends: the workflow, tools, and controls are constant, but you can swap “which model” by configuration. That’s handy if your actor (model) changes but the show (agent) remains.


Quick comparison table

Here’s a simple mental model to separate the concerns:

LayerMain responsibilityTypical examples / concerns
ModelPredict the next tokens, reason, planModel choice, temperature, context window, tool support
HarnessGovern the interaction, tools, safety, stateContext assembly, tool registry, guards, logging
Tool callingLet the model take structured actionsFunction schemas, dispatch, hooks, error handling
Provider integrationTalk to a specific vendor’s API reliablySDK wiring, auth, rate limits, capabilities mapping

  1. https://xmpro.com/your-ai-agent-needs-a-harness-heres-what-that-means-for-industrial-operations/            
  2. https://www.reddit.com/r/AgentsOfAI/comments/1rrxko2/the_most_interesting_ai_work_right_now_may_be_in/  
  3. https://martinfowler.com/articles/harness-engineering.html     
  4. https://learn.microsoft.com/en-us/dotnet/ai/conceptual/calling-tools         
  5. https://dev.writer.com/blueprints/toolcalling      
  6. https://www.thetoolnerd.com/p/10-agent-harnesses-every-ai-builder           
  7. https://www.reddit.com/r/AI_Agents/comments/1rts1kk/opensource_harness_for_ai_coding_agents_to_reduce/ 
  8. https://openai.com/index/harness-engineering/    
  9. https://www.augmentcode.com/guides/harness-engineering-ai-coding-agents       
  10. https://www.youtube.com/watch?v=ulNsa0sD8N0   
  11. https://www.anthropic.com/engineering/harness-design-long-running-apps 
  12. https://www.mindstudio.ai/blog/ai-coding-agent-harness-stripe-shopify-airbnb  
  13. https://community.databricks.com/t5/generative-ai/tool-calls-with-workspace-models/td-p/108598      
  14. https://www.youtube.com/watch?v=zuMw0pkPXpU
  15. can-this-book-be-accessed-http-FADUy9FRSE.xkF5cFNKrzQ.md
  16. https://github.com/ai-boost/awesome-harness-engineering
Categories:

Leave a Reply

Your email address will not be published. Required fields are marked *