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
JavaScriptdeepagentsprofilesharnessapplyProfilePrompt
Function●Since v1.10

applyProfilePrompt

Copy
applyProfilePrompt(profile: HarnessProfile, basePrompt: string): string
View source on GitHub

Parameters

NameTypeDescription
profile*HarnessProfile

The harness profile to apply.

basePrompt*string

The default base prompt (e.g., BASE_AGENT_PROMPT).

Apply a profile's prompt overlay to a base prompt string.

  • baseSystemPrompt (when set) replaces basePrompt entirely.
  • systemPromptSuffix (when set) is appended with \n\n.

Both are independently optional. A profile that sets only the suffix layers it on top of whatever base the caller passes in.

Used uniformly for the main agent, declarative subagents, and the auto-added general-purpose subagent.