What ALdia does
ALdia gives AI agents a controlled vocabulary for business operations rather than database access. Its MCP tools cover customer lookup and balances, invoices, payments, vendor payments, expenses, inventory, checks, cash, debtors, and audit records. The web console remains the supervision point: the assistant interprets a request, ALdia validates and executes it, and a user can review what happened in the browser.
Invoice creation and invoice confirmation are separate operations. Creating an invoice produces a draft without stock or debt effects; confirmation represents the reviewed commercial operation. Fiscal authorization is disabled from MCP by default and requires administrative review, including a one-time code sent to the responsible person when enabled for the commercial pilot.
ALdia is designed for self-hosted business use. It stores monetary values as integer cents, applies commercial rounding explicitly, allocates invoice numbers from a sequence table, and supports country packs. Argentina support includes CUIT, VAT, ARCA authorization, ARS, and local payment methods. The United States pack covers EIN, sales tax, USD, ACH, and additional vendor records.
How it works
The MCP layer communicates with the same HTTP API used by the browser application. Writes therefore pass through the application’s normal validation, transaction, and audit path; the MCP server does not write to the database directly. A local installation consists of one Python process and one SQLite file. Other terminals can reach it over the local network when the host is configured to listen beyond the local machine.
Requests can carry an X-Operation-Id. ALdia reserves this identifier before execution, preventing concurrent retries from applying the same operation twice. Errors include a stable code, the parameters involved, and an action selected from reintentar, corregir, preguntar, or abortar. The published error catalogue is available at GET /api/errores without authentication.
Permissions combine the service account with the identity of the person represented by the agent. Acting on another person’s behalf must be explicitly granted by an administrator. Ambiguous operations can be stored with their original details and confirmed after clarification, avoiding an accidental rebuild of the request.
Every write, including rejected attempts, is recorded by middleware in a separate audit schema. The audit records cannot be edited or deleted through an endpoint. Daily startup backups use SQLite’s backup API, retain the last seven copies, and run an integrity check on each copy.
Setup and configuration
ALdia requires Python 3.10 or newer and runs on Windows, Linux, and macOS. Clone the repository, then use ./instalar.sh and ./iniciar_web.sh on Linux or macOS. On Windows, run instalar.bat followed by iniciar_web.bat. A production installation can use the locked dependency file through ./instalar.sh --lock or the equivalent Windows pip command.
After startup, open http://localhost:8000. The first launch creates an admin user, prints a randomly generated password in the console, and keeps that password in the backend environment. By default, the service listens only on the local computer. Set ALDIA_HOST=0.0.0.0 when other terminals on the local network need access.
The country configuration selects identifier validation, tax behavior, currency, payment methods, and whether documents require agency authorization. GET /api/config/pais also exposes country-specific warnings for agents.
Tools and capabilities
The MCP tool set includes operations for:
- Finding customers, products, debtors, and customer balances
- Creating and confirming invoice drafts
- Recording customer payments, vendor payments, and expenses
- Checking inventory and listing checks held in the portfolio
- Working with cash and country-specific payment methods
- Reading the audit log and published structured error information
- Executing operations with permission checks and idempotency controls
Limitations and notes
The United States sales-tax implementation applies one entered rate to everything. It does not determine jurisdiction, apply sourcing rules, calculate economic nexus, handle exempt categories, or manage resale certificates. A tax-provider interface exists, but no provider integration ships with ALdia.
The business controls are tested but do not constitute fiscal or production certification. Fiscal emission is off by default from MCP and is subject to explicit commercial confirmation and administrative review. The application is offline-first and does not load assets from a CDN, but any external agency authorization workflow still depends on the relevant country configuration and service requirements.