Seven SDKs, one integration model: replace your LLM call (or enqueue a script tag) and Cognatu handles topic matching, ad selection, and optional zero-knowledge proving locally — raw conversation text never leaves the device or process it started in.
Every SDK exposes the same shape: a client (or middleware) configured with your publisher ID and gateway URL, one call per turn/screen, and an on-device ZKP wallet that's on by default.
Contextual ad injection for Go LLM apps. Every other Cognatu SDK ports from or calls into this implementation via FFI/WASM/gomobile. Not yet on a module proxy under its own path — import directly from this repo's module.
Middleware wraps any OpenAI-compatible chat completions endpoint: it forwards the request upstream, extracts a conversation context from the messages + response, runs the ad auction, and — on a win — appends a clearly labelled sponsored block before returning.
Contextual ad injection for Python LLM apps. Matching, topic decay, and ZKP proving run on-device in your own process.
Use the middleware when you want zero code changes; use the explicit client when you call the LLM yourself and want control over when/where the ad appears — works with the OpenAI SDK, LangChain, liteLLM, etc.
Contextual ad injection for native iOS/macOS apps. Matching and ZKP proving both run on-device via a real Groth16 prover (BN254). Not yet on a registry (SPM index or CocoaPods trunk) — add as a local or git-URL Swift Package dependency.
Building or running without the native ZKP library present still works — wallet construction degrades to no wallet rather than crashing; require_proof line items just won't match.
Contextual ad injection for native Android apps. Matching and ZKP proving both run on-device, backed by the same Go/Groth16 prover every other Cognatu SDK uses. Not yet on Maven — add as a Gradle source dependency.
Pass any Android Context (application context is fine) and wallet attribute history is saved to EncryptedSharedPreferences.
Contextual ad injection for React Native / Expo apps. Matching and ZKP proving both run on-device on both platforms, via each platform's own native module. Not yet on npm — point package.json at a path or git URL.
Reuse one CognatuClient across screens — only the client instance holds the decay-accumulated topic state that makes multi-screen targeting work. Call resetConversation() when the user starts an unrelated task.
No build step, no package — a single script tag. Matching and (optional) ZKP proving both run in the browser via WASM; the WordPress plugin is just this same script enqueued for you.
ZK proving is on by default — add data-disable-wallet="true" to opt out and guarantee the ~4.8MB proving WASM module is never fetched (matching-only WASM is 1.65MB and always loads).
A thin plugin that enqueues the Browser JS SDK above with your publisher key — all on-device matching and ZKP proving happen in that same script, WordPress just wires up the settings page and shortcode.
Activate the plugin, then configure under Settings → Cognatu Ads (publisher ID, gateway URL, timeout, wallet toggle). Add [cognatu_ad] to any post, page, or widget — no code required.
Identical pipeline across all seven SDKs — only the runtime changes.
A tiny word-vector model, fetched and cached once, embeds and classifies the conversation/page text into topic scores — in-process, on text you already have in memory.
Topic scores (with decay across turns) match against a cached catalog, producing an opaque line-item shortlist — never a relevance score, never the raw text — sent to the gateway.
Line items that require proof are proven against an on-device ZKP wallet — real Groth16 over BN254, on by default, gracefully degrading to "no wallet" if the native library isn't present.
Field names vary slightly by language convention (camelCase vs. snake_case vs. PascalCase); the shape is identical everywhere.
| Field | Required | Notes |
|---|---|---|
| publisherID | Yes | Identifies your account in the ad auction. |
| gatewayURL | Yes | Defaults to https://gateway.cognatu.com in every SDK. |
| gatewayAPIKey / apiKey | Server-side SDKs only | Authenticates auction calls — server-side secret, never shipped to a client/device. |
| persistWallet | No | Persists the ZKP wallet across app restarts (Keychain on iOS, EncryptedSharedPreferences on Android). |
| disableZkpWallet | No | Opts out of the on-device ZKP wallet — on by default everywhere. |