Skip to content

Payal2000/agentic-finance-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Agentic Finance Assistant

AI agent for Stripe payment operations with human-in-the-loop approval for refunds.

Features

  • Subscription status — check plan, billing cycle, and next payment
  • Refund processing — eligibility check + mandatory human approval gate
  • Invoice summaries — line items, taxes, discounts, payment status
  • Anomaly detection — flags high-amount charges, velocity abuse, disputes

Architecture

frontend (React + Vite)  →  backend (FastAPI)  →  Claude claude-opus-4-6
                                                        ↓ tool calls
                                                   Stripe API
                                                        ↓
                                               PostgreSQL (conversation state)

Human-in-the-loop: process_refund is an approval-gated tool. The agent pauses the agentic loop and emits an approval_required event. The UI shows Approve/Cancel buttons. Only on approval does the refund execute.

Quick Start

Backend

cd backend
cp ../.env.example ../.env  # fill in your keys
pip install -r requirements.txt
# create the database
createdb finance_agent
uvicorn main:app --reload

Frontend

cd frontend
npm install
npm run dev

Open http://localhost:3000

Stripe Webhooks (local dev)

stripe listen --forward-to localhost:8000/webhook/stripe

Example Prompts

  • Check subscription for cus_abc123
  • Is charge ch_xyz789 eligible for a refund?
  • Process a full refund for ch_xyz789 → agent checks eligibility → asks approval
  • Summarize invoice in_def456
  • Flag any anomalies for customer cus_abc123 in the last 60 days

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors