Recon Agent — Multi-Tenant SaaS
AI-powered financial reconciliation as a multi-tenant SaaS.
Architecture
- Frontend: Next.js 16 + Clerk auth (App Router)
- Backend API: FastAPI (Python)
- Core Engine: Pure Python reconciliation logic (
core/) - Database: Supabase PostgreSQL with RLS
- Storage: Supabase Storage (CSV/XLSX files)
The architecture flows strictly as:
Web → FastAPI API → Core Engine → Database
Quick Start
1. Backend (FastAPI)
cd /home/abhishek/PROJECTS/recon-agent
.venv/bin/python -m uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload
Health check: curl http://localhost:8000/health
2. Frontend (Next.js)
cd /home/abhishek/PROJECTS/recon-agent/web
npm run dev
Command Line Interface (CLI)
Recon Agent includes a powerful CLI that acts as a first-class client to the FastAPI backend. It allows you to automate reconciliations, view history, export reports, and generate AI explanations straight from the terminal.
Installation
Install locally via pip or uv:
pip install -e .
# or
uv pip install -e .
This makes the recon command globally available.
recon --help
Usage
- Login: Generate a Personal Access Token in the Web UI, then run:
recon login - Reconcile:
recon reconcile source.csv target.csv
- History:
recon history
- Machine Readable output:
recon history --json
Documentation
- Docs Directory
- Phase 1: Feature 1–7 Audit
- Phase 2: Platform Foundations
- Phase 3: API Authentication
- Phase 4: CLI Documentation
- Phase 5: Tiers and Roles
Development
uv sync
Create .env (root) and web/.env.local with these values.
Root .env
SUPABASE_URL=https://<project-ref>.supabase.co
SUPABASE_SERVICE_KEY=<service_role JWT> # NOT the publishable key!
CLERK_SECRET_KEY=sk_test_...
CLERK_ISSUER=https://<your-app>.clerk.accounts.dev
ENCRYPTION_KEY=<base64 32 bytes>
web/.env.local
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
Database Setup
Run the SQL in api/migrations/001_initial_schema.sql in the Supabase SQL editor.
This creates the tables and enables RLS policies.
How multi-tenancy works
- User signs in with Clerk (organizations enabled)
- Clerk JWT is sent on every API request
- Backend extracts
clerk_org_idfrom JWT - Each DB query is scoped to that org — RLS enforces isolation as a backstop
See api/migrations/001_initial_schema.sql to 005_usage_quotas.sql for the full schema.
Metadata
Release files for recon-agent 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| recon_agent-0.1.6.tar.gz | 10.9 kB | Without provenance | Details for recon_agent-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| recon_agent-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for recon_agent-0.1.6-py3-none-any.whl |
Total release size: 25.8 kB
Release files / recon_agent-0.1.6.tar.gz
| Download URL | recon_agent-0.1.6.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
efd4f2acd7a0117be2a86efc0f282aa7305638b6ad32bf26fde6ad62df42139a
|
|
BLAKE2b-256 checksum How to use checksums |
65acc20023d539b82d02bf561a05730a3ee520a03d802f04badf7a970cc371ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Omarchy","version":"4.0.0","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / recon_agent-0.1.6-py3-none-any.whl
| Download URL | recon_agent-0.1.6-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26ca0fa2c4d50231e47ac31b05255ea0d53d34fc4ebd11fbd692094619108ec3
|
|
BLAKE2b-256 checksum How to use checksums |
9d88f3d275f18d7e2aba0658f5a70ac94c7caff8625e72c5bcbc6657e859f5b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.20 {"installer":{"name":"uv","version":"0.11.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Omarchy","version":"4.0.0","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for recon-agent 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.