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 (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.

StateTop RateTreatmentBucket
Washington7% flat on LT gains > $262KNewest state CG tax — real estate & retirement 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
Oregon9.9%Taxed as ordinary incomeOrdinary
Minnesota9.85%Additional 1% NIIT on net investment income over $1MOrdinary
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
Texas0%No state capital gains taxNone
Florida0%No state capital gains taxNone
Missouri0%100% deduction for individual capital gains effective 2025None

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
}

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 over $262K). 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.