LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Agent
  • Middleware
  • Backends
  • Sandboxes
  • Skills
  • Subagents
  • Types
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
  • Vitest
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

OverviewAgentMiddlewareBackendsSandboxesSkillsSubagentsTypes
Modal
Daytona
Deno
Node VFS
Sandbox Standard Tests
Vitest
Language
Theme
JavaScriptdeepagentsbrowserHarnessProfile
Interface●Since v1.10

HarnessProfile

Copy
interface HarnessProfile

Properties

View source on GitHub
property
baseSystemPrompt: string | undefined
property
excludedMiddleware: Set<string>
property
excludedTools: Set<string>
property
extraMiddleware: AgentMiddleware<any, any, any, readonly ClientTool | ServerTool[]>[] | () => AgentMiddleware<any, any, any, readonly ClientTool | ServerTool[]>[]
property
generalPurposeSubagent: GeneralPurposeSubagentConfig | undefined
property
systemPromptSuffix: string | undefined
property
toolDescriptionOverrides: Record<string, string>

Frozen runtime harness profile that shapes agent behavior at assembly time.

Created by createHarnessProfile from user-provided HarnessProfileOptions. Collection types are narrowed (arrays → Set, records frozen) and all fields are required. The object is frozen via Object.freeze() to prevent mutation after construction.

Profiles are orthogonal to model selection: they control prompt assembly, tool visibility, middleware composition, and subagent configuration — not which model is used.

Replaces the default BASE_AGENT_PROMPT when set.

Use this when a model requires a fundamentally different base prompt rather than an additive suffix. Most profiles should prefer systemPromptSuffix instead.

Middleware names to remove from the assembled middleware stack.

Matched against each middleware's .name property. Cannot include required scaffolding names (FilesystemMiddleware, SubAgentMiddleware) — attempting to do so throws at construction time.

Tool names to remove from the agent's visible tool set.

Applied via a filtering middleware after all tool-injecting middleware have run, so it catches both user-provided and middleware-provided tools.

Additional middleware appended to the stack after user middleware.

Can be a static array or a zero-arg factory that returns fresh instances per agent construction (important when middleware carries mutable state).

Configuration for the auto-added general-purpose subagent.

Text appended to the assembled base prompt with a blank-line separator (\n\n).

This is the primary mechanism for model-specific prompt tuning. Applied uniformly to the main agent, declarative subagents, and the auto-added general-purpose subagent.

Per-tool description replacements keyed by tool name.

Allows profiles to rewrite tool descriptions for models that respond better to different phrasing. Keys that don't match any tool in the final tool set are silently ignored.