aiv plugin commands described in Deploy the OpenShell plugin. The plugin HTTP token is not a query SpaceKey.
Prepare query credentials
Account login manages accounts and Spaces; data queries use a SpaceKey. These credentials serve different purposes. Prepare the client using Install aiv CLI. These examples query Codex. Replace the platform URL, email, andSPACE_ID with your own values. A Web login or Web-generated installation command does not establish a CLI account session.
aiv space list, then select it with space use. space list lists spaces without switching the current one. Choose one of the following paths.
You already have a full Key, copied from the Web creation dialog or provided by an administrator: run this command and paste that Key at the hidden prompt. Import verifies and saves it for the current space. Use this path to verify a Key created on the website.
--agent-product Codex. For another Agent, use its actual platform product identifier, such as langfuse for SDK ingestion; do not supply an individual Agent UUID. Successful onboarding may save a default product, but a first query or a space switch should not depend on one.
For Web Key creation, verification and rotation, see Spaces and permissions.
Follow one record from list to detail
- List Traces in the time range containing your task and copy one complete ID.
- Replace
TRACE_IDwith that ID and runtrace getfirst. Copy aspan_idfrom the returnedspans, replaceSPAN_ID, then read that Span.span listfetches a batch by ID and also requires at least one Span ID. Replace placeholders before execution.
- To inspect a session, list Sessions first and replace
SESSION_IDwith an ID from that result. Keep the same time range for session usage.
aiv query metadata traces --agent-product Codex.
--since / --until accept RFC3339, timestamps and relative durations such as 15m, 6h and 2d. The default window is the last hour. Use --format json for scripts.
Batch exports
Run in the local directory where you want to save the data../dataset is relative to that directory and is created by the CLI. Use a new empty directory for each export; an existing JSONL file with the same name is overwritten.
traces.jsonl (one Trace detail per line) and events.jsonl (one event per line). Check that the reported exported N matches the line count, and open one JSON record to verify its ID and time. An empty Trace result prints no traces to export and may create no file; an old file is not evidence of this run.
--limit caps the current list; exports do not automatically paginate. Reaching that limit does not establish a complete export. For an archive, use fixed --since / --until bounds, then use supported backend pagination or split time windows into separate directories. Errors may leave partial files; fix the cause and retry into a new directory. Exports may contain raw context; review collection mode and content before sharing.