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.
A 1099-DA reporting engine, not a capital gains calculator
Search "AI agent capital gains" and most results are general-purpose calculators — paste in a list of trades, get a number back. That model assumes a human is sitting down once a year to reconcile a portfolio. An autonomous agent breaks that assumption: it can open and close thousands of positions a day with no person in the loop, and the data a calculator needs — the exact acquisition date, the cost basis of the specific lot being sold, the fee on each leg — only exists at the moment the agent executes the trade. Capture it then, or lose it.
AgentTax is built for the disposition side, not the filing side. Every trade your agent posts to /api/v1/trades is matched to a lot in real time using FIFO, LIFO, or Specific-ID, and the response carries the proceeds, cost basis, holding days and term for each matched lot. GET /api/v1/export/1099-da joins those rows to their trade dates in a draft 1099-DA layout at year-end — not a number you still have to defend.
- Run after the fact, once trades are already done
- Needs a human to paste or import a trade history
- Returns a total — basis decisions are yours to defend
- No place to log a lot the instant an agent acts
- Logs each disposition the instant the agent executes it
- Matches lots automatically (FIFO / LIFO / Specific-ID)
- Returns cost basis, proceeds and holding term per matched lot
- Lives inside the agent's request/response loop via API
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 (23 jurisdictions)
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 proceeds, cost basis, holding days and term. GET /api/v1/export/1099-da assembles them, with acquisition and sale dates, into a draft 1099-DA layout.
// Log every agent disposition — long or short-term
// (lot on the ledger: 1,000 bought at $0.95 on 2025-03-01)
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({
asset_symbol: "USDC-COMPUTE",
trade_type: "sell",
quantity: 1000,
price_per_unit: 1.02,
fee_amount: 0.40,
trade_date: "2026-04-17T00:00:00Z",
accounting_method: "fifo",
counterparty: "gpu-bridge-agent-07"
})
});
const result = await response.json();{
"trade": {
"id": "trd_...",
"asset_symbol": "USDC-COMPUTE",
"trade_type": "sell",
"quantity": 1000,
"total_amount": 1020.00
},
"realized_gains": [
{
"asset_symbol": "USDC-COMPUTE",
"quantity": 1000,
"proceeds": 1019.60,
"cost_basis": 950.00,
"gain_loss": 69.60,
"holding_days": 412,
"term": "long_term",
"accounting_method": "fifo",
"fee_deducted": 0.40
}
],
"total_gain_loss": 69.60
}Statutory citations and regulatory references
Every position the AgentTax capital-gains engine takes is anchored to a statute, regulation, or controlling revenue ruling. The most-cited authorities — federal holding period, wash-sale and basis rules, the 1099-DA broker regime, and notable state authorities — are grouped below. The full policy registry is exposed at /decisions.
- IRC §1222(3)Long-term threshold: gain on a capital asset held more than one year.
- Rev. Rul. 66-7The holding period begins the day after acquisition and is measured by calendar dates, not by counting days. Long-term begins the day after the first anniversary of acquisition; a sale on the anniversary itself is short-term, and a leap day does not change that. AgentTax's engine applies this anniversary rule.
- IRC §1(h)Preferential federal long-term rate schedule (0% / 15% / 20%) plus the 3.8% NIIT under §1411 where applicable.
- IRC §1091Wash-sale rule for stocks and securities — 60-day window; disallowed loss tacked to the replacement lot's basis. Treasury has not extended §1091 to digital assets as of the 2024 final regs.
- Treas. Reg. §1.1012-1(c)Specific-ID lot identification rules; default FIFO when adequate identification is not made by settlement.
- Treas. Reg. §1.6045A-1Transfer-statement obligations between brokers — carries cost basis with the asset when an agent moves a position between custodians.
- Notice 2014-21Foundational IRS guidance: convertible virtual currency is treated as property; every disposition is a taxable event.
- Rev. Rul. 2019-24Hard forks and airdrops are ordinary income at fair market value on the day the taxpayer obtains dominion and control — and that FMV becomes the new basis.
- T.D. 10000 — Treas. Reg. §1.6045-1 (1099-DA final regs)Broker basis reporting on digital-asset sales for transactions on or after Jan 1, 2026. Defines "digital-asset broker" broadly enough to reach many agent-operated venues.
- WA SB 5813 (2025)Added the 9.9% high-tier rate on long-term gains above $1M (over the indexed standard deduction). Real estate, retirement, and qualified family-business gains remain exempt.
- MO SB 190 (2024)100% individual capital-gains deduction effective for tax years 2025 forward. AgentTax engine returns rate=0 for MO.
- SC Code §12-6-115044% net long-term capital-gain exclusion — effective LT rate ~3.92% on the 7% top bracket.
- HRS §235-51 (Hawaii)Preferential 7.25% long-term rate vs the 11% ordinary top rate.
- A.R.S. §43-1022 (Arizona)25% exclusion on long-term capital gains from assets acquired after Dec 31, 2011.
- NM Income Tax Act §7-2-34Greater of $2,500 or 40% of up to $1M of net long-term capital gains is excluded from income.
- Ark. Code §26-51-81550% exclusion on long-term gains; gains exceeding $10M fully exempt.
How AgentTax compares to existing capital-gains tooling
Most capital-gains tools target retail crypto investors, enterprise broker reporting, or year-end human filing. None of them sit inside an autonomous agent's transaction loop, and none of them carry per-call FIFO/LIFO/Specific-ID lot matching with 1099-DA-shaped output. The table below summarizes the practical differences.
| Vendor | Built for agents? | Coverage | Integration | Key difference |
|---|---|---|---|---|
| AgentTax | Yes — autonomous agent loop, per-trade API | 51 jurisdictions, FIFO/LIFO/Specific-ID, 1099-DA-ready output | REST API + Python & Node SDKs + MCP server | Built API-first for agent dispositions; gain calculation lives inside the agent's request/response cycle. |
| Koinly | No — consumer crypto investor portal | Personal crypto portfolios, multi-country support | CSV / exchange-API imports; web UI | Designed for retail human filers; no per-call API for agents to log dispositions in real time. |
| CoinTracker | No — consumer crypto portfolio | 300+ exchanges and wallets, US/international tax forms | Wallet/exchange sync + web UI; limited API | Strong portfolio aggregation for human investors; not built for autonomous agent-initiated trade logging. |
| TaxBit | Partial — enterprise broker/issuer focus | 1099-DA broker compliance for exchanges and large issuers | Enterprise API designed for centralized broker workflows | Vertical for digital-asset brokers and issuers; pricing and onboarding favor enterprise buyers, not agent builders. |
| TokenTax | No — human-prepared returns | Crypto tax filing service with advisor support | Hybrid software + human CPA service | Year-end filing model; does not surface gain-on-disposition data inside an agent runtime. |
| instead.com | Partial — "AI agent for tax planning and filing" | Personal tax filing with AI-assisted planning surface | Web product targeting human filers | Positions AI on the filer side, not the disposition side — no public API for autonomous agents to log lots and receive 1099-DA-shaped responses. |
Comparison reflects published positioning and product surface as of May 2026. AgentTax does not maintain a partnership with the vendors listed; references are descriptive, not endorsements.