interface ClientConfigMaximum size of a batch of runs in bytes.
Maximum number of operations to batch in a single request.
Disable prompt caching for this client. By default, prompt caching is enabled globally.
Whether to require manual .flush() calls before sending traces. Useful if encountering network rate limits at trace high volumes.
Maximum total memory (in bytes) for both the AutoBatchQueue and batchIngestCaller queue. When exceeded, runs/batches are dropped. Defaults to 1GB.
Whether to omit runtime information from traced runs. If true, runtime information (SDK version, platform, etc.) and LangChain environment variable metadata will not be stored in runs. Defaults to false.
The workspace ID. Required for org-scoped API keys.
import { Client, Cache, configureGlobalPromptCache } from "langsmith";
// Enable with defaults
const client1 = new Client({});
// Or use custom configuration
import { configureGlobalPromptCache } from "langsmith";
configureGlobalPromptCache({
maxSize: 100,
ttlSeconds: 3600, // 1 hour, or null for infinite TTL
});
const client2 = new Client({});
// Or disable for a specific client
const client3 = new Client({ disablePromptCache: true });