
Security News
White House Authorizes Private Companies to Conduct Offensive Cyber Operations
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.
provenby-ai-sdk
Advanced tools
Automatic skill tracking from LLM API usage. Privacy-first, zero-config, zero runtime dependencies.
Wraps LLM provider SDKs with a transparent Proxy that captures request/response metadata, extracts skills locally in your process, and sends only anonymized metadata to ProvenBy. Your conversation text never leaves your machine.
npm install ProvenBy-sdk
import { ProvenBy } from 'ProvenBy-sdk';
import OpenAI from 'openai';
const ProvenBy = new ProvenBy({
candidateId: 'your-candidate-id',
apiKey: 'sig_your_api_key',
});
const openai = ProvenBy.wrap(new OpenAI());
// Use exactly as normal — zero API changes
const completion = await openai.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Help me design a REST API' }],
});
// Skills extracted automatically in the background
import OpenAI from 'openai';
const openai = ProvenBy.wrap(new OpenAI());
await openai.chat.completions.create({ model: 'gpt-4o', messages: [...] });
import Anthropic from '@anthropic-ai/sdk';
const anthropic = ProvenBy.wrap(new Anthropic());
await anthropic.messages.create({ model: 'claude-sonnet-4-20250514', messages: [...] });
import { GoogleGenerativeAI } from '@google/generative-ai';
const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY);
const model = ProvenBy.wrap(genAI.getGenerativeModel({ model: 'gemini-2.0-flash' }));
await model.generateContent('Help me build a database schema');
import { Mistral } from '@mistralai/mistralai';
const mistral = ProvenBy.wrap(new Mistral({ apiKey: '...' }));
await mistral.chat.complete({ model: 'mistral-large-latest', messages: [...] });
import OpenAI from 'openai';
const xai = ProvenBy.wrap(new OpenAI({ baseURL: 'https://api.x.ai/v1', apiKey: '...' }));
await xai.chat.completions.create({ model: 'grok-3', messages: [...] });
import OpenAI from 'openai';
const deepseek = ProvenBy.wrap(new OpenAI({ baseURL: 'https://api.deepseek.com', apiKey: '...' }));
await deepseek.chat.completions.create({ model: 'deepseek-chat', messages: [...] });
Streaming works transparently. The SDK collects chunks as they arrive, extracts skills after the stream completes, and returns each chunk to your code unmodified.
const stream = await openai.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Write a React component' }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || '');
}
// Skills extracted automatically after stream completes
The SDK is designed with privacy as a first-class constraint:
What IS captured (metadata only):
What is NEVER captured:
When extractLocally: true (the default), all extraction happens in your Node.js process. Raw conversation text never leaves your machine. Only the Extraction metadata object is transmitted to ProvenBy. Additionally, a PII stripping layer runs on the extraction output as a safety net.
const ProvenBy = new ProvenBy({
// Required
candidateId: 'your-candidate-id',
apiKey: 'sig_your_api_key',
// Optional
serverUrl: 'https://provenby.dev', // ProvenBy server URL
extractLocally: true, // Extract in-process, never send raw text (default: true)
bufferIntervalMs: 60000, // Flush buffer every 60 seconds (default)
bufferMaxSize: 20, // Flush when buffer hits 20 extractions (default)
debug: false, // Log extraction activity to console (default: false)
onExtraction: (e) => {}, // Callback for each extraction — use for visibility
});
Use debug: true to log every extraction to the console:
const ProvenBy = new ProvenBy({
candidateId: 'xxx',
apiKey: 'sig_xxx',
debug: true,
});
Or use the onExtraction callback for programmatic access:
const ProvenBy = new ProvenBy({
candidateId: 'xxx',
apiKey: 'sig_xxx',
onExtraction: (extraction) => {
console.log('Skills detected:', extraction.skills);
console.log('Languages:', extraction.languages);
console.log('Domain:', extraction.domain);
},
});
// Force-send any buffered extractions
await ProvenBy.flush();
// Flush + stop background timer (call before process exit)
await ProvenBy.close();
The background flush timer is unref'd, so it won't keep your Node.js process alive.
The SDK uses JavaScript Proxy to intercept calls on provider SDKs:
wrap() detects the provider by checking for known property patternsZero runtime dependencies. Uses only Node.js built-ins.
MIT
FAQs
Automatic skill tracking from LLM API usage — privacy-first, zero-config
The npm package provenby-ai-sdk receives a total of 1 weekly downloads. As such, provenby-ai-sdk popularity was classified as not popular.
We found that provenby-ai-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
A new federal program will let vetted U.S. cybersecurity firms help investigate and disrupt foreign cybercrime groups under government direction.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.