Side Quest: Audit Reference

August 16, 2026 · View on GitHub

A detailed companion to Audit and Monitor Your Agentic Workflows. Use this side quest when you want to understand the full contents of an audit report or dig into individual artifact files.

:clipboard: Before You Start

gh aw audit report anatomy

gh aw audit generates a Markdown report that covers:

  • Run metadata — workflow name, trigger, engine, and model
  • Agent AIC — total AI Credits consumed by the agent turn
  • Threat-detection AIC (⌖ AIC) — credits consumed by the firewall's threat-detection model, reported separately from agent inference
  • MCP tool calls — each tool the agent invoked, with any errors
  • Threat detection verdict — whether prompt injection, secret leak, or malicious patch was detected
  • Safe outputs — every safe-output declaration the agent emitted

Artifact files explained

Agent artifact

The agent artifact — downloaded by both gh aw logs --artifacts all and gh aw audit — contains the full record of what the agent did.

FileWhat it tells you
safeoutputs.jsonlEvery safe-output declaration the agent emitted
mcp-logs/One log file per MCP server, listing every tool call and result
sandbox/firewall/audit/Domain-level network access log (raw data)
agent_usage.jsonToken usage for the agent turn

Readable log files

Run gh aw audit <run-id> --parse to generate readable files alongside the raw artifacts. These files are created only when you use --parse:

  • log.md — the full agent conversation formatted as Markdown
  • firewall.md — a formatted summary of outbound network access (allowed and blocked domains)

Use firewall.md to quickly identify blocked domains. For raw domain-level records, look inside sandbox/firewall/audit/ in the agent artifact.

AIC billing details

AIC (AI Credits) is the billing unit for agentic workflow inference and is derived from token consumption. Exact billing figures appear in your GitHub billing dashboard.

The ⌖ AIC column in gh aw logs output shows credits consumed by the threat-detection model separately from the main agent turn. Both contribute to your organisation's total AIC usage.

Adding a blocked domain to network.allowed

If the firewall blocked a domain your workflow needs, add it to network.allowed in your workflow frontmatter and recompile:

---
network:
  allowed:
    - api.example.com
---

Share the allowed-domains list from a successful run with your enterprise security team as a ready-made firewall allowlist.

Try it yourself

Run an audit on a recent run

Open the Actions tab in your repository, click a completed workflow run, and copy the run ID from the URL (the number after /runs/). Then run:

gh aw audit <run-id> --parse

Sample output:

## Audit Report

**Workflow:** daily-status
**Trigger:** schedule
**Engine:** copilot
**Model:** gpt-4o

| Metric       | Value |
|---|---|
| Agent AIC    | 42    |
| ⌖ AIC        | 3     |
| MCP calls    | 7     |
| Threat verdict | none |
  1. Find a run ID from the Actions tab.
  2. Confirm the report shows the workflow name, trigger, and model.
  3. Check that the ⌖ AIC figure appears separately from Agent AIC.
  4. Note the threat verdict (typically none).

Explore MCP tool calls

Download the artifacts for a run, then open the mcp-logs/ directory. Each file corresponds to one MCP server and lists every tool call the agent made.

gh aw logs <your-workflow-id> --artifacts all

Browse the log files in .github/aw/logs/<run-id>/mcp-logs/.

  1. Find the mcp-logs/ directory in the downloaded artifacts.
  2. Identify at least one tool call and note the tool name.
  3. Write one sentence describing what the agent was trying to accomplish.
  4. Check agent_usage.json for the total token count.

Inspect the firewall records

The raw domain-level network access logs live in sandbox/firewall/audit/ inside the agent artifact. Scan them to confirm your workflow only contacted expected domains.

  1. Open sandbox/firewall/audit/ in the downloaded artifacts.
  2. Identify at least one domain the workflow accessed.
  3. If any domains were blocked, add them to network.allowed in the workflow frontmatter.

:white_check_mark: Checkpoint

  • You can identify each file inside the agent artifact and what it contains
  • You understand what ⌖ AIC represents and how it differs from agent AIC
  • You can find blocked domains in the firewall audit records and add them to network.allowed
  • You know what the threat detection verdict checks for
  • You ran gh aw audit on a real run and reviewed the generated report
  • You explored mcp-logs/ to identify tool calls from a completed run

Return to Audit and Monitor Your Agentic Workflows.