Skip to content
anouk

How it works

No server on the critical path.

Every stage of an Anouk request runs inside the browser extension. The only network call is the one the user's own provider expects.

  ┌──────────────────────────────────────────────┐
  │  Browser extension (Manifest V3)             │
  │                                              │
  │  content script / popup / background worker  │
  │                 │  AIService.call(...)       │
  │                 ▼                            │
  │        ┌─────────────────┐                   │
  │        │  configManager  │  providerUrl,     │
  │        │  (settings panel│  apiKey, model    │
  │        │   or aiConfig)  │                   │
  │        └────────┬────────┘                   │
  │                 ▼                            │
  │        ┌─────────────────┐   hit             │
  │        │  response cache │──────────► return │
  │        │  requestId_key  │                   │
  │        └────────┬────────┘   miss            │
  │                 ▼                            │
  │        ┌─────────────────┐                   │
  │        │ per-provider    │                   │
  │        │ rate-limit queue│                   │
  │        └────────┬────────┘                   │
  └─────────────────┼────────────────────────────┘
                    │  fetch (OpenAI chat-completions shape)
                    ▼
          ┌───────────────────────┐
          │  Provider (user's own)│
          │  OpenAI · Anthropic · │
          │  Together · Ollama ·  │
          │  Hugging Face         │
          └───────────────────────┘

The request, stage by stage

1

Your extension code

A content script, background worker, or popup calls AIService.call(instruction, content, requestId, cacheKey?).

2

configManager

Resolves providerUrl, apiKey, model, and systemPrompt — from the runtime settings panel (chrome.storage.local) or a code-supplied aiConfig.js.

3

Response cache

Keyed by ${requestId}_${cacheKey}. A hit returns immediately with no network call and no token spend.

4

Rate-limit queue

On a miss, the call joins a per-provider queue so concurrent user actions never stampede the provider or trigger 429s.

5

Provider (direct fetch)

The request is sent as an OpenAI chat-completions POST straight to the provider the user configured. No backend in between.

6

Decode + cache + return

The completion text is extracted, written to the cache, and returned to your code as a plain string.

Why client-side?

For single-user extensions with a bring-your-own-key model, calling the provider from the extension is shorter, cheaper, and friendlier to privacy. The user's content never crosses a server the developer controls, latency drops the extra hop, and there is no backend to operate or pay for.

When you still want a backend

Centralized guardrails, evaluation, billing, or multi-user coordination all need a server. Anouk's AIService happily points at one — set providerUrl to your backend and it forwards there instead of directly to a model provider. The defaults just assume the simpler architecture.

What it is not

Anouk is not a build tool. It does not bundle, hot-reload, or generate a manifest from convention, and it does not target Firefox or Safari today — the templates target Chrome / Chromium-style Manifest V3 explicitly. Pair it with Plasmo or WXT for the build layer.