GhostFilter Docs
Build with GhostFilter AI, Ghosti Guard, and the published ghostfilter-ai npm package.
GhostFilter AI is a safety firewall for humans and AI agents.
It protects against two connected problems:
- scams, phishing, impersonation, unsafe links, and risky files for people
- prompt injection, jailbreaks, secret extraction, and unsafe tool-use instructions for GhostGPT and other AI agents
The reusable developer SDK is published on npm:
npm install ghostfilter-aiWhat the SDK is
An SDK is a software development kit: code another developer imports into their own
application. ghostfilter-ai packages GhostFilter's trained logistic-regression weights,
scam rules, prompt-injection firewall, safe-context generator, and command guard as a
small TypeScript/JavaScript library.
The SDK does not embed the GhostFilter website. It gives developers callable functions:
import { ghostfilter } from "ghostfilter-ai";
const result = await ghostfilter.protect({
input: externalEmailBody,
mode: "full",
});
if (result.verdict !== "safe") {
console.warn(result.reasons);
}Core checks run in the developer's Node.js process. No account or API key is required.
What you can build
- Add scam/phishing checks to your app
- Add prompt-injection checks before an AI agent reads external content
- Wrap untrusted content in safe GhostGPT context
- Guard explicit shell commands in CLIs or developer tools
- Use the browser extension to scan selected webpage text or whole pages
Main surfaces
| Surface | What it does |
|---|---|
| Web app | Human-friendly scanner, GhostGPT firewall, history, eval, and demo pages |
| Ghosti | Focused safety chat using Ollama when available and deterministic fallback otherwise |
ghostfilter-ai npm package | Local-first TypeScript SDK and CLI |
| Ghosti Guard extension | Browser popup for selected text / whole-page agent-safety checks |
/api/ghostgpt/firewall | Agent firewall endpoint for deployed app integrations |
Trust model
GhostFilter is a pre-processing safety layer, not an antivirus or a guarantee that content is safe. Applications should retain human approval for payments, credential changes, message sending, file deletion, and other consequential actions.