MentaAgent: A Self-Hosted AI Business Analyst with Source-Linked Answers
Summary
MentaAgent is an Apache 2.0 project that runs an AI business analyst on a user’s computer. It accepts spreadsheets, contracts, PDFs, Word files, emails, plain text, and photos through a vision model, then parses, summarizes, chunks, and optionally embeds them for search. Its agent investigates the uploaded data with search, reading, aggregation, and calculation tools, and ends answers by naming the files used. A knowledge graph links people, customers, vendors, products, and contracts across documents; bounded memory stores business facts, owner preferences, advisor notes, and open loops. The application can also propose approved markdown playbooks, generate weekly or monthly reports, and monitor changes for alerts. It is distributed through Docker Compose with a Next.js web app, Fastify API, Postgres with pgvector, Redis, and a background worker. Users choose a provider and model through the settings page, including OpenAI-compatible services, DeepSeek, Anthropic, Gemini, OpenRouter, Ollama, Mistral, and others; the chat model must support tool calling. Ollama can run locally without an API key, while hosted providers receive the content the agent reads. Local files, the database, settings, and keys remain on the computer, but the project warns that this does not make cloud inference offline. The app has per-run step, time, and cost limits, daily spending caps, provider-specific request handling, and a stub model for testing without paid calls. It also marks document text as untrusted data, restricts tools by task, and uses a bounded arithmetic parser, while acknowledging that these measures do not eliminate prompt-injection risk. The interface has no account, subscription, or hosted service; data persists in Docker volumes. The project says connectors such as Google Drive and PDF report export are not built, and identifies upgrades to Next.js 15 and Fastify 5 as useful contributions.