An example JavaScript app demonstrating how to integrate Pangea's Secure Audit Log service into a LangChain app to maintain an audit log of prompts being sent to LLMs.
- Node.js v22.
- A Pangea account with Secure Audit Log enabled with the AI Audit Log Schema Config.
- An OpenAI API key.
git clone https://github.com/pangeacyber/langchain-js-prompt-tracing.git
cd langchain-js-prompt-tracing
npm install
cp .env.example .env
Fill in the values in .env
and then the app can be run like so:
npm run demo -- --auditConfigId pci_0123456789 "Give me information on John Smith."
This does not modify the input or output so it's transparent to the LLM and end user.
Audit logs can be viewed at the Secure Audit Log Viewer.