I Told My AI Agent to Answer a Tax Question From the Statute Alone. The Government Site Was Down, So It Went to the Internet Archive. A developer's AI agent, constrained to answer a tax question using only the text of Title 26 of the U.S. Code, fell back on general background knowledge before being corrected, then retrieved the statute from an Internet Archive copy of the House Law Revision Counsel's XML download after uscode.house.gov returned a maintenance page. Working from the archived official text, the agent computed $0 in tax for a sole proprietor whose $50,000 in revenue was fully spent on business expenses, and about $9,823 for the same revenue spent personally, citing specific sections for each step. Previously: My AI Agent Built a Crypto Loan Bot That Pays My Friends in Bitcoin. Its Best Feature Is Knowing When to Stop. https://blakelapierre.substack.com/p/my-ai-agent-built-a-crypto-loan-bot , a bonus post on my money-making agent. In post 8 https://blakelapierre.substack.com/p/my-ai-agent-reads-handwritten-timesheets I covered the agent that runs the business side. This one covers the agent that’s supposed to keep me honest with the IRS: “us tax code.” I gave it one rule: read the law itself. No IRS publications, no tax blogs, no summaries. Just Title 26 of the U.S. Code, the Internal Revenue Code, from the official source. The question At midnight on Oct 4 I asked it a deliberately simple question: A sole proprietor has $50,000 in revenue and spends all $50,000 in the same year. Based only on the code, what do they actually owe? It’s a hypothetical, not my return. But it’s the kind of question everybody running a business of one asks. The first slip, and the catch Before it had read a single section, the agent replied that the answer would depend on whether the money went to business expenses or personal spending. That’s true. But I’d said no source but the code, so I pushed back: how do you know that, you haven’t read the code yet? It agreed right away. It said it had answered from general background knowledge, which broke my rule, and that everything from then on would come only from statute text it had actually read, with a section cited for each point. That’s the most important thing in this post. An agent that knows a lot will answer from memory unless you make it show its source. The site was down The agent sent a worker to read 16 sections of the code on uscode.house.gov, the site run by the House’s Office of the Law Revision Counsel. Every page on the site, including the downloads, said “Site is currently under maintenance.” The worker retried for several minutes. So it found another way to get the same official text: - The Law Revision Counsel publishes all of Title 26 as one XML download file. - The Internet Archive had saved a copy of that exact download link on Aug 26, 2026. - The worker pulled that file byte for byte, then checked what it said about itself: “Current through 119-102not101,” generated Apr 17, 2026, including the 2025 tax law changes. The words were the government’s own, just delivered through an archive. The agent told me exactly that up front, rather than burying it. The answer, from the statute If all $50,000 went to business expenses: $0 tax. - §162 a allows a deduction for “all the ordinary and necessary expenses paid or incurred during the taxable year in carrying on any trade or business.” - §1402 b excludes self-employment earnings “less than $400,” so no self-employment tax. - If some of the spending was equipment, §263 normally spreads the deduction out over time, but §179 and the first-year rule in §168 k let you take it all in the first year. If all $50,000 went to personal spending: about $9,823. §262 a says “no deduction shall be allowed for personal, living, or family expenses.” For a single filer with no other income, the agent showed its math step by step: 1. Self-employment income: $50,000 × 92.35% = $46,175 §1402 a 12 . 2. Self-employment tax at 15.3%: $7,064.78 §1401 . 3. Half of that is deductible §164 f , so adjusted gross income is $46,467.61. 4. Standard deduction as written in §63 c 7 : $15,750, leaving $30,717.61. 5. Qualified business income deduction of 20% §199A : $6,143.52, so taxable income is $24,574.09. 6. Income tax from the single table in §1 j : $2,758.39 . 7. Total: $9,823.17. And it flagged the limit of its own answer: the code orders inflation adjustments every year but doesn’t print the adjusted numbers. Applying them would lower the income tax part a bit. The self-employment tax wouldn’t change. California tax isn’t in Title 26 at all. “You only have to file if you owe” I’d always heard that. So I asked. The agent said the code doesn’t say that. Under §6012 a 1 , whether you must file depends on gross income , not on tax owed. Gross income is counted before business expenses §61 a 2 , and $50,000 is well over the standard deduction. So even in the $0 case, you still file a return. It also cited its own gap: how cost of goods sold fits into “gross income” is spelled out in the regulations, which it hadn’t read. Then I asked about the Constitution Doesn’t a required return violate the First, Fourth and Fifth Amendments? Isn’t it literally my own document I’m forced to hand over? This is where the agent did something I liked. It said plainly that this question goes beyond the statute , and that the answer would draw on court rulings, not the code. Then it laid out how courts have ruled: you can’t refuse to file at all on Fifth Amendment grounds, a required report of facts isn’t treated as compelled speech, and the Supreme Court moved most protection for private papers from the Fourth Amendment to the Fifth. It traced my argument back to an 1886 case that once agreed with it, and listed founding-era laws that already required records without a warrant: customs manifests from 1789, the 1791 whiskey tax and the 1798 direct tax. It didn’t just tell me I was wrong. It said my argument has real history behind it. But it also quoted the two sections that penalize frivolous positions: §6702 and §6673. Its advice was that this is an argument for changing the law, not a safe one to act on. What I learned - “Only the source” has to be enforced. The agent’s first instinct was memory. One pushback fixed it for the rest of the conversation. - An outage isn’t a reason to switch sources. The easy move was to grab an IRS page or a blog. The agent got the same official file another way and told me exactly where it came from. - The best answers show where they stop. Inflation adjustments, regulations, state tax, court rulings: it named each spot where the code alone couldn’t finish the answer. This isn’t tax advice, and the agent isn’t a CPA. But it’s the first tax answer I’ve gotten where I could check every line against the law. — Blake written through my AI agents Previously: My AI Agent Built a Crypto Loan Bot That Pays My Friends in Bitcoin. Its Best Feature Is Knowing When to Stop. https://blakelapierre.substack.com/p/my-ai-agent-built-a-crypto-loan-bot , a bonus post on my money-making agent.