Skip to content
0xshinobiiPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CA Agent — AI Compliance Assistant for Indian CA Firms

An AI agent that executes compliance workflows for Chartered Accountant firms:

  • 206AB Compliance Check — Bulk PAN verification via IT Portal
  • MCA Company Lookup — Company master data from MCA21
  • India Post Tracking — Consignment delivery status

Architecture

frontend (React + Vite + Tailwind)  →  FastAPI backend  →  LLM (Groq/Claude)
                                              ↓
                                     Skill executor (Playwright + openpyxl)
                                              ↓
                                     SQLite (dev) / PostgreSQL (prod)

Prerequisites

  • Python 3.12+
  • Node.js 18+
  • Redis (for Celery; optional in dev)
  • uv (recommended): curl -LsSf https://astral.sh/uv/install.sh | sh

Setup

Backend

cd backend

# Create virtualenv and install deps
uv venv .venv
source .venv/bin/activate
uv pip install -r requirements.txt

# Install Playwright browsers
playwright install chromium

# Copy and configure environment
cp .env.example .env   # edit GROQ_API_KEY or ANTHROPIC_API_KEY

# Run dev server
uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload

Frontend

cd frontend
npm install
npm run dev

Open http://localhost:5173

Environment Variables

Variable Default Description
LLM_PROVIDER groq groq or claude
GROQ_API_KEY — Groq API key (get from console.groq.com)
ANTHROPIC_API_KEY — Anthropic API key (for claude provider)
DATABASE_URL sqlite+aiosqlite:///./ca_agent.db SQLAlchemy async URL
REDIS_URL redis://localhost:6379 Redis for Celery task queue
UPLOAD_DIR /tmp/ca_agent_uploads File storage path
PLAYWRIGHT_HEADLESS true Run browser headless

Running Tests

cd backend
source .venv/bin/activate
python -m pytest tests/ -v

Docker (full stack)

# Copy and configure .env
cp backend/.env.example backend/.env
# Fill in API keys

docker-compose up --build

Services:

Running Celery Worker (for async 206AB tasks)

cd backend
celery -A app.skills.celery_tasks.celery_app worker --loglevel=info

Usage

  1. Open http://localhost:5173
  2. Drag and drop an Excel file with PAN numbers in chat
  3. Ask: "Check 206AB compliance for all vendors"
  4. Agent will run the check and return a downloadable result Excel

Project Structure

ca-agent/
├── backend/
│   ├── app/
│   │   ├── core/        # config, db, llm client
│   │   ├── models/      # SQLAlchemy models
│   │   ├── agent/       # LLM router + tool definitions
│   │   ├── api/         # FastAPI endpoints
│   │   └── skills/      # Skill executors + Playwright automation
│   ├── tests/
│   └── requirements.txt
├── frontend/
│   └── src/
│       ├── components/  # React components
│       ├── api.ts        # API client
│       ├── store.ts      # Zustand state
│       └── types.ts      # TypeScript interfaces
└── docker-compose.yml

Notes

  • Local dev: Uses SQLite (no PostgreSQL needed)
  • Playwright: Requires --no-sandbox flag (set in it_portal.py) for VPS/AppArmor
  • Credentials: CA firm's TAN/ITDREIN credentials are never stored — injected per-session
  • LLM routing: Groq (llama-3.3-70b-versatile) by default for cost efficiency; switch to Claude for production

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages