Skip to content

jack-cap/auto-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Auto Manager

Disclaimer: This is a proof-of-concept and undergoing further development. This is far from a complete product. Use it with caution. We do not hold accountable to any data loss or inaccuracy.

Trust the System, Not the Prediction.

Privacy-preserving AI bookkeeping automation using local LLMs. Process receipts and invoices without sending your financial data to the cloud.

License: MIT Paper

Why Auto Manager?

Cloud AI services like GPT-5.2 and Claude are powerful, but they require sending your sensitive financial data to third-party servers. For businesses handling confidential ledgers, this creates unacceptable privacy and compliance risks (GDPR, EU AI Act).

Auto Manager runs entirely on your hardware. Your invoices, receipts, and general ledger never leave your infrastructure.

Key Features

  • πŸ”’ 100% Local Inference - All AI processing happens on your machine via LMStudio/Ollama
  • πŸ“„ Document Processing - Upload receipts/invoices, AI extracts and categorizes automatically
  • πŸ€– Multi-Agent Architecture - Specialized agents for different accounting tasks
  • βœ… Validation Layer - Pydantic schemas catch errors before they hit your ledger
  • πŸ”— Manager.io Integration - Direct API integration with self-hosted Manager.io

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         SUPERVISOR                              β”‚
β”‚  Routes requests to specialized agents based on intent          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                     β–Ό                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    DIRECT     β”‚   β”‚     DATA      β”‚   β”‚    REPORT     β”‚
β”‚  Simple Q&A   β”‚   β”‚  Master data  β”‚   β”‚  Financials   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
        
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                     β–Ό                     β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  TRANSACTION  β”‚   β”‚   INVENTORY   β”‚   β”‚  INVESTMENT   β”‚
β”‚  Query txns   β”‚   β”‚  Stock mgmt   β”‚   β”‚  Portfolio    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β–Ό                                           β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   DOCUMENT    β”‚                         β”‚      ENTRY     β”‚
β”‚  OCR/classify β”‚                         β”‚ Create entries β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                         β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The system uses a Supervisor-Worker pattern built on LangGraph. Each agent has focused tools for its domain, preventing context pollution and improving reliability.

Tech Stack

Layer Technology
Frontend Next.js 14+, TypeScript, Tailwind CSS
Backend FastAPI, Python 3.11+
Orchestration LangGraph
Inference LMStudio / Ollama (GLM 4.7 Flash recommended)
OCR Chandra vision model
Validation Pydantic
Accounting Manager.io (self-hosted)

Quick Start

Prerequisites

Installation

  1. Clone and configure

    git clone https://github.com/jack-cap/auto-manager.git
    cd auto-manager
    cp .env.example .env
    # Edit .env with your Manager.io API credentials
  2. Start with Docker (recommended)

    ./docker-manage.sh up

    Or manually:

    # Backend
    cd backend && python -m venv venv && source venv/bin/activate
    pip install -r requirements.txt
    uvicorn app.main:app --reload
    
    # Frontend (new terminal)
    cd frontend && npm install && npm run dev
  3. Configure LMStudio

    • Load zai-org/glm-4.7-flash model
    • Start local server on port 1234
    • Load chandra model for OCR
  4. Access the app

Usage

  1. Upload a document - Click the paperclip icon in chat to upload a receipt or invoice
  2. Give instructions - "Book this as a travel expense for John" or "Create a purchase invoice"
  3. Review and confirm - The AI extracts details, looks up accounts, and creates the entry
  4. Check Manager.io - Entry appears in your accounting software

Example Interaction

User: "I have a receipt from Uber for $45.50 on January 15, paid by the director"

Agent Flow:
1. search_employee("director") β†’ Gets UUID
2. search_account("transportation") β†’ Finds "Local taxi or uber" account
3. create_expense_claim(payer=UUID, account=UUID, amount=45.50)

Response: "Created expense claim for $45.50 (Uber) charged to Local taxi or uber,
           reimbursable to John Director."

Configuration

# LLM Settings
DEFAULT_LLM_PROVIDER=lmstudio
DEFAULT_LLM_MODEL=zai-org/glm-4.7-flash
LMSTUDIO_URL=http://localhost:1234/v1

# Manager.io
MANAGER_API_URL=https://your-manager-instance/api2
MANAGER_API_KEY=your-api-key

# OCR
OCR_MODEL=chandra

Documentation

How It Works

The "Trust the System" Philosophy

LLMs are probabilisticβ€”they make mistakes. Instead of hoping the model gets it right, we build guardrails:

  1. Sequential Tool Execution - One tool call at a time, wait for result, then proceed (prevents hallucinated UUIDs)
  2. Mandatory Lookups - Agent must search for employee/account UUIDs before creating entries
  3. Pydantic Validation - All payloads validated against strict schemas before API calls
  4. Loop Detection - Terminates if same tool called repeatedly (prevents infinite loops)

Why Local LLMs Work

Modern Small Language Models (SLMs) like GLM 4.7 Flash can handle complex reasoning when properly constrained. The key insights:

  • Constrained action space - Focused tools per agent reduces confusion
  • Semantic matching - LLM chooses accounts from full Chart of Accounts (handles "audit fee" β‰ˆ "professional fees")
  • Quantization - 8-bit inference enables running on consumer hardware (24GB+ RAM recommended)

Limitations

  • Requires 24GB+ RAM for optimal performance
  • Tightly coupled to Manager.io API structure
  • Local LLMs process one tool call at a time (slower than cloud)
  • Not tested for production workloadsβ€”use at your own risk

Contributing

Contributions welcome! Areas of interest:

  • Bank reconciliation automation
  • Additional accounting software integrations
  • Performance benchmarking vs cloud LLMs
  • Test coverage improvements

License

MIT License - see LICENSE

Acknowledgments

This project builds on excellent open-source work:

Disclaimer

This project is an independent, open-source implementation. It is not affiliated with, endorsed by, or connected to Manager.io. "Manager.io" is a trademark of its respective owner. Users are responsible for ensuring compliance with Manager.io's terms of service.


Author: Chun Kit, NG
Repository: https://github.com/jack-cap/auto-manager

About

AI-powered bookkeeping automation for Manager.io using LangGraph agents, FastAPI, and Next.js.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors