An AI agent audit trail is the record that lets you answer one question months later: what did the agent change, when, from what, and why? Native CRM logs were sized for human-paced change. This guide shows how to close the gap in an afternoon.

This guide expands a post about the most boring way an AI rollout goes wrong: nobody can explain what the agent did.
Your agent made a change in March. Your audit log goes back 30 days. That's the whole incident review. There isn't one. Native retention is shorter than most people assume, and nobody checks until the moment they need it. HubSpot audit log: 30 days. Salesforce Setup Audit Trail: 180 days. Salesforce field history: 20 fields per object. Those windows were sized for human-paced change. An agent writing hundreds of records a day fills and ages out that history far faster than a team of admins ever did. The fix is boring and takes an afternoon: Export logs on a cadence shorter than the retention window. Weekly, to your own store. Turn on field history for the specific fields agents write, and respect the 20-field limit. Stamp every agent-written record with which agent, which version, which run. Keep the export after you stop using the agent. That last one matters more than it sounds. The question never arrives during the project. It arrives in a diligence request or a board review, months after everyone moved on. An action you can't reconstruct is an action you can't defend.
Your CRM logs were built to answer "which admin changed this setting?" Agents ask a different question at a different speed.
The HubSpot activity log views cover 30 days. Salesforce Setup Audit Trail rolls at about 180. An agent that writes all day makes those windows feel shorter, and nobody checks them until a question shows up.
HubSpot's account log only records HubSpot-user actions. If three agents share one integration user or one admin's login, every change looks like the same person did it.
HubSpot keeps 20 revisions per deal, company and ticket property (45 for contacts). Salesforce tracks 20 fields per object. High-frequency agent writes push the old values out.
Even when you can see that a value changed, nothing on the record says which agent, which prompt version or which run did it. You can't tie a bad batch to the change that caused it.
The project team owns the build. Nobody owns the evidence. When the agent is switched off, its logs usually go with it, right before someone asks about it.
A stage that moved, an owner that flipped, an amount that changed. If you can't reconstruct it, you can't defend it in an incident review, a board meeting or diligence.
Know the windows you're working inside, then set your own retention longer than the longest question you'll be asked.
| System | What it records | Window or limit | Agent gotcha |
|---|---|---|---|
| HubSpot account activity log | User actions; Professional adds CRM objects, property updates, workflows, lists, associations | UI views: last 30 days. Security export: 1 year. Super Admin only | Only HubSpot-user actions, so agents need their own identity |
| HubSpot property history | Prior values, including API changes; export can include the source | 45 revisions per contact property, 20 for companies, deals, tickets, custom objects | A busy deal property can roll 20 revisions in weeks |
| HubSpot restore tools | Deleted records; bulk "restore CRM changes" | 90 days for deleted records; 14 days for bulk restore | Restore is not evidence; export before you need it |
| Salesforce Setup Audit Trail | Setup and configuration changes, not field values | About 180 days rolling; CSV export must be downloaded within 72 hours | Shows the permission change, not what the agent then did with it |
| Salesforce Field History Tracking | Before and after values on tracked fields | 20 fields per object; about 18 months in UI, 24 via API | No values for formula, roll-up, long text or multi-select fields |
| Salesforce Field Audit Trail (Shield or add-on) | Archived history in FieldHistoryArchive | Up to 200 fields per object; retention set by HistoryRetentionPolicy | Paid add-on; archive is API-only |
| EU AI Act, Article 26 | Logs of high-risk AI systems kept by deployers | At least 6 months | Most GTM agents aren't high-risk, but it's a sane floor |
Sources: HubSpot Knowledge Base, account activity history (Oct 2026) and property history (Sep 2026); Gearset, Salesforce audit trail guide (Jan 2026); Salesforce Developers, Field Audit Trail; EU AI Act Service Desk, Article 26 (2026). Limits change; check your own tier.
| Metric | Weak | Acceptable | Strong |
|---|---|---|---|
| Export cadence vs. shortest native window | Never or ad hoc | Monthly | Weekly or streamed |
| Retention of exported agent logs | Under 6 months | 6 to 12 months | 24 months or more |
| Agent-written fields with history on | Under 50% | 50 to 90% | 100% |
| Agent writes stamped | Nothing on the record | Agent name only | Agent, version and run ID |
| Agent identity | Runs as a human admin | Shared integration user | One identity per agent |
| Time to reconstruct one change | Can't | Days of digging | Under 1 hour |
Windows from HubSpot and Salesforce documentation (2026). The 6-month floor follows EU AI Act Article 26 (2026). The 24-month target, identity and reconstruction-time ranges come from JayOh's experience with diligence lookbacks and incident reviews. Context: Gartner (June 2025) expects over 40% of agentic AI projects to be canceled by the end of 2027, citing cost, unclear value and inadequate risk controls.
Steps 2, 3 and 5 do most of the work. Everything else makes them hold up under questions.
Boring discipline beats tooling. Most of these cost nothing but a decision.
Agent runs as a human admin. Every change looks like that person made it.
Wrong person blamedRelying on the 30-day UI view. Anything older than a month is unexplainable.
No incident reviewTracked fields spent on legacy fields. Stage and amount changes go unrecorded.
Forecast disputesMissing the 72-hour CSV download. The Setup Audit Trail export quietly disappears.
Silent gapNo version stamp. A bad batch can't be tied to the prompt change that caused it.
Repeat failuresLogs deleted with the agent. The diligence question arrives months later.
Indefensible numbersShared integration user for every tool. Agent, sync and enrichment changes blur together.
Hours of guessworkEnter your setup. It calculates how far back you can actually defend an agent change, how fast history rolls over, and where the gaps are.
Paste this into your agent's operating doc or a ticket. It is the playbook above as a checklist with field names.
AGENT AUDIT TRAIL SPEC (JayOh)
Agent: ____________ Owner: ____________ CRM: HubSpot / Salesforce
1. IDENTITY
[ ] Dedicated identity (HubSpot private app / Salesforce integration user)
[ ] Scopes limited to: ____________ objects, ____________ fields
2. RECORD STAMPS (written in the same call as the change)
[ ] Last Agent Writer (text)
[ ] Agent Version (text, e.g. v1.4)
[ ] Agent Run ID (text)
[ ] Agent Write Time (datetime)
[ ] Agent Change Reason (text, one line)
3. HISTORY
[ ] Salesforce: history tracking on every agent-written field (20 per object max)
[ ] Over 20 fields or over 24 months: Field Audit Trail + HistoryRetentionPolicy
[ ] HubSpot: busiest properties exported before 20 revisions roll
4. EXPORTS (weekly, to storage we control)
[ ] HubSpot account activity log export
[ ] HubSpot property history export, Include Source Information on
[ ] Salesforce Setup Audit Trail CSV (download within 72 hours)
[ ] Salesforce field history tables via SOQL / ETL
[ ] Agent run log (run ID, version, inputs, records, before/after, approver)
5. GATES
[ ] Stage, amount, close date, owner, lifecycle stage: proposed value + approval
6. RETENTION
[ ] Minimum 6 months, target 24 months
[ ] Retention lock on storage
[ ] Kept after the agent is retired
7. TEST
[ ] Quarterly reconstruction test, target under 1 hour
Last test date: ________ Result: ________
Hand Claude your agent inventory and CRM settings. It applies this guide and returns a gap report.
Install: In Claude on the web or desktop, open Settings, then Capabilities, make sure code execution and file creation is on, click Upload skill under Skills, choose the .zip and toggle it on. In Claude Code, save the file as ~/.claude/skills/agent-audit-trail-review/SKILL.md, or in .claude/skills/ inside your repo.
Skills are available on Claude Pro, Max, Team and Enterprise plans. New to skills? Read how to use skills in Claude.
--- name: agent-audit-trail-review description: Reviews whether a team can reconstruct what its AI agents changed in HubSpot or Salesforce. Use when someone shares an agent inventory, CRM audit settings, field history settings or export schedules and asks "can we prove what the agent did", "audit our AI agents", "check our agent audit trail" or "are we ready for an incident review or diligence request". --- # Agent Audit Trail Review You review a team's AI agent audit trail in HubSpot or Salesforce and return a gap report and a fix plan. You apply the JayOh framework from the post "AI Agent Audit Trails in HubSpot and Salesforce: A Practical Guide". ## Inputs to ask for (use what the user gives; do not block on missing items) 1. CRM and tier: HubSpot (Starter, Professional, Enterprise) or Salesforce (edition, and whether Shield or Field Audit Trail is licensed). 2. Agent inventory: for each agent, its name, the identity it runs as (named user, shared integration user, private app, connected app), the objects it writes, the fields it writes, and roughly how many writes per day. 3. History settings: which fields have Field History Tracking on (Salesforce), and which HubSpot properties the agents write most often. 4. Export practice: what is exported (activity log, Setup Audit Trail, property or field history, agent run logs), how often, where it is stored, and for how long. 5. Record stamping: whether agent-written records carry the agent name, agent version and run ID. 6. Approval gates: which fields an agent can overwrite without a human approving. ## Native limits to check against (verified November 2026) - HubSpot account activity log: UI views show the last 30 days; security activity export covers one year; Professional adds CRM object, property, workflow, list and association categories. It records HubSpot-user actions, so agents need their own identity to be attributable. - HubSpot property history: up to 45 revisions per contact property and 20 per company, deal, ticket and custom object property, including API changes. Export with source information shows which user or app made each change. - Salesforce Setup Audit Trail: about 180 days rolling; CSV exports must be downloaded within 72 hours. - Salesforce Field History Tracking: 20 fields per object; about 18 months in the UI and 24 months via API; no values for formula, roll-up, long text or multi-select fields. - Salesforce Field Audit Trail: up to 200 fields per object, retention set by HistoryRetentionPolicy. - EU AI Act Article 26: deployers of high-risk AI systems keep automatically generated logs for at least six months. Most GTM agents are not high-risk, but use six months as a floor. ## Benchmarks (grade each one weak, acceptable or strong) - Export cadence: weak = never or ad hoc; acceptable = monthly; strong = weekly or streamed. - Export retention: weak = under 6 months; acceptable = 6 to 12 months; strong = 24 months or more. - Agent-written fields with history on: weak = under 50 percent; acceptable = 50 to 90 percent; strong = 100 percent. - Stamping: weak = none; acceptable = agent name only; strong = agent name, version and run ID on every write. - Identity: weak = runs as a human admin; acceptable = shared integration user; strong = one dedicated identity per agent. - Reconstruction time for one change: weak = cannot; acceptable = days; strong = under one hour. ## Steps 1. Restate the inventory as a table: agent, identity, objects, fields written, writes per day. 2. For each agent, compute the defensible lookback in days. If exports run more often than the shortest native window, the lookback is the export retention. If not, it is the native window (30 days for the HubSpot UI log, 180 days for Setup Audit Trail, 18 to 24 months for Salesforce field history). 3. For each high-churn HubSpot property, estimate how many days 20 revisions last: 20 divided by writes per record per day. Flag anything under 90 days. 4. Count agent-written fields without history tracking. In Salesforce, check the 20-field cap per object and say which fields to swap in or whether Field Audit Trail is needed. 5. Grade every benchmark above and quote the user's own input as evidence for each grade. 6. List the top five gaps ranked by risk: revenue fields (stage, amount, close date, owner, lifecycle stage) first. 7. Write a fix plan in the JayOh order: separate identities, stamp every write, history on agent-written fields, weekly exports to your own store, an agent run log, approval gates on revenue fields, a retention owner, and a quarterly reconstruction test. ## Output format - Summary: one paragraph with an overall grade (weak, acceptable or strong) and the defensible lookback in days. - Table 1: agent inventory with identity and lookback. - Table 2: benchmark grades with the evidence quoted from the input. - Top 5 gaps with what each one risks. - Fix plan: numbered steps with the HubSpot or Salesforce setting to change. - Missing evidence: a list of what you could not verify. ## Guardrails - Quote the user's input as evidence for every grade. Never invent write volumes, field counts or settings. - If something is not provided, put it under Missing evidence instead of guessing. - Do not claim legal compliance. Say when a question needs counsel. - Do not recommend deleting history or logs. Built by JayOh (jayoh.io). Full guide: https://jayoh.io/ai-agent-audit-trail/
Short answers to what people ask before they build one.
The account activity log views in HubSpot show the last 30 days. Security activity can be exported for the last year, and Professional and Enterprise add CRM object, property, workflow, list and association categories. Property history is kept by count instead: up to 45 revisions per contact property and 20 for other objects.
Standard Field History Tracking covers 20 fields per object, kept about 18 months in the UI and 24 months through the API. Field Audit Trail, part of Shield or sold as an add-on, raises that to 200 fields per object with retention you set in a HistoryRetentionPolicy.
The account activity log only records HubSpot-user actions. Property history does capture API changes, and its export can include the source of each change. Give each agent its own private app and stamp its writes so changes are attributable.
Combine four things: a dedicated identity per agent, a stamp on every write with the agent, version and run ID, field history on the fields it writes, and weekly exports of CRM and agent logs to storage you control. Then test a reconstruction every quarter.
Weekly. The export cadence must be shorter than the shortest window you rely on, which is 30 days for the HubSpot log views, and Salesforce Setup Audit Trail CSVs must be downloaded within 72 hours of the export.
Article 26 requires deployers of high-risk AI systems to keep automatically generated logs for at least six months. Most GTM agents are not high-risk, but six months is a sensible floor. Ask counsel about your specific systems.
At minimum: the agent's name, its version, the run ID, the time of the write and a one-line reason. Store full run details, such as inputs and before and after values, in a separate agent run log.
Every agent rollout we audit has the same blind spot. The team tested whether the agent could do the job. Nobody tested whether they could explain the job afterward.
The fix isn't a new tool. It's an identity per agent, a stamp on every write, history on the right fields and a weekly export someone owns. That's an afternoon of work that saves you from the worst question in a diligence room: "we don't know."
If you want a second set of eyes on your agent setup before it touches revenue fields, see what good agentic readiness looks like, or talk to us.
We engineer growth systems. JayOh builds the RevOps architecture, GTM execution and data infrastructure that turn messy revenue operations into predictable pipeline for B2B SaaS and PE-backed teams.