DocsSessions & import

Keep & automate

Sessions & autosave

Akev keeps captured traffic in memory (and spills large bodies to disk). Sessions let you keep it: save what you captured under a name, reopen it later, and — with autosave — never lose traffic when Akev quits or the machine restarts.

Save and open sessions

Open Sessions from the Traffic toolbar's import/export menu (⤓ → Saved sessions…) or the command palette (Ctrl/⌘ K → "Sessions"):

  • Save current traffic — name it and choose All traffic, Visible (what the current filter shows) or Selected. Save as session… in the same menu jumps straight to this form.
  • Open — with traffic in the list you choose Replace current traffic (everything is removed first, pinned exchanges too) or Add to current traffic.
  • ⋯ — Rename…, Download .akev file (to share it or keep a copy elsewhere) and Delete.

Sessions live in the data directory, sessions/<id>.akev (the same format as Download .akev file and GET /api/export/session), next to a small <id>.json with the name, exchange count and dates. .akev files you copy into that folder show up in the list too. Every save writes a temporary file and swaps it in only when it is complete, so a crash or a full disk never leaves a damaged session behind.

Redact secrets

HAR files and .akev downloads often leave your machine: attached to a bug report, shared with a colleague. The import/export menu has two switches for them:

  • Redact secrets in HAR files: on by default.
  • Redact secrets in .akev downloads: off by default.

Redacting replaces secrets with [redacted] and keeps everything else, so the file still opens and reads the same:

  • headers: Authorization and Proxy-Authorization (the scheme is kept), Cookie and Set-Cookie (names and attributes are kept), X-Api-Key, Api-Key, X-Auth-Token, the Google, Anthropic, OpenAI and AWS key and token headers, and any *-api-key, *-token or *-secret header;
  • URLs: the password in user:password@, and query parameters with secret names (access_token, apiKey, X-Amz-Signature, anything with password, secret or credential…);
  • text bodies, best effort: bearer tokens, JWTs, sk-… and Stripe keys, and JSON or form fields with secret names. The patterns are deliberately narrow, so check a file before you publish it. Compressed bodies are left as they are.

Only the file is cleaned: what Akev captured is unchanged. On the command line, use akev export --redact; over the API, ?redact=1 on /api/export/har and /api/export/session. AI agents get the same redaction by default; see MCP.

Autosave

Autosave is on by default. Change it in Settings → Data → Sessions & autosave:

Setting Default What it does
Autosave traffic on Every Save every seconds — only when something changed — and when Akev quits, the traffic is written to the Autosave session.
Restore last session on startup on When Akev starts, the Autosave session is loaded back. A toast says how many exchanges came back.
Save every 60 s How often to check for changes.
Keep at most 256 MB The newest exchanges whose bodies fit are kept; older ones are left out of the autosave. Pinned exchanges are always kept. 0 = no limit. (autosaveMaxExchanges, default 20,000, bounds the count via the API.)

So an autosave keeps the newest 20,000 exchanges or 256 MB of bodies, whichever comes first, not everything in memory; save a session yourself to keep more.

Saving happens on a background thread from a snapshot of each exchange: the proxy never waits for it, and memory stays flat because the session is streamed to disk one exchange at a time.

If restore is off, the first autosave of a new run moves the previous one aside as Autosave (previous run), so it isn't overwritten. To keep an autosave for good, choose Keep as saved session… in its ⋯ menu — it becomes a regular session and autosave starts a fresh one.

Restored traffic is loaded in the background right after startup; anything captured meanwhile still appears after it in the list.

Import from Charles, mitmproxy and Fiddler

The same import/export menu in Traffic (and the palette) imports other tools' captures:

  • Charles — File → Export Session… → JSON Session File (.chlsj), then Import Charles session (.chlsj)…. Requests, responses and bodies (Charles stores decoded bodies; Akev removes the then-stale Content-Encoding), timings, TLS details, failed transactions (with the error), CONNECT tunnels of hosts without SSL proxying, WebSocket messages and notes come across.
  • mitmproxy — a flow file saved with mitmdump -w flows or File → Save in mitmweb or the console, then Import mitmproxy flows…. HTTP/1, HTTP/2 and WebSocket flows import with their raw bodies, messages, errors, client/server TLS info, connection timings, comments (as notes) and marks (as colour tags). TCP, UDP and DNS flows are skipped.
  • Fiddler — a session archive (.saz) saved with File → Save → All Sessions in Fiddler Classic or exported from Fiddler Everywhere, then Import Fiddler sessions (.saz)…. Requests and responses as Fiddler stored them (chunked bodies are de-chunked; content encodings stay), the session timers, client and server IP addresses, comments (as notes) and colours come across; CONNECT sessions become tunnel rows. Password-protected archives aren't supported, and sessions that can't be read are skipped.

Proxyman, Chrome and Firefox export HAR, which Import HAR… reads (so does Fiddler).

API

GET/POST /api/sessions, GET/PUT/DELETE /api/sessions/:id, POST /api/sessions/:id/open, POST /api/import/charles, POST /api/import/mitmproxy, POST /api/import/fiddler and the sessions settings are documented in API.md.

Type to search guides, the CLI and the API.