AgentKit
DocsKitsCLI ReferenceDesktop App

ak sessions

ak sessions

Choose a local session inspection, analytics, streaming, or credential-redaction workflow.

Use ak sessions to discover the commands that inspect and maintain local coding-agent session data.

Usage

ak sessions

The parent command has no positional arguments or command-specific flags. It shows subcommand help and does not read, rewrite, or send session data itself. Shared flags are described in CLI conventions.

Choose a subcommand

GoalCommandImportant effect
Inventory registered projects' sessionsak sessions listReads local project and transcript files.
Read one transcript pageak sessions show <project> <session-id>Can expose prompts, thinking, tool inputs, and tool output.
Aggregate bounded local metricsak sessions statsMay write a disposable analytics cache.
Follow newly appended messagesak sessions tail <project> <session-id>Streams until cancelled; no historical backfill.
Find or replace known credential patternsak sessions redactDry-run by default; apply requires --apply --yes and creates backups.

These workflows are local except for effects triggered independently by tools that consume their output. The parent command never prompts and has no preview, apply, force, backup, or recovery behavior of its own.

Privacy boundary

Session transcripts can contain source code, prompts, model reasoning, command output, file paths, email addresses, and credentials. list includes a short message preview in JSON, while show and tail expose message content. Keep structured output local unless you have reviewed and redacted it.

Credential redaction is best-effort pattern matching, not proof that a transcript is safe to publish. Review the resulting files before sharing them.

Output and exit status

Running the parent prints help. Subcommands define their own human, JSON, and stream contracts. Their runtime failures normally exit 1; argument and flag errors exit 2. Flag-parse errors can remain plain text even with --json.