Artificial Intelligence

LangChain Deep Agents Harness Profiles: A Practical Guide

LangChain shipped per-model harness profiles for Deep Agents: prompts, tools, middleware tuned per model. Practical guide for mobile and automation teams.

İlker Ulusoy 2026-05-09 9 min read

On May 7, 2026, LangChain shipped harness profiles for Deep Agents, a declarative way to override an agent's system prompt, tools, and middleware on a per-model basis. Profiles for OpenAI, Anthropic, and Google models ship by default. For teams running mobile, automation, and agent orchestration on multiple models, this is the missing piece between "works on GPT" and "works on whatever the router picked today." This guide explains what harness profiles are, why per-model configuration matters, and how they fit alongside n8n, Hermes Workspace, and Sakana Conductor.

For most of the last year, the Deep Agents harness shipped one set of prompts, one tool list, and one middleware stack aimed to work well across every supported model. That is a reasonable default for a single-model project. It quietly breaks down the moment a routing layer like Sakana Conductor sends one task to Claude, the next to GPT-5, and a third to Gemini in the same run. Each model rewards a different prompting style, tolerates a different tool surface, and needs different output validation. Harness profiles are LangChain's answer: a per-model configuration bundle the agent picks up automatically when a given provider or model is selected.

The 30-Second Version

Harness profiles are declarative overrides for the parts of a Deep Agents harness that vary per model: prompt prefix and suffix, tool inclusion and naming, middleware selection, subagents, and skills. Profiles ship for OpenAI, Anthropic, and Google by default and merge with provider-level and model-level overrides at resolution time. Available in Python today; TypeScript coming soon.

What Harness Profiles Actually Ship

A harness profile is a YAML- or JSON-backed configuration bundle that applies after the model is built, without rewriting the agent. LangChain ships them as a first-class layer in Deep Agents, with five knobs that matter for production agent orchestration:

  • System prompt prefix and suffix — short, model-aware blocks that wrap your base prompt. A reasoning model gets a different prefix from a fast cheap model.
  • Tool inclusion and naming — turn tools on or off per model, and rename the same underlying tool to match each model's preferred convention.
  • Middleware selection — pick the validators, retries, schema migrations, and timeout policies that suit the model. A model that hallucinates JSON gets a stricter validator than one that does not.
  • Subagent configuration — choose which subagents are reachable from the parent and how they are described in the prompt, so a smaller model is not overloaded with a 12-subagent menu.
  • Skills — bind named skills (search, code execution, retrieval) to the profile and let each model see only the skills it handles well.

Profiles register under a provider name like "openai" or a provider-plus-model key like "openai:gpt-5.4". Provider-level and model-level profiles merge at resolution time, so a team can set OpenAI-wide defaults once and override only the GPT-5.4 row when a new model lands.

Why Per-Model Harness Configs Matter

In a single-model project, every model-specific choice gets baked into the base prompt and the base tool list, and the agent ships. In a multi-model project, that approach turns the base prompt into a compromise that fits no model well. Three concrete shifts make the per-model approach worth the indirection.

Different models reward different prompts

Reasoning-heavy models read long, structured prompts with explicit plan steps. Fast chat models do better with shorter, punchier instructions. The same agent run, routed to two different models, wants two different prefixes. Profiles let you ship both without a branching if model == "gpt" mess in the agent code.

Tool surfaces are not portable

A tool that one model invokes cleanly will be misused by another. The fix is not always to rewrite the tool. Often it is to hide that tool from the weaker model, or rename it so the docstring lines up with the model's training distribution. Tool inclusion and renaming per profile keeps the underlying implementation single-sourced.

Middleware needs match the model

Output validators, schema migrations, retries, and node-level timeouts all depend on how the model behaves. A model that drifts out of the JSON schema after long runs needs an aggressive validator and a schema-migration step; a model that respects the schema does not. Wiring middleware per profile means the strict path is reserved for the models that actually need it, instead of taxing every run.

The harness, not the weights, is the surface where most production agent quality lives. Harness profiles are the cleanest way to admit that out loud and ship a configuration that respects each model's shape.

Anatomy of a Harness Profile

A profile is small. It does not replace your agent code; it nudges the harness around the model. A typical Deep Agents profile covers the same five fields, with sensible empty defaults:

FieldWhat it controlsExample
prompt.prefixShort block prepended to the system promptReason step by step. Use the plan tool before any other tool.
prompt.suffixShort block appended to the system promptIf unsure, ask the user one targeted question instead of guessing.
tools.includeTools enabled for this modelplan, search, run_code
tools.renamePer-tool name overridesrun_code → execute_python
middlewareValidators, retries, timeoutsjson_schema_v2, retry_3x, timeout_60s
subagents.allowedWhich subagents the parent can spawnresearcher, writer
skills.bindNamed skills exposed to this modelweb_search, repo_read

The shape is the point. A profile is a configuration document, not a code branch. It can live next to the model registry, get reviewed in a pull request, and roll back like any other config artifact when a model update changes behavior.

Where Harness Profiles Fit in Your Stack

Harness profiles do not replace your workflow tool, your routing layer, or your durable runtime. They sit inside the agent layer as the per-model configuration surface. Side by side:

LayerToolWhat it owns
Visual workflown8nTriggers, integrations, human-readable flow steps
Mobile orchestrationHermes WorkspacePhone-side approvals and an agent control plane
RoutingSakana ConductorPicks which model handles which subtask
Durable runtimeCloudflare Project ThinkCrash-safe execution, sub-agents, persistent sessions
Long-horizon swarmKimi K2.6300 parallel sub-agents, 4,000 coordinated tool calls
Per-model harness configLangChain Deep Agents profilesPrompt, tools, middleware, subagents, skills per model

The boundaries are real. Sakana picks the model. Project Think keeps the run alive. Hermes runs the phone-side approval loop. LangChain Deep Agents profiles make sure the model that Sakana picked is then prompted, tooled, and validated the way that specific model wants to be handled.

Five Practical Use Cases for Halmob-Style Stacks

Multi-model n8n flows

An n8n flow calls a Deep Agent step that today runs only on one model. Add Anthropic and Google profiles, point the routing at a cost-and-latency policy, and watch the same flow keep working as the model under it changes. The flow visualization stays simple; the per-model differences live in the profiles, not in the flow.

Phone-approved agent runs that span providers

A Hermes Workspace user kicks off a deep research run from the phone. The first leg uses a fast model for query expansion; the second leg uses a reasoning model for synthesis. Profiles change the prompt and the toolset between legs without the user noticing, so the result the user approves is consistent.

Mobile assistants with offline-friendly fallbacks

Mobile automations often need to keep working when the primary model is rate-limited or unavailable. A profile for the fallback model ships a tighter tool list and a stricter validator, so a downgrade does not turn into a silent quality drop.

Compliance-grade JSON output

A regulated workflow needs schema-clean JSON every time. The profile for the model that drifts ships a schema-migration middleware and a 3x retry; the profile for the model that does not drift ships neither. The agent code stays one path; the strictness moves into the profile.

Subagent menus sized to the parent model

A small parent model that gets confused by a 12-subagent menu can run with a 3-subagent profile, while the same parent role on a larger model exposes the full menu. The agent is still one agent; the menu it sees is profile-driven.

Why This Matters for Mobile Automation

Per-model harness profiles are the configuration surface behind the orchestration story we covered in Sakana Conductor multi-agent orchestration and the durable execution layer in Cloudflare Project Think. Sakana decides which model handles a task. Project Think keeps the run alive across crashes. Profiles make sure the chosen model is prompted, tooled, and validated the way that model actually prefers.

How to Get Started

  1. 1Read the LangChain Deep Agents harness reference and the harness-profile launch post. Pay attention to how provider-level and model-level profiles merge at resolution time.
  2. 2Pick one Deep Agent that already runs on two or more models in production, even informally. That is the cheapest place to feel the value of a per-model profile.
  3. 3Move the model-specific bits out of the base prompt into a profile. Start with the prefix, suffix, and tool include list; add middleware once you have a baseline.
  4. 4Wire profiles into your routing layer. If you use Sakana Conductor or a similar router, the profile key should follow the model identifier the router emits, so a routing change is also a profile change.
  5. 5Instrument profile resolution. Log which profile won for which run, so a regression after a model update is easy to map back to the configuration that changed.

If you are still mapping out the agent layer, our OpenClaw 101 guide explains the building blocks (tools, skills, permissions, memory), and the Hermes Workspace mobile orchestration post covers the phone-side approval surface that sits in front of the agent.


The Bottom Line

Harness profiles are LangChain's admission that a single set of prompts, tools, and middleware cannot serve every model well, and the answer is configuration, not code. Prompt prefix, tool inclusion, middleware, subagents, and skills all become per-model overrides that merge at resolution time. For a team already running n8n, mobile orchestration, a routing layer, and a durable runtime, this is the layer that finally lets the same agent stay sharp as the model under it changes.

The question to take into your next sprint is simple. Which of your agents would behave better tomorrow if its prompt, tool list, and validators followed the model the router actually picked, instead of the one model the agent was originally tuned for?