NewWacht Bench is live — AI-assisted development for Wacht

getThreadFilesystemFile()

Returns file content as binary payload and metadata.

Usage

The following example shows a basic usage of the backend client from @wacht/nextjs/server.

import { wachtClient } from '@wacht/nextjs/server';export async function example() {  const client = await wachtClient();  const threadId: string = 'threadid-123';  const path: string = '/';  return client.ai.getThreadFilesystemFile(threadId, path);}

Signature

function getThreadFilesystemFile(  threadId: string,  path: string,): Promise<BinaryFileResponse>

Parameters

threadId: string;
Target actor project thread id.
path: string;
Filesystem path selector.

Return value

data?: ArrayBuffer | undefined;
Binary file data.
mime_type?: string | undefined;
Detected MIME type when available.
file_name?: string | undefined;
Resolved filename when available.

On this page