How It Works
- An agent run starts (any mode: autonomous, supervised, or plan)
- When the run completes, Fliiq walks the message history
- A structured summary is extracted — content is truncated, input values are omitted
- The summary is saved as a JSON file to the audit directory
Audit trail saving is non-fatal. If the audit directory is unwritable or an error occurs, the failure is silently logged and the agent run is unaffected.
Where Audit Trails Are Stored
| Location | Path | When Used |
|---|---|---|
| Global | ~/.fliiq/audit/ | Default for all runs |
| Project | .fliiq/audit/ | When a project-level .fliiq/ exists (takes precedence) |
What’s Captured
Run metadata
Run metadata
Each audit trail records:
id— 12-character hex identifierprompt— the original user promptstarted_at/completed_at— UTC timestampstotal_iterations— number of assistant turnsstop_reason— why the run ended:end_turn,max_iterations,cancelled, etc.model— the model name used for the run (e.g.claude-sonnet-4-6)provider— the LLM provider (anthropic,openai,gemini)input_tokens/output_tokens— token usage for the runduration_ms— total wall-clock time per iteration
Conversation entries
Conversation entries
Each message in the conversation becomes an entry with:
timestamp— when the message occurred (UTC)role—userorassistantcontent_summary— first 100–200 characters of the message contenttool_calls— list of tools invoked, recording only the toolnameandinput_keys(parameter names, not values)tool_results— list of results, recording only thetool_use_idand acontent_preview(first 100 characters)
Final output
Final output
final_text — the agent’s final response text, captured in full.Warnings
Warnings
A list of warning strings detected during analysis, including confabulation detection results (see below).
File Format
Audit trails are saved as JSON with 2-space indentation. Files are named:20260305_143022_a1b2c3d4e5f6.json
Example audit trail
Reading tool calls
Theid field in tool_calls (e.g., toolu_0173a8f...) is an opaque identifier generated by the LLM API — it is not a tool name. The name field tells you which tool was actually invoked.
To pair a tool invocation with its result, match tool_calls[].id to tool_results[].tool_use_id:
Confabulation Detection
After each run, Fliiq analyzes the audit trail for a common hallucination pattern: the agent claims tasks are complete but never actually executed them. The detection checks whether:- The agent marked TODO items as done (via the
todotool with astatusupdate) - No execution tools (
shell,write_file,edit_file) were called during the run
Privacy Design
Audit trails are designed to be useful without being invasive:- Summaries, not transcripts — Content is truncated to 100–200 characters, not stored in full
- Input keys, not values — Tool call inputs record parameter names only (e.g.,
["timezone"]), never the actual values passed - Content previews — Tool results store only the first 100 characters
- Local-only — Audit files live on your machine and are never transmitted to any server
- You control retention — Delete audit files anytime; there is no remote copy
Audit logs may still contain sensitive conversation snippets in the summaries. See Security for recommendations on handling sensitive data.
Audit Trails vs Job Run Logs
Scheduled jobs produce both an audit trail and a job run log. Here’s how they differ:| Audit Trails | Job Run Logs | |
|---|---|---|
| Scope | Every agent run (REPL, TUI, single-shot, jobs) | Scheduled jobs only |
| Location | ~/.fliiq/audit/ or .fliiq/audit/ | .fliiq/jobs/<name>/runs/ |
| Content | Conversation structure with entries, tool calls, warnings | Summary: status, duration, iterations, final text |
| Retention | Unlimited (manual cleanup) | Last 50 runs (auto-pruned) |
| Access | fliiq audit list, fliiq audit show <id>, or read JSON directly | fliiq job logs <name>, fliiq job output <name> |
| Purpose | Debugging, compliance, understanding agent behavior | Monitoring job health and output |
Reviewing Audit Trails
Use thefliiq audit CLI to browse and inspect runs without touching JSON files directly.
list output shows a Rich table with columns for timestamp, run ID, prompt preview, iteration count, token usage, and model name. The show command renders the full conversation structure, tool calls, and any confabulation warnings.
Security
Understand what Fliiq protects and best practices for safe usage.
Jobs
Set up scheduled automations with run logs and per-job memory.