itr-agent

v0.7.0
io.github.Sagargupta16/itr-agent Checked 4 days ago Published 21 days ago

Local-first Indian income tax filing agent: ITR form, tax computation, 26AS/AIS reconciliation

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

compute_tax Compute Indian income tax

Deterministic Indian income tax computation for a fiscal year. Handles new/old regime slabs, standard deduction, 87A rebate with marginal relief (threshold tested on TOTAL income per the statute; rebate never offsets 111A/112A tax under the new regime), employer NPS under 80CCD(2) in both regimes, house-property loss (self-occupied interest capped by s.24(b), not deductible under 115BAC; set-off capped by s.71(3A); none under 115BAC), 111A/112A capital gains rates with the basic-exemption set-off, surcharge (with the 15% cap on gains and marginal relief), and 4% cess (FY 2025-26 figures). All…

ParameterTypeDescription
regime *stringTax regime. 'new' (115BAC) is the default regime since FY 2023-24.
ageBandstringAge band: below60, senior (60-79), superSenior (80+). Affects old-regime exemption only.
deductionsnumberOld regime only: total Chapter VI-A deductions (80C, 80D, ...) in INR, EXCLUDING employer NPS (use employerNps80CCD2). Ignored under the new regime.
employerNps80CCD2numberEmployer's NPS contribution under s.80CCD(2) in INR. Allowed in BOTH regimes (the one Chapter VI-A deduction 115BAC keeps); capped at 14% of salary in the new regime, 10% (private) / 14% (government)…
fystringFiscal year, e.g. '2025-26' (AY 2026-27); '2026-27' is tax year 2026-27 under the Income-tax Act 2025
governmentEmployerbooleanCentral/State Government employer (raises the old-regime 80CCD(2) cap to 14% for FY 2025-26)
housePropertyLossnumberLoss under the head house property as a POSITIVE number: home-loan interest on the house you live in, or a let-out property's net loss. Requires housePropertyType. Old regime: set off against other he…
housePropertyTypestringRequired when housePropertyLoss is above 0. 'selfOccupied': the home you live in; its interest is deductible only up to Rs 2,00,000 in the old regime (s.24(b)) and not at all in the new regime (s.115B…
housesarrayOptional: every house owned, one entry each, INSTEAD of housePropertyLoss. The tool works out income from house property per regime (nil self-occupied interest under the new regime) and folds it in, s…
ltcg112AnumberLong-term capital gains under section 112A in INR, BEFORE the Rs 1,25,000 exemption
otherIncomenumberOther normal-rate income in INR (interest, net rent, etc.)
presumptiveBusinessobjectOptional: presumptive business or profession (44AD / 44ADA / 44AE). The tool works out the deemed income and adds it to otherIncome itself.
salaryIncomenumberGross salary income in INR, before standard deduction
stcg111AnumberShort-term capital gains under section 111A (listed equity, STT paid) in INR

compare_regimes Compare old vs new tax regime

Compute tax under BOTH regimes for the same income and return a side-by-side comparison with the recommended regime and the savings amount. Pass the old-regime deductions you could actually claim; the new regime ignores them. `breakeven` says, from code, the smallest old-regime deductions at which the old regime costs no more than the new one and how much more that is than what was passed (null when no amount gets there). Quote it rather than estimating.

ParameterTypeDescription
ageBandstringAge band: below60, senior (60-79), superSenior (80+). Affects old-regime exemption only.
deductionsnumberOld regime only: total Chapter VI-A deductions (80C, 80D, ...) in INR, EXCLUDING employer NPS (use employerNps80CCD2). Ignored under the new regime.
employerNps80CCD2numberEmployer's NPS contribution under s.80CCD(2) in INR. Allowed in BOTH regimes (the one Chapter VI-A deduction 115BAC keeps); capped at 14% of salary in the new regime, 10% (private) / 14% (government)…
fystringFiscal year, e.g. '2025-26' (AY 2026-27); '2026-27' is tax year 2026-27 under the Income-tax Act 2025
governmentEmployerbooleanCentral/State Government employer (raises the old-regime 80CCD(2) cap to 14% for FY 2025-26)
housePropertyLossnumberLoss under the head house property as a POSITIVE number: home-loan interest on the house you live in, or a let-out property's net loss. Requires housePropertyType. Old regime: set off against other he…
housePropertyTypestringRequired when housePropertyLoss is above 0. 'selfOccupied': the home you live in; its interest is deductible only up to Rs 2,00,000 in the old regime (s.24(b)) and not at all in the new regime (s.115B…
housesarrayOptional: every house owned, one entry each, INSTEAD of housePropertyLoss. The tool works out income from house property per regime (nil self-occupied interest under the new regime) and folds it in, s…
ltcg112AnumberLong-term capital gains under section 112A in INR, BEFORE the Rs 1,25,000 exemption
otherIncomenumberOther normal-rate income in INR (interest, net rent, etc.)
presumptiveBusinessobjectOptional: presumptive business or profession (44AD / 44ADA / 44AE). The tool works out the deemed income and adds it to otherIncome itself.
salaryIncomenumberGross salary income in INR, before standard deduction
stcg111AnumberShort-term capital gains under section 111A (listed equity, STT paid) in INR

schedule_advance_tax Plan advance tax installments

Build the advance tax installment plan (06-15 at 15%, 09-15 at 45%, 12-15 at 75%, 03-15 at 100% cumulative, MM-DD, FY 2025-26) for an estimated tax liability net of TDS. Reports per-installment amounts and shortfalls against what has been paid so far.

ParameterTypeDescription
estimatedTax *numberEstimated total tax liability for the FY in INR (use compute_tax first)
fystringFiscal year, e.g. '2025-26'
paidSoFararrayAdvance tax already paid per installment, in order
tdsExpectednumberTDS/TCS expected to be deducted during the year in INR

list_deductions List old-regime deductions

Return the old-regime deduction checklist with statutory caps for a fiscal year (80C, 80CCD(1B), 80D tiers, 80TTA/TTB, 24(b), HRA metro list). Useful for estimating the `deductions` input to compute_tax/compare_regimes.

ParameterTypeDescription
fystringFiscal year, e.g. '2025-26'

parse_form26as Parse Form 26AS (text export)

Parse the caret-delimited Form 26AS TEXT export from TRACES into structured TDS entries (deductor, TAN, section, amounts, booking status) with totals, plus TCS rows (206C*) separated into tcsEntries. Reports creditableTdsDeposited (status F rows only) alongside the raw total. Download the 'Text' format from TRACES (the archive opens with your DOB as DDMMYYYY); PDF exports are not supported.

ParameterTypeDescription
path *stringAbsolute path to the 26AS .txt file downloaded from TRACES

parse_ais Parse AIS (Annual Information Statement)

Decrypt and parse the AIS JSON export from the income tax portal, entirely on-device. Provide pan + dob (DDMMYYYY) to derive the password, or pass it explicitly. Returns taxpayer info, normalized information rows (TDS entries, SFT transactions) with amounts, dates, and codes extracted by column label, and `totals` summed in code: every section/element/code group with its row count and amount (each group's `key` is what reconcile_documents takes as interestGroups/dividendGroups), and salary per employer TAN from section 192 TDS rows. Never add up rows yourself. The decryption scheme is reverse-…

ParameterTypeDescription
path *stringAbsolute path to the downloaded AIS .json file
dobstringDate of birth as DDMMYYYY (or DD-MM-YYYY); date of incorporation for non-individuals. NOT ISO YYYY-MM-DD.
panstringPAN (used to derive the decryption password)
passwordstringExplicit decryption password (overrides pan+dob derivation)

compute_interest_234 Compute 234A/234B/234C interest

Deterministic sections 234A, 234B and 234C interest (FY 2025-26 rates). 234A: 1%/month for filing after the due date, on tax outstanding after all prepaid tax. 234B: 1%/month on assessed-minus-advance when advance < 90% (from 1 April of the AY), reduced by self-assessment payments under s.140A. 234C: per-installment shortfalls with the statutory 12%/36% safe harbors for June/September, measured on tax due on RETURNED income. Rule 119A rounding applied (principal floored to Rs 100, part month = full month). Pass dates (filingDate with form, paidOrAssessedDate, payment dates) and the tool counts…

ParameterTypeDescription
assessedTax *number234B base: tax on total income minus TDS/TCS and reliefs, in INR (advance tax is NOT deducted here)
advanceTaxPaidnumberTotal advance tax paid during the FY, in INR
cumulativePaidarrayCumulative (running-total) advance tax paid by Jun 15 / Sep 15 / Dec 15 / Mar 15, in INR. Required for 234C.
dueDatestringExplicit s.139(1) due date (YYYY-MM-DD) for 234A, e.g. an audit case. Overrides `form`.
filingDatestringDate the return is or will be filed (YYYY-MM-DD). Drives 234A (needs `form` or `dueDate`) and, unless paidOrAssessedDate is given, the end of 234B.
formstringITR form, used with filingDate to pick the non-audit s.139(1) due date from the rule pack for 234A
fystringFiscal year, e.g. '2025-26' (AY 2026-27)
monthsFor234BintegerMonths from 1 April of the AY to the date of payment or assessment (part month = full month). Prefer paidOrAssessedDate or filingDate and let the tool count. Filing on 20 July of the AY is 4.
monthsLateFilinginteger234A: months from the day after the due date to the date of filing (part month = full month). 0 means filed on time. Prefer filingDate with `form` and let the tool count.
paidOrAssessedDatestring234B end date (YYYY-MM-DD): when the outstanding tax is paid in full, or the assessment date. Defaults to filingDate. The tool counts the months from 1 April of the AY (Rule 119A, part month = full mo…
presumptiveboolean44AD/44ADA presumptive: a single 100% installment by 03-15 (MM-DD) instead of four
selfAssessmentPaymentsarraySelf-assessment tax paid under s.140A before assessment: each payment stops 234B interest on that amount from its own month (s.234B(2))
taxDueOnReturnedIncomenumber234C base: tax due on RETURNED income minus TDS/TCS/reliefs, in INR. Defaults to assessedTax when omitted.
taxOutstandingFor234Anumber234A base: tax outstanding after TDS/TCS, advance tax, AND reliefs, in INR. Defaults to assessedTax minus advanceTaxPaid.
taxOutstandingForms234AnumberDeprecated misspelling of taxOutstandingFor234A; still accepted.

compute_hra Compute HRA exemption (+80GG)

HRA exemption per Rule 2A: least of (actual HRA, rent minus 10% of salary, 50% metro / 40% non-metro of salary), computed period-wise. Salary = basic + retirement-forming DA + fixed-percentage turnover commission. Old regime only. Give each period's city: the tool checks it against the fy's rule-pack metro list (FY 2025-26: Delhi, Mumbai, Kolkata, Chennai). Also computes the 80GG alternative for rent payers who received no HRA at any time in the year (the two are mutually exclusive).

ParameterTypeDescription
eightyGGobjectCompute the 80GG alternative instead of HRA (requires: no HRA received at any time in the year)
fystringFiscal year, e.g. '2025-26' (AY 2026-27)
periodsarrayHomogeneous periods (amounts are per-period TOTALS, not monthly). Split whenever salary, rent, HRA, or city changes. Required unless eightyGG is supplied.
regimestringHRA exemption and 80GG are both unavailable under the new regime

reconcile_documents Reconcile Form 16 vs AIS vs 26AS

Cross-document mismatch report -- the checks that pre-empt 143(1)(a) intimations and 139(9) defect notices: TDS claimed vs 26AS deposited (the ledger of record), missing-employer detection, AIS interest/dividend vs declared, Form 16 vs 26AS per-TAN totals, declared salary below the Form 16 total, and 26AS rows missing the gross amount. Also groups 26AS TDS by income head so each credit can be placed in the right schedule. Prefer the file inputs: form26asPath reads the 26AS export itself, and aisFile decrypts the AIS and sums the groups you name, so no row or total is copied by hand. Pass which…

ParameterTypeDescription
aisobjectAIS aggregates, when you have figures rather than the file. Take them from parse_ais `totals` (summed in code), never by adding rows yourself; prefer aisFile.
aisFileobjectThe AIS export itself: salary by TAN is taken from section 192 TDS rows, and interest/dividend are the code-summed totals of the groups you name. Any figure given in `ais` overrides the file's.
form16arrayPer-employer Form 16 Part A figures
form26asPathstringAbsolute path to the 26AS TRACES Text export (.txt). Parsed here, so the rows never pass through your arguments. Use instead of form26asTds.
form26asTdsarrayTDS entries from parse_form26as (tdsEntries, not tcsEntries)
fystringFiscal year, e.g. '2025-26' (AY 2026-27)
returnobjectFigures from the draft return

recommend_itr_form Recommend the ITR form

Recommend ITR-1/2/3/4 for an individual from income heads, residency, losses, and disqualifier flags, with rule-by-rule reasoning. Loss-continuity aware: brought-forward business/speculative losses force ITR-3 even with zero current-year business income (Schedule CFL). Checks the 44AD/44ADA turnover ceilings when presumptiveTurnover is supplied, the 44AE vehicle limit when vehicles44AE is supplied, and the ITR-1/ITR-4 house-property limit (2 for AY 2026-27). Returns the filing deadline with its statutory citation, the belated and revised deadlines, and the 234F late fee.

ParameterTypeDescription
totalIncome *numberEstimated TOTAL income in INR, i.e. after Chapter VI-A deductions -- this is the figure the Rs 50,00,000 ITR-1/ITR-4 ceiling tests (AY 2026-27). Use the gross figure only if you have no deductions.
agriIncomenumberAgricultural income in INR (above Rs 5,000 rules out ITR-1/ITR-4)
businessLossbooleanNon-speculative business loss (incl. F&O) brought forward or arising this year
capitalLossbooleanCapital loss (STCL/LTCL) brought forward or to carry forward
cashReceiptsWithin5PctbooleanCash receipts are at most 5% of turnover/receipts (lifts the 44AD/44ADA ceiling to Rs 3,00,00,000 / Rs 75,00,000 for FY 2025-26)
esopDeferralbooleanTax deferred on eligible-startup ESOPs (s80-IAC)
fystringFiscal year, e.g. '2025-26'
hasBusinessIncomebooleanAny business or professional income this year, incl. F&O trading and freelancing
hasForeignAssetsOrIncomebooleanForeign assets/income incl. vested RSUs or ESPP of a foreign parent (Schedule FA)
hasLotteryOrGamingIncomebooleanWinnings from lottery, online games, or racehorses
hasNonPresumptiveBusinessbooleanAlso has business/professional income OUTSIDE the presumptive scheme (ITR-4 cannot carry both)
hasOtherCapitalGainsbooleanCapital gains outside 111A/112A: property, debt MF, unlisted or foreign shares
holdsUnlistedSharesbooleanHeld unlisted equity shares during the FY
housePropertiesintegerNumber of house properties with income or loss (ITR-1/ITR-4 admit up to 2 for AY 2026-27)
housePropertyLossbooleanHouse property loss to carry forward
isDirectorbooleanDirector in any company during the FY
isPartnerInFirmbooleanPartner in a partnership firm
ltcg112AnumberLTCG under 112A in INR before the Rs 1,25,000 exemption
presumptivebooleanOpting for presumptive taxation (44AD/44ADA/44AE)
presumptiveSchemestringWhich presumptive section (drives the turnover ceiling check; defaults to 44AD)
presumptiveTurnovernumber44AD turnover or 44ADA gross receipts in INR. Above Rs 2,00,00,000 (Rs 3,00,00,000 with cash receipts within 5%) / Rs 50,00,000 (Rs 75,00,000) the scheme lapses and ITR-3 with audit applies (FY 2025-2…
residencystringResidential status for the FY (RNOR/NRI cannot file ITR-1/ITR-4)
speculativeLossbooleanSpeculative (intraday equity) loss brought forward or arising this year
stcg111AnumberSTCG under 111A in INR (any amount rules out ITR-1/ITR-4)
tds194NbooleanTDS was deducted under s.194N on cash withdrawals (rules out ITR-1)
vehicles44AEinteger44AE only: the most goods carriages owned at any time in the year (the scheme allows up to 10). Omit to skip the check.

filing_checklist Step-by-step ITR filing checklist

Ordered, form-specific walkthrough for filing ITR-1/2/3/4 on incometax.gov.in: documents to gather, reconciliation, tax computation, portal steps schedule by schedule, and e-verification. Guidance only -- the taxpayer performs the final submit on the portal themselves.

ParameterTypeDescription
form *stringThe ITR form to file (use recommend_itr_form if unsure)
fystringFiscal year, e.g. '2025-26'

compute_house_property Compute income from house property

Work out the head "Income from house property" per house from rent, municipal tax and home-loan interest: annual value, the 30% standard deduction (s.24(a)), interest with the self-occupied cap of Rs 2,00,000 shared across self-occupied houses (Rs 30,000 for an older loan; nil under the new regime), pre-construction interest in 5 instalments, and houses past the 2-house self-occupied limit deemed let out (FY 2025-26 figures). compute_tax and compare_regimes take the same `houses` input and fold the result in themselves; use this tool to show the working.

ParameterTypeDescription
houses *arrayEvery house the taxpayer owns, one entry each. The tool works out the head (annual value, 30% standard deduction, capped interest) per regime, so do not also pass housePropertyLoss.
regime *stringTax regime: self-occupied interest is nil under the new regime (s.115BAC(2)(i)) and capped in the old
fystringFiscal year, e.g. '2025-26' (AY 2026-27); '2026-27' is tax year 2026-27 under the Income-tax Act 2025

compute_presumptive_income Compute presumptive business income

Deemed profit under the presumptive schemes (FY 2025-26 figures): 44AD at 8% of turnover (6% of digital receipts) up to Rs 2,00,00,000, or Rs 3,00,00,000 where cash is at most 5%; 44ADA at 50% of professional receipts up to Rs 50,00,000 / Rs 75,00,000; 44AE per goods carriage per month for up to 10 vehicles. Reports eligibility, the deemed figure with its working, and the income to report (the higher of deemed and declared). compute_tax takes the same `presumptiveBusiness` input and adds the income itself.

ParameterTypeDescription
scheme *string44AD: small business on turnover. 44ADA: specified profession on gross receipts. 44AE: goods carriages.
carriagesarray44AE: each goods carriage owned in the year (the scheme allows at most 10 at any time)
cashReceiptsWithin5PctbooleanCash receipts are at most 5% of the total, which lifts the ceiling to Rs 3,00,00,000 (44AD) or Rs 75,00,000 (44ADA). Required for 44ADA; for 44AD it is worked out from the two turnover figures when le…
declaredProfitnumberA higher profit the taxpayer declares; the scheme taxes the deemed figure or more
digitalTurnovernumber44AD: turnover received by account-payee cheque, bank transfer, UPI or other digital modes (deemed profit 6%)
fystringFiscal year, e.g. '2025-26' (AY 2026-27); '2026-27' is tax year 2026-27 under the Income-tax Act 2025
grossReceiptsnumber44ADA: gross professional receipts (deemed profit 50%)
maxCarriagesAtAnyTimeinteger44AE: the most carriages owned at any one time; defaults to the number listed
otherTurnovernumber44AD: the rest of turnover, cash included (deemed profit 8%)

compute_loss_setoff Set off and carry forward losses

Apply current-year and brought-forward losses in statutory order (s.70 within a head, s.71 across heads with the Rs 2,00,000 house-property cap and no business loss against salary, then ss.71B/72/73/74 oldest first) and report each step with its section, income by head after set-off, what is carried forward with the last year it can be used (house property 8, business 8, speculative 4, capital 8 years), what expired, what s.80 forfeits on a late return, and Schedule CYLA/BFLA/CFL rows. `forComputeTax` goes into compute_tax or tax_summary field for field, with nothing added (do not also pass ho…

ParameterTypeDescription
filedByDueDate *booleanThe return for THIS year is filed by the s.139(1) due date. If not, s.80 stops this year's business, speculative and capital losses from being carried forward (house property survives, s.71B). list_ta…
regime *stringTax regime: no house-property loss crosses heads under the new regime (s.115BAC(2)); run once per regime to compare
broughtForwardarrayLosses brought forward from earlier years: one entry per kind and origin year, from last year's Schedule CFL
businessnumberBusiness or profession other than speculation (F&O included), net: profit or a NEGATIVE loss, in INR
capitalGainsobjectCapital gains and losses of the year
fystringFiscal year, e.g. '2025-26' (AY 2026-27); '2026-27' is tax year 2026-27 under the Income-tax Act 2025
housePropertynumberIncome from house property for all houses together, in INR: positive income or a NEGATIVE loss (compute_house_property totals.income)
housePropertyTypestringWhich kind of house a house-property LOSS comes from; 'letOut' for a figure from compute_house_property (its caps are already applied)
otherSourcesnumberIncome from other sources at normal rates, in INR
salaryIncomenumberGross salary before the standard deduction, in INR
speculativenumberSpeculative business (intraday equity), net: profit or a NEGATIVE loss, in INR

tax_summary What do I owe: tax, interest and fee in one call

One computation of what is payable or refundable for the year: tax (compute_tax, with houses and presumptiveBusiness folded in), less TDS and TCS read from the Form 26AS file itself (creditable status F rows), advance tax and self-assessment tax, plus s.234A, s.234B and s.234C interest with every month count taken from the dates, and the s.234F fee (Rs 5,000, Rs 1,000 up to Rs 5,00,000 of income) when filed after the due date. The due date comes from the rule pack by form; the filing date defaults to today in India. Net is rounded under s.288B; negative is a refund. Use this instead of subtrac…

list_tax_years List supported fiscal years

List the fiscal years this server has rule packs for, with filing deadlines for the current assessment year and `status`: computed from today's date in India, which deadlines have passed, the days left, the phase per ITR form (on time, belated with the s.234F fee, or updated return only), the revised-return window, and the next advance tax instalment of the current financial year. Quote `status` instead of comparing dates yourself. `statutes` gives each year's Act and, for tax year 2026-27 under the Income-tax Act 2025, the map from the 1961 section numbers the notes cite.

ParameterTypeDescription
asOfstringDate to report the status for (YYYY-MM-DD). Defaults to today in India; pass it only to plan ahead.