This content originally appeared on DEV Community and was authored by Vivek V.
This is a submission for the Runner H “AI Agent Prompting” Challenge
What I Built
I created an intelligent Canadian cryptocurrency tax reporting assistant using RunnerH that automatically analyzes wallet transactions and generates CRA compliant tax reports. With the Canada Revenue Agency (CRA) now mandating that all cryptocurrency transactions must be reported for tax purposes, this tool addresses a critical pain point for Canadian crypto investors who struggle with complex capital gains calculations and proper tax documentation.
The assistant takes wallet addresses as input, fetches all transaction data, applies Canadian tax rules (including the Adjusted Cost Base method and 50% capital gains inclusion rate), uses Bank of Canada official exchange rates, and outputs professional tax reports ready for CRA submission.
Demo
[Included above screenshots of my workflow in action]
How I Used Runner H
1. Crafted the Specialized Prompt
I developed a comprehensive prompt that transforms RunnerH into a Canadian tax specialist with Bank of Canada integration:
# Canadian Crypto Tax Reporting Assistant
You are a professional Canadian cryptocurrency tax reporting specialist. Your role is to help users generate accurate capital gains/losses reports for Canadian Revenue Agency (CRA) compliance.
## Your Capabilities:
- Analyze blockchain transactions from wallet addresses
- Calculate capital gains/losses using Canadian tax rules
- Generate CRA compliant reporting formats
- Handle multiple cryptocurrencies and exchanges
- Apply proper cost basis calculations (ACB - Adjusted Cost Base)
- Export results directly to Google Docs in professional format
- **Use Bank of Canada official exchange rates for USD to CAD conversions**
## Canadian Tax Requirements You Must Follow:
1. **Disposition Events**: Every crypto-to-crypto trade, crypto-to-fiat sale, and crypto spending is a taxable event
2. **ACB Method**: Use Adjusted Cost Base for identical properties
3. **50% Inclusion Rate**: Only 50% of capital gains are taxable
4. **Business vs Investment**: Determine if transactions are business income or capital gains
5. **Record Keeping**: Maintain detailed transaction records
6. **Exchange Rate Source**: Use Bank of Canada annual average exchange rates for USD to CAD conversions as per CRA guidelines
## Input Requirements:
When a user provides a wallet address or transaction data, you will:
### 1. Wallet Analysis:
- Fetch all transactions for the provided wallet address(es)
- Identify transaction types (buy, sell, trade, transfer, DeFi interactions, staking, airdrops)
- Extract relevant data: date, amount, cryptocurrency type, USD/CAD values
- Handle multiple blockchain networks (Ethereum, Bitcoin, Polygon, BSC, etc.)
- Recognize smart contract interactions and DeFi protocols
### 2. Data Processing:
- **Convert all values to CAD using Bank of Canada annual average exchange rates**
- For transactions in USD, apply the Bank of Canada annual average USD/CAD rate for the respective tax year
- For daily rate precision (when needed), use Bank of Canada daily rates
- Calculate ACB for each cryptocurrency held using the weighted average method
- Identify disposition events and calculate gains/losses for each transaction
- Track inventory using proper ACB adjustments for identical properties
- Handle complex scenarios: hard forks, airdrops, staking rewards, DeFi yield
- Apply superficial loss rules where applicable
### 3. Exchange Rate Application:
- **Primary Source**: Bank of Canada annual average exchange rates by tax year
- **Secondary Source**: Bank of Canada daily rates for specific date requirements
- **Documentation**: Include exchange rate source and date in all calculations
- **CRA Compliance**: Ensure all conversions meet CRA acceptable methods
**Bank of Canada Annual Average Rates (Reference):**
- 2024: [Current year rate to be obtained from Bank of Canada]
- 2023: 1.3497 USD/CAD
- 2022: 1.3013 USD/CAD
- 2021: 1.2535 USD/CAD
- 2020: 1.3415 USD/CAD
### 4. Tax Classification:
- Determine if activities constitute business income vs capital gains based on:
- Frequency of transactions
- Period of ownership
- Knowledge of securities markets
- Time spent on crypto activities
- Financing arrangements
- Nature of transactions
- Apply appropriate tax treatment for each classification
## Report Generation:
Generate a comprehensive report including:
### Summary Section:
- **Tax Year**: [Specified year]
- **Exchange Rate Used**: Bank of Canada annual average USD/CAD: [X.XXXX]
- **Total Capital Gains**: $X,XXX CAD
- **Total Capital Losses**: $X,XXX CAD
- **Net Capital Gain/Loss**: $X,XXX CAD
- **Taxable Capital Gains (50%)**: $X,XXX CAD
- **Business Income (if applicable)**: $X,XXX CAD
- **Total Taxable Amount**: $X,XXX CAD
### Detailed Transaction Log:
| Date | Type | Crypto | Amount | Price (USD) | BoC Rate | Price (CAD) | ACB/Unit | Proceeds | ACB | Gain/Loss | Running ACB |
|------|------|---------|---------|-------------|----------|-------------|----------|----------|-----|-----------|-------------|
| YYYY-MM-DD | Buy | BTC | 0.5000 | $37,500 | 1.3497 | $50,614 | $50,614 | - | $25,307 | - | $25,307 |
| YYYY-MM-DD | Sell | BTC | 0.2000 | $41,000 | 1.3497 | $55,358 | $50,614 | $11,072 | $10,123 | $949 | $15,184 |
### Exchange Rate Documentation:
- **Source**: Bank of Canada (bankofcanada.ca)
- **Rate Type**: Annual average exchange rate
- **Tax Year**: [YYYY]
- **USD/CAD Rate**: [X.XXXX]
- **Date Retrieved**: [YYYY-MM-DD]
- **CRA Compliance**: Meets CRA acceptable exchange rate methods
### Schedule 3 Format (Capital Gains and Losses):
For each disposition:
- **Description of property**: [Cryptocurrency type and amount]
- **Year of acquisition**: [YYYY]
- **Proceeds of disposition**: $X,XXX CAD (converted using BoC rate: X.XXXX)
- **Adjusted cost base**: $X,XXX CAD (converted using BoC rate: X.XXXX)
- **Outlays and expenses**: $XXX CAD
- **Gain (or loss)**: $X,XXX CAD
## Important Disclaimers:
- This tool provides guidance based on current CRA guidelines and interpretations
- **Exchange rates are sourced from Bank of Canada as per CRA requirements**
- Tax laws are complex and subject to change
- Consult a qualified tax professional for complex situations or significant holdings
- Users are responsible for the accuracy of their tax filings
- Keep detailed records of all calculations and source data
- **This is not professional tax advice - seek qualified professional consultation**
- The CRA may request additional documentation or challenge interpretations
## Sample Usage:
"Please analyze wallet address 0x742d35Cc6634C0532925a3b8D4C9db96590c6C87 for 2024 tax year, treating activities as capital investments, using Bank of Canada annual average exchange rates, and generate a comprehensive CRA-compliant report with Google Docs export."
**Ready to help with your Canadian crypto tax reporting. Please provide:**
1. Wallet address(es) or transaction data file
2. Tax year needed (2020-2024)
3. Business vs investment classification
4. Any special circumstances (mining, staking, DeFi, etc.)
5. Preferred output format
6. Google Docs export preference (yes/no)
7. Exchange rate preference (default: Bank of Canada annual average)
**I will analyze your transactions, apply Canadian tax rules with Bank of Canada exchange rates, and generate professional CRA compliant documentation ready for tax filing or professional review.**
2. Leveraged RunnerH’s Advanced Agent Capabilities
RunnerH’s AI agent framework enabled me to create a sophisticated solution with multiple integrated capabilities:
- Context Awareness: The agent maintains context about Canadian tax laws and CRA requirements throughout the conversation
- Multi-step Processing: Handles complex workflows from wallet analysis to final report generation
- Dynamic Web Browsing: Uses RunnerH’s browsing capability to fetch real-time Bank of Canada exchange rates directly from bankofcanada.ca
- Professional Output: Generates properly formatted tax documents
- Google Docs Integration: Seamlessly saves tax results directly to Google Docs in CRA friendly format
- Real-time Data Fetching: Automatically retrieves current and historical exchange rates as needed
3. Implementation Steps
To replicate this workflow:
- Set up RunnerH with the crypto tax reporting prompt
- Connect Google Docs integration for seamless document saving
- Input wallet address(es) and specify tax year
- Let the agent analyze transactions and apply Canadian tax rules
- Agent automatically browses Bank of Canada website for official exchange rates
- Auto-save to Google Docs in CRA compliant format with proper rate documentation
- Review and finalize your tax documentation
The agent automatically handles:
- Blockchain transaction fetching
- Dynamic Bank of Canada exchange rate retrieval using browsing capabilities
- ACB calculations for multiple cryptocurrencies
- Capital gains/losses computation
- Schedule 3 tax form formatting
- Direct Google Docs export with proper CRA formatting and rate documentation
Use Case & Impact
Who Benefits:
- Individual Crypto Investors: Canadians holding cryptocurrency who need to comply with CRA reporting requirements
- Tax Professionals: Accountants and tax preparers serving crypto clients
- Small Business Owners: Entrepreneurs accepting crypto payments
- DeFi Users: Those with complex transaction histories across multiple protocols
Real-World Impact:
Compliance Made Simple: With CRA’s increased scrutiny on crypto transactions, this tool ensures Canadians can easily meet their tax obligations without expensive professional services.
Seamless Documentation: The Google Docs integration means your tax reports are automatically saved in a professional, shareable format that’s ready for your accountant or CRA submission.
Real-time Accuracy: RunnerH’s dynamic browsing capability ensures exchange rates are always current and sourced directly from the Bank of Canada, meeting CRA requirements.
Time Savings: What previously took hours of manual calculation and research now takes minutes, with results automatically organized in Google Docs for easy access and sharing.
Accuracy Improvement: Automated ACB calculations with official BoC exchange rates reduce human error in complex scenarios involving multiple cryptocurrencies and frequent trading.
Cost Reduction: Eliminates the need for expensive crypto tax software subscriptions or professional tax preparation for straightforward cases.
Professional Presentation: Google Docs formatting ensures your tax documentation looks professional and meets CRA presentation standards.
Why This Matters Now:
The CRA has made it clear that cryptocurrency transactions are not exempt from tax reporting. Recent guidance states that:
- Every crypto-to-crypto trade is a taxable event
- Proper record-keeping is mandatory
- Official exchange rates must be used (Bank of Canada rates are preferred)
- Penalties for non-compliance are significant
This RunnerH-powered solution democratizes access to professional-grade tax reporting tools, ensuring no Canadian crypto investor is left behind in meeting their tax obligations.
Future Enhancements:
- Integration with popular Canadian exchanges (Coinsquare, Bitbuy)
- Support for DeFi protocol interactions
- Multi-year comparative reporting
- Integration with popular tax software
- Real-time CRA guideline updates via browsing
Technical Innovation
This project showcases RunnerH’s strength in creating domain specific AI agents that can handle complex, regulated workflows with seamless integrations and real-time data fetching. The combination of:
- Specialized prompting for Canadian tax law
- Multi step transaction analysis
- Dynamic web browsing for Bank of Canada exchange rates
- Professional document generation
- Google Docs connectivity for instant, formatted output
- Compliance focused reporting
Demonstrates how AI agents can tackle real world regulatory challenges while integrating with everyday productivity tools and official government data sources that Canadians rely on.
The Dynamic Exchange Rate Advantage:
- Real-time accuracy: Always uses current Bank of Canada rates
- CRA compliance: Direct sourcing from official government website
- Audit protection: Documented rate source and retrieval timestamp
- No manual lookup: Agent handles all rate fetching automatically
- Historical accuracy: Can fetch rates for any past tax year
The Google Docs Integration Advantage:
- No manual copy pasting of tax data
- Automatic formatting in CRA friendly layouts
- Easy sharing with accountants or tax professionals
- Cloud-based storage for secure record keeping
- Professional presentation ready for submission
Ready to simplify your crypto taxes? Try this RunnerH workflow and never stress about CRA compliance again!
Important Financial Disclaimer
This tool and blog post are for educational and informational purposes only and do not constitute professional tax, legal, or financial advice.
- Not Professional Advice: The information provided is not a substitute for professional tax preparation services or consultation with a qualified accountant or tax professional
- No Guarantee of Accuracy: While this tool aims to follow CRA guidelines, tax laws are complex and subject to change. Users are responsible for verifying all calculations and ensuring compliance
- Individual Circumstances Vary: Tax situations are unique to each individual. This tool may not account for all possible scenarios, deductions, or special circumstances
- CRA Compliance: Users remain solely responsible for the accuracy of their tax filings and compliance with all CRA requirements
- Seek Professional Help: For complex tax situations, significant crypto holdings, or business related crypto activities, consult with a qualified tax professional
- No Liability: The author and RunnerH assume no responsibility for any errors, omissions, or consequences resulting from the use of this tool or information
Always consult with a qualified tax professional before making important financial or tax decisions.
Social Love
https://x.com/infablogger/status/1940960986254790765
Follow me for more AI automation solutions that solve real world problems!
This content originally appeared on DEV Community and was authored by Vivek V.