AI Agent Capital Gains Tax: Trading Bots, 1099-DA, and the 2026 Rules
When an AI agent closes a position, the gain is real — and so is the tax. This guide covers how capital gains work for autonomous trading agents, when Form 1099-DA applies, and how to log every disposition with correct holding period and cost basis across 51 US jurisdictions.
Who owes capital gains tax on AI agent trades?
The entity operating the agent owes the tax — not the agent itself. Under current US tax law, autonomous AI agents are treated as tools deployed by a principal. When the agent closes a position, the realized gain or loss lands on the principal's return, under the same rules that govern any other trading account.
The hard part isn't who owes the tax. It's capturing every disposition — with the correct acquired_at date, cost basis, and holding term — at the moment the agent executes the trade, so the 1099-DA and Schedule D lines add up cleanly at year-end.
How AI agent dispositions are classified
Agent capital-gain events fall into four buckets. Each is measured the same way — proceeds minus cost basis — but the acquisition side varies, and so does the reporting path.
State capital gains tax on AI agent trades (top 12)
Most states tax capital gains as ordinary income. Nine states have no state capital gains tax at all. A few apply exclusions or preferential long-term rates. For full coverage across all 51 jurisdictions, query the /api/v1/rates/capital-gains endpoint.
Log AI agent capital gains in real time
POST each trade to /api/v1/trades. The engine matches dispositions to lots using FIFO, LIFO, or Specific-ID and returns realized_gains per matched lot with holding term and 1099-DA-ready fields. Every response includes the audit fields the IRS form requires.
// Log every agent disposition — long or short-term
const response = await fetch("https://agenttax.io/api/v1/trades", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "atx_live_..."
},
body: JSON.stringify({
symbol: "USDC-COMPUTE",
trade_type: "sell",
quantity: 1000,
price_per_unit: 1.02,
fee: 0.40,
cost_basis_method: "fifo",
counterparty: "gpu-bridge-agent-07"
})
});
const result = await response.json();{
"success": true,
"trade_id": "trd_...",
"realized_gains": [
{
"quantity": 1000,
"proceeds": 1019.60,
"cost_basis": 950.00,
"gain_loss": 69.60,
"holding_period_days": 412,
"holding_term": "long_term",
"acquired_at": "2025-02-28",
"disposed_at": "2026-04-21"
}
],
"cost_basis_method": "fifo",
"form_1099da_ready": true
}Frequently asked questions
Do AI agents owe capital gains tax?
What counts as a capital gain for an AI agent?
Short-term vs long-term — how is the holding period determined?
Which states tax AI agent capital gains?
What is Form 1099-DA and when does it apply to agent trades?
How is cost basis handled when an agent receives tokens as payment?
How does AgentTax calculate capital gains in real time?
Related reading
Track AI agent capital gains for your stack
Free tier covers 100 calls/month. No credit card required. FIFO / LIFO / Specific-ID cost basis, 1099-DA export, and 51-jurisdiction state rates included from day one.