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 theAgentAction collection. If something is in doubt, the action log is the source of truth.
The log captures four things for every run:
- The trigger. Which playbook fired and why.
- The observation. What the agent looked at (records, signals, prior actions).
- The reasoning. What the agent decided and why.
- The outcome. Which tools ran, what they returned, what happened next.
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
TheAgentAction 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 theAgentAction collection:
From a playbook
Yes, agents can read their own action log. This is how follow-up playbooks know what’s already been tried: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
Why was this draft created?
Open the draft in Autopilot. Thereasoning 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?
Best practices
Add a log dashboard early
Add a log dashboard early
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.
Watch errors aggressively
Watch errors aggressively
Errors in
tool_calls are usually a sign of upstream changes (renamed fields, missing API keys, deleted records). Spikes mean something broke.Use parent_action_id for follow-ups
Use parent_action_id for follow-ups
When playbook B runs because playbook A’s draft was approved, link them. The thread of reasoning becomes traceable.
Don't write to AgentAction yourself
Don't write to AgentAction yourself
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