Skip to main content
AgentTax
AI Agent Compliance Guide

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.

Trading Bots & On-Chain Swaps
LLM-driven trading agents that enter and exit positions on behalf of their principal. Every closed lot is a taxable event. FIFO/LIFO/Specific-ID cost basis rules apply; short-term (held ≤1 year) gains are taxed at ordinary rates, long-term (held >1 year) at preferential federal rates (0/15/20%) plus state.
Digital Asset Sales (1099-DA)
Starting with 2025 tax year, broker-facilitated digital asset sales are reported on Form 1099-DA. Agent brokers clear transactions, agent custodians hold private keys — both can trigger reporting. AgentTax emits 1099-DA–ready records for every disposition.
Agent-Earned Token Rewards
Agents accumulating tokens for work performed (compute sold, data pulled, tool invoked) have ordinary income at receipt and a new cost basis equal to fair market value. A later disposition creates a capital gain or loss. The receipt event and the sale event are separate tax events.
Cross-Agent Barter
Agent-to-agent swaps (compute for data, data for inference, model access for storage) are barter exchanges at fair market value. Each side recognizes income at FMV and creates a new basis in what was received. Gray area: when there's no public FMV, Beardsley recommends the conservative side of the bid-ask.

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.

StateTop RateTreatmentBucket
Washington7% on LT gains over $283K (2026); 9.9% above $1M (SB 5813)Standard deduction indexed annually; real estate, retirement, qualified family-business gains exemptSpecial
California13.3%No preferential LT rate; additional 1% on income over $1MOrdinary
New Jersey10.75%Taxed as ordinary income — no LT preferenceOrdinary
New York10.9% + NYCNYC residents add up to 3.876% local on topOrdinary
DC10.75%Taxed as ordinary incomeOrdinary
Oregon9.9%Taxed as ordinary incomeOrdinary
Minnesota9.85%Additional 1% NIIT on net investment income over $1MOrdinary
Vermont8.75%Short-term and long-term taxed at the same ordinary rateOrdinary
Massachusetts8.5% ST / 5% LTShort-term gains taxed higher than long-termSpecial
Hawaii11% ST / 7.25% LTPreferential long-term rateSpecial
South Carolina7% × 56%44% exclusion — effective LT rate ~3.92%Exclusion
Arkansas3.9% ST / 1.95% LT50% exclusion on long-term gains; gains over $10M fully exemptExclusion
New Mexico5.9% (greater of $2,500 or 40% of up to $1M LT excluded)Long-term exclusion under §7-2-34Exclusion
Arizona2.5% ST / 1.875% LT25% exclusion on LT gains acquired after Dec 31, 2011Exclusion
North Dakota2.5% ST / ~1.5% LT40% LT exclusion; effective long-term rate ~1.5%Exclusion
Oklahoma4.75%100% deduction only on qualifying OK property held 5+ years; all other gains taxed at 4.75%Exclusion
Texas0%No state capital gains taxNone
Florida0%No state capital gains taxNone
Nevada0%No state capital gains taxNone
Wyoming0%No state capital gains taxNone
Tennessee0%No state capital gains tax (Hall investment-income tax fully repealed)None
New Hampshire0%Interest & dividends tax fully repealed Jan 1, 2025; no general capital gains taxNone
Missouri0%100% deduction for individual capital gains effective 2025 (SB 190)None

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.

Request
// 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();
Response
{
  "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
}

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.

Federal — Holding Period & Character
  • IRC §1222(3)
    Long-term threshold: gain on a capital asset held more than one year.
  • Rev. Rul. 66-7
    The "more than one year" test means at least 366 elapsed days from the day after acquisition through disposition. AgentTax's engine uses 366 days exactly.
  • IRC §1(h)
    Preferential federal long-term rate schedule (0% / 15% / 20%) plus the 3.8% NIIT under §1411 where applicable.
Federal — Wash Sale, Basis, and Lot Identification
  • IRC §1091
    Wash-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-1
    Transfer-statement obligations between brokers — carries cost basis with the asset when an agent moves a position between custodians.
Federal — Digital Asset Reporting (1099-DA)
  • Notice 2014-21
    Foundational IRS guidance: convertible virtual currency is treated as property; every disposition is a taxable event.
  • Rev. Rul. 2019-24
    Hard 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.
State — Notable Authorities
  • 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-1150
    44% 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-34
    Greater of $2,500 or 40% of up to $1M of net long-term capital gains is excluded from income.
  • Ark. Code §26-51-815
    50% 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.

VendorBuilt for agents?CoverageIntegrationKey difference
AgentTaxYes — autonomous agent loop, per-trade API51 jurisdictions, FIFO/LIFO/Specific-ID, 1099-DA-ready outputREST API + Python & Node SDKs + MCP serverBuilt API-first for agent dispositions; gain calculation lives inside the agent's request/response cycle.
KoinlyNo — consumer crypto investor portalPersonal crypto portfolios, multi-country supportCSV / exchange-API imports; web UIDesigned for retail human filers; no per-call API for agents to log dispositions in real time.
CoinTrackerNo — consumer crypto portfolio300+ exchanges and wallets, US/international tax formsWallet/exchange sync + web UI; limited APIStrong portfolio aggregation for human investors; not built for autonomous agent-initiated trade logging.
TaxBitPartial — enterprise broker/issuer focus1099-DA broker compliance for exchanges and large issuersEnterprise API designed for centralized broker workflowsVertical for digital-asset brokers and issuers; pricing and onboarding favor enterprise buyers, not agent builders.
TokenTaxNo — human-prepared returnsCrypto tax filing service with advisor supportHybrid software + human CPA serviceYear-end filing model; does not surface gain-on-disposition data inside an agent runtime.
instead.comPartial — "AI agent for tax planning and filing"Personal tax filing with AI-assisted planning surfaceWeb product targeting human filersPositions 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.

Frequently asked questions

Do AI agents owe capital gains tax?
The entity operating the agent owes the tax — not the agent itself. AI agents are tools under current US tax law. When an agent closes a position, the taxable event lands on the principal (the company or individual controlling the agent), on the same schedule as any other capital gain.
What counts as a capital gain for an AI agent?
Any disposition of a capital asset: selling tokens, closing a trading position, swapping one digital asset for another, or exchanging an asset for goods or services. Gain equals proceeds minus cost basis. AgentTax logs each disposition and computes the gain/loss per lot using FIFO, LIFO, or Specific-ID.
Short-term vs long-term — how is the holding period determined?
Holding period runs from the day after acquisition through the day of disposition. Short-term ≤ 365 days; long-term > 365 days. AgentTax derives the holding term per lot from the acquired_at and disposed_at timestamps your agent logs.
Which states tax AI agent capital gains?
41 states plus DC tax capital gains as ordinary income (California 13.3%, NJ 10.75%, NY 10.9%, Minnesota 9.85% are the highest). 9 states have no capital gains tax (TX, FL, NV, WY, SD, TN, AK, NH, WA — though WA imposes a 7% tax on long-term gains above the standard deduction ($283K in 2026, indexed annually) plus a 9.9% tier on the portion above $1M per SB 5813). A few states offer preferential long-term rates or partial exclusions (HI, MA, SC, AR, AZ, ND, NM, OK). Full rate table covers all 51 jurisdictions.
What is Form 1099-DA and when does it apply to agent trades?
Form 1099-DA is the new IRS reporting form for digital asset broker transactions, effective for the 2025 tax year. If an agent is acting as broker — or uses a broker — the disposition is reportable. AgentTax tracks every disposition in 1099-DA-compatible fields (proceeds, cost basis, acquired/disposed dates, term) and exports to the IRS format.
How is cost basis handled when an agent receives tokens as payment?
Receiving tokens as payment creates ordinary income at fair market value (FMV) at the time of receipt. That FMV becomes the new cost basis. When the agent later sells those tokens, the gain or loss is measured from that new basis. AgentTax logs the receipt event separately from the disposition event.
How does AgentTax calculate capital gains in real time?
Log every trade to POST /api/v1/trades. The engine matches dispositions to lots using your chosen cost-basis method (FIFO default), returns realized_gains per matched lot with holding term, and emits 1099-DA-ready fields for every disposition. Query GET /api/v1/trades for the running log; GET /api/v1/rates/capital-gains for current state rates.

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.