Skip to content

feat: add AI Fraud Investigation Agent#570

Merged
Shubhamsaboo merged 10 commits intoShubhamsaboo:mainfrom
oso95:add-ai-fraud-investigation-agent
Mar 17, 2026
Merged

feat: add AI Fraud Investigation Agent#570
Shubhamsaboo merged 10 commits intoShubhamsaboo:mainfrom
oso95:add-ai-fraud-investigation-agent

Conversation

@oso95
Copy link
Copy Markdown
Contributor

@oso95 oso95 commented Mar 8, 2026

Summary

  • Adds advanced_ai_agents/single_agent_apps/ai_fraud_investigation_agent/ — a single-agent Streamlit app
  • Investigates licensed childcare providers by ZIP code using only public data: Illinois DCFS licensing, Cook County property records, Google Street View/Places, and IL Secretary of State business registration
  • First autonomous physical-evidence investigation agent in this repo
  • Built on Surelock Homes

What it does

  1. Queries Illinois DCFS for all active licensed childcare providers in a ZIP code
  2. Pulls building square footage from Cook County Assessor open data
  3. Calculates maximum legal child capacity from IL building code math: (sqft × 0.65) ÷ 35
  4. Captures Google Street View images to visually verify the address
  5. Checks Google Places for current business status and reviews
  6. Verifies entity registration with Illinois Secretary of State
  7. Narrates the full investigation in real time — reasoning is visible as it works

A 900 sq ft building cannot legally serve 50 children. This agent finds those mathematical impossibilities automatically.

Tech stack

  • Framework: agno
  • LLM: OpenRouter (supports Claude, GPT, Gemini)
  • UI: Streamlit with streaming narration
  • Data: All public APIs, no auth required for property/DCFS data

Test plan

  • Install dependencies: pip install -r requirements.txt
  • Run: streamlit run fraud_investigation_agent.py
  • Enter an OpenRouter API key in the sidebar
  • Select a ZIP code (e.g. 60623) and click Investigate
  • Verify streaming narration appears and agent investigates providers

oso95 added 8 commits March 8, 2026 14:11
Autonomous fraud investigation agent that cross-references childcare
provider licensing records against physical building data to detect
anomalies. Uses public data: Illinois DCFS licensing, Cook County
property records, Google Maps (Street View + Places), and IL Secretary
of State business registration.

Built on Surelock Homes (https://github.com/osobodev/Surelock-Homes).
- Fix NameError: replace _config dict write with st.session_state write
- Fix streaming: use getattr(chunk, 'content', None) for safe chunk access
- Fix streaming: use list+join instead of string concat in hot loop
- Fix model IDs: use correct OpenRouter format (anthropic/claude-sonnet-4.6)
- Remove unused Any import
- Fix stale date: _build_system_prompt() computes date per investigation
- Fix Street View: store images in session state, return metadata-only to LLM
- Display Street View images in Streamlit UI after investigation
- Remove dead search_type param from check_business_registration
- Remove invalid show_tool_calls Agent param
- Replace hard ZIP limit of 10 with MAX_PROVIDER_CAP=100 safety cap
- Switch ZIP input from free text to selectbox (10 Cook County neighborhoods)
- Add new models: google/gemini-3.1-flash-lite-preview, openai/gpt-5.4
- Fix repo links: osobodev -> oso95
- Update README geographic scope with ZIP/neighborhood table
- Default ZIP changed to 60623 (Little Village)
Copy link
Copy Markdown
Owner

@Shubhamsaboo Shubhamsaboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor change and the PR will be good to merge.

Removed reference to Surelock Homes from the README.
@oso95
Copy link
Copy Markdown
Contributor Author

oso95 commented Mar 12, 2026

Minor change and the PR will be good to merge.

Requested change has been made.

Copy link
Copy Markdown
Owner

@Shubhamsaboo Shubhamsaboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more thing to fix sorry.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add specific versioning of these dependencies

@Shubhamsaboo Shubhamsaboo merged commit 18337eb into Shubhamsaboo:main Mar 17, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants