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
JavaScriptdeepagentsbackendsContextHubBackend
Class●Since v1.10

ContextHubBackend

Backend that stores files in a LangSmith Hub agent repo (persistent).

Copy
class ContextHubBackend

Constructors

constructor
constructor→ ContextHubBackend

Methods

method
delete→ Promise<DeleteResult>

Delete a single file. Optional - backends that don't support file deletion can omit this.

method
downloadFiles→ Promise<FileDownloadResponse[]>

Download multiple files. Optional - backends that don't support file download can omit this.

method
edit→ Promise<EditResult>

Edit a file by replacing string occurrences.

method
getLinkedEntries→ Promise<Record<string, string>>

Return linked-entry paths mapped to their repo handles.

method
glob→ Promise<GlobResult>

Structured glob matching returning FileInfo objects.

method
grep→ Promise<GrepResult>

Search file contents for a literal text pattern.

Binary files (determined by MIME type) are skipped.

method
hasPriorCommits→ Promise<boolean>

Return true if the hub repo already exists with at least one commit.

method
ls→ Promise<LsResult>

Structured listing with file metadata.

Lists files and directories in the specified directory (non-recursive). Directories have a trailing / in their path and is_dir=true.

method
read→ Promise<ReadResult>

Read file content.

For text files, content is paginated by line offset/limit. For binary files, the full raw Uint8Array content is returned.

method
readRaw→ Promise<ReadRawResult>

Read file content as raw FileData.

method
uploadFiles→ Promise<FileUploadResponse[]>

Upload multiple files. Optional - backends that don't support file upload can omit this.

method
write→ Promise<WriteResult>

Write content to a file, creating it or overwriting it if it already exists.

View source on GitHub