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

serializeProfile

Serialize a HarnessProfile to a JSON-compatible object.

Omits undefined fields and extraMiddleware (runtime-only). Throws if extraMiddleware contains instances — callers should strip it before serializing if they've set it.

Copy
serializeProfile(profile: HarnessProfile): __type

Parameters

NameTypeDescription
profile*HarnessProfile

The profile to serialize.

View source on GitHub