Skip to main content

What is the action log?

Every time a Autopilot agent runs, the runtime records what happened. The result is a structured, queryable log that lives in your app as the AgentAction collection. If something is in doubt, the action log is the source of truth. The log captures four things for every run:
  1. The trigger. Which playbook fired and why.
  2. The observation. What the agent looked at (records, signals, prior actions).
  3. The reasoning. What the agent decided and why.
  4. The outcome. Which tools ran, what they returned, what happened next.
This isn’t optional. The log is always on. The runtime cannot run a tool without writing to it.

Why every action is logged

  • Trust. Users approve drafts faster when they can see the full reasoning chain. Skeptics become believers when they can audit every step.
  • Debugging. When a playbook misbehaves, the log shows where the reasoning went sideways.
  • Compliance. Regulated environments need provable audit trails. The log is structured for export.
  • Graduation. Risk tier graduation uses approval rates from the log. No log, no graduation.
  • Improvement. Approval and skip patterns reveal which objectives are tuned correctly and which need editing.

Schema

The AgentAction collection is a system-managed collection in every Gainable app. You can query it through the Copilot, the dashboard, or the action log UI in Autopilot.

Outcomes

Querying the log

The action log is just a collection, so you can query it the same way you query anything else.

From Copilot

Ask the Copilot directly:

From a dashboard

Drop a chart or table view onto a dashboard scoped to the AgentAction collection:

From a playbook

Yes, agents can read their own action log. This is how follow-up playbooks know what’s already been tried:
If a stalled-deal playbook sees that it already drafted a nudge for this deal in the last 7 days, it can skip drafting another. Ackermann-class loops are bounded.

What gets logged for each tool

Bodies of outbound messages are hashed by default for compactness. The full content is retained on the draft itself in Autopilot until the configured retention window closes.

Retention

For regulated environments, retention can be raised to 7+ years. For consumer-facing apps with privacy obligations, retention can be tightened.

Common queries

Approval rate per playbook

This is the number you watch when deciding whether to graduate a playbook to a higher risk tier.

Why was this draft created?

Open the draft in Autopilot. The reasoning and observation fields render alongside the proposed action. No need to query the log directly.

What did this agent do this morning?

Where are skips concentrated?

A low approval rate means the objective is producing drafts that don’t match what users actually want. Tighten the trigger filter or revise the template.

Best practices

A dashboard with approval rate, skip reasons, and rate-limited counts is the single most useful artifact for tuning agents. Add it during the autonomy build phase.
Errors in tool_calls are usually a sign of upstream changes (renamed fields, missing API keys, deleted records). Spikes mean something broke.
When playbook B runs because playbook A’s draft was approved, link them. The thread of reasoning becomes traceable.
The runtime owns the schema. Custom apps that try to insert their own action records will fail validation. Use create_task for human-visible TODOs instead.

Learn more

Tools

What gets logged per tool

Risk tiers

How the log feeds graduation

Inbox

Where the log surfaces in the UI

Scopes

How log slicing maps to scope