Inspiration
Traditional personal finance apps fall into two extremes: passive dashboards of raw transaction noise that nobody reviews, or active budgeting tools that demand tedious daily manual classification. Yet, almost every modern bank sends email notification alerts for every swipe and transfer. We built PocketSense to bridge this gap: turning existing email noise into a silent, autonomous financial co-pilot that requires zero manual maintenance.
What it does
PocketSense runs as an autonomous agent pipeline (powered by the Strands Agents SDK and Amazon Bedrock / Claude Sonnet):
- Mock/Local Ingestion: Parses flat-file bank notification emails (supporting multi-currency normalization for Rs, PKR, and ₨).
- Persistent Categorization: Categorizes merchants via LLM reasoning with local JSON memory caching (
merchant_categories.json). - Smart "Ask-Once" Masked Transfers: Tracks repeat masked transfers (e.g.,
A*** K***), flags them for user input when recurring thresholds hit, and remembers confirmed labels viaanswer_transfer.py. - 4-Type Anomaly Detection: Flags category spend surges (2x trailing 4-week average), duplicate/close-proximity charges, unusual single-transaction spikes (3x historical average), and end-of-month projected overspends (>1.2x pacing against prior full months, with refund/reversal netting).
- Self-Contained Digest: Generates structured HTML weekly digests sent via Gmail SMTP and saved locally to
memory/last_digest.html.
How we built it
- Orchestration: Strands Agents SDK workflow wrapping modular
@toolfunctions (parser,categorizer,transfer_handler,anomaly_detector,digest). - Model Provider: Amazon Bedrock (
us-east-1) running Claude Sonnet via environment-driven credentials. - State Storage: File-based local JSON memory (
memory/transactions.json,merchant_categories.json,known_transfers.json) avoiding external database bloat. - IDE / Workflow: Built using Antigravity IDE with repeatable agent execution rules (
.agent/rules/project.md) and/run_and_checkpipelines.
Challenges we faced
- Normalized Multi-Currency & Variant Strings: Parsing inconsistent currency symbols (
Rs.,PKR,₨) and messy date/amount layouts required robust regex and normalization layers. - Masked Recipient Ambiguity: Balancing privacy/masking (asterisks) with meaningful budgeting required an interactive "ask-once" feedback loop (
needs_inputstate tracking upgrading toconfirmed). - False-Positive Noise in Repeat Merchants: Tuning duplicate detection so normal high-frequency visits (like daily coffee shops) aren't flagged as anomalies while real duplicate swipes are caught.
What we learned
Silent background agents working over structured local artifacts outperform heavy multi-service UI wrappers for everyday utility tasks. Cold-start friction drops dramatically when agent memory persists local feedback deterministically.
Limitations
- Email-Dependent Pipeline: The current parser requires bank notification emails to operate and is currently tailored to a single bank's formatting template for this demo.
- Masked Transfer Ambiguity: Fund transfers frequently mask recipient names (e.g.,
A*** K***). While our "ask-once" loop handles this, the system requires cold-start manual labeling for the first occurrence of each unique masked string. - Cold Start Period for Anomalies: The anomaly detection engine requires historical data. Specifically, the category spend surge alert needs a rolling 4-week history to establish an accurate baseline and avoid false positives.
- No Live Inbox Connection: For security and demonstration simplicity, the current prototype reads plain-text files from a local
/mock_inboxfolder rather than polling a live Gmail API.
What's Next
- Amazon Bedrock AgentCore Deployment: Transitioning the local agent orchestration to Amazon Bedrock AgentCore Runtime for secure, serverless execution, dedicated microVM session isolation, and reliable scaling.
- Live Email Integration: Replacing the local file ingestion with secure OAuth integrations to automatically poll unread banking alerts in real time.
- Multi-Bank Parser Engine: Upgrading the text parsing logic with fallback regular expressions to support various notification templates from different financial institutions.
- Conversational Interface: Building an interactive chat layer (via Telegram or WhatsApp) allowing users to query their spending history (e.g., "How much did I spend on food this week compared to last?") rather than relying exclusively on passive weekly digests.
Built With
- amazon-bedrock
- anomaly-detection
- antigravity
- boto3
- claude-sonnet
- email-parsing
- fintech
- hackathon2026
- json-memory
- json-storage
- llm-agent
- pakistan
- personal-finance
- python
- regex
- smtplib
- strands-agents-sdk
Log in or sign up for Devpost to join the conversation.