The archive
that organises itself
on its own.
Vdoc gathers company documents from four different channels, reads them with a proprietary artificial intelligence engine, and files them with the correct metadata and the right permissions. The foundation is Paperless-ngx, a mature open-source system. On top, Vdoc builds the ingestion automation, the classification and the business rules.
unified
end-to-end
per document
on AI model
What Vdoc does, in practice.
A document arrives: a PDF invoice, a signed contract, a scanned receipt, a photo of a till slip. Vdoc reads it, identifies what it is, assigns a title, extracts the real document date, identifies the sender, writes a summary, applies the thematic tags, and files it with the correct permissions. The right people receive a notification.
it is finding it nine months later." — Project premise
Three layers, distinct responsibilities.
The system is organised in three components with clear boundaries: an ingestor that receives documents from heterogeneous channels, an AI engine that interprets them, an open-source archive that stores them. Each layer is independently replaceable.
The ingestion layer presents consistent interfaces to four completely different input modes. A scan on a USB stick, a drag-and-drop folder on a PC, an email forwarded by a supplier, a photo sent from a smartphone: all four converge into the same pipeline.
The orchestration layer applies the business logic: detects duplicates, decides who can see what, routes the classification, notifies the recipients. It is the part that knows the company's org chart.
The AI layer — Forge AI — is a proprietary multi-provider engine that abstracts the underlying language model. The rest of the system does not know whether it is talking to Gemini, Claude, OpenAI or a local model: it talks to a stable interface.
The journey of a document.
Whatever the channel, every document follows the same deterministic path in six stages. The separation is intentional: each stage can evolve without touching the others.
The deterministic stages (1-2, 4-6) take less than three seconds overall and run entirely on the local server. The dominant latency is the call to the external AI provider, which varies between eight and twelve seconds for an average document. Optimisations such as lighter models, batching and caching reduce this time for high-volume pipelines.
How much time,
how much money.
Manual document management is invisible until it works, but it costs. It costs when a supplier calls to ask whether the invoice arrived, when a contract needs finding and nobody remembers where it is, when a colleague on sick leave is the only one who knew where to file the receipts.
Time per document: manual vs. Vdoc
A secretary who receives an invoice by email spends on average three to four minutes between: opening it, renaming the file, choosing a folder, entering the metadata in the management system, forwarding it to the person responsible. Over 80 documents a month, that is roughly five hours per month — sixty hours a year. Vdoc reduces the human work to merely verifying the already-classified document.
Distribution of manual work
Cumulative annual cost
Estimates based on times measured in pilot installations and average commercial AI provider rates for documents of 1 to 5 pages. Higher volumes → decreasing marginal costs.
Four ways to send
a document.
The way a document enters the company depends on who sends it, from where and with which device. Vdoc offers four different channels that converge into the same classification and filing pipeline.
documents@company.it. Emails with attachments, from authorised senders, are processed automatically. Useful for forwarding documents received from suppliers.
A company can configure multiple instances of each channel — several monitored email addresses, several registered PC workstations, several authorised Telegram users — assigning each its own rules and permissions.
The engine that interprets
the documents.
Vdoc integrates Forge AI, a proprietary library that abstracts the underlying language provider. Switching model — from Gemini to Claude, to a local model — means changing a configuration, not rewriting the software.
Forge AI is a provider-agnostic abstraction layer built around three principles: versioned prompts, validated outputs, trackable costs. Vdoc uses it to extract structured metadata from documents without coupling to a specific AI vendor.
Four providers, a single interface
What Forge AI does, beyond the call
- Versioned prompts. The instructions sent to the AI are saved as immutable versions identified by a code. Improving a prompt does not break the existing ones: the old version stays as a reference, the new one enters production.
- Structured validation. Every AI response is verified against a schema. If the AI returns malformed JSON or a field is missing, the system automatically retries the request or reports the error without corrupting the archive.
- Spend quotas and caps. Monthly limits in tokens and euros, configurable per installation. The system warns before exhaustion and blocks new calls when the cap is reached, avoiding billing surprises.
- Intelligent throttling. When channels push documents in rapid sequence, Forge AI automatically adjusts the call rate to respect provider limits, with no HTTP 429 errors visible to the user.
- Multi-step chains. For cases where a single call is not enough (for example: extract the metadata, then verify consistency), Forge AI orchestrates call chains with automatic output propagation.
- Complete tracing. Every call is logged: provider, model, tokens, estimated cost, latency, outcome. The dashboard shows real-time consumption by day, by channel, by document type.
- Encrypted API keys. Provider credentials are never in plain text on the server. Fernet encryption with a local master key and strict file-system permissions.
How Vdoc talks to Forge AI
Vdoc builds a ChatRequest containing the document (PDF or image), the versioned classification prompt, and the expected JSON output schema. The call gw.chat(request) returns a normalised response independent of the underlying provider:
from forge_ai import Gateway, ChatRequest gw = Gateway(config_path="/etc/vdoc/forge_ai.toml") risposta = gw.chat(ChatRequest( prompt_codice="vdoc.classifica_documento", prompt_versione="v3", documenti=[documento_pdf], output_schema=SchemaClassificazione, metadata={"canale": "email", "mittente": "fornitore@acme.it"}, )) # risposta.output è già validato contro lo schema # risposta.costo_stimato_usd, risposta.token_*, risposta.latenza_ms # tutto è loggato automaticamente in forge_ai.chiamata
The consumer (Vdoc) does not know which provider answered, does not handle retries, does not handle JSON parsing, does not handle rate-limit errors. Everything is encapsulated.
Forge AI ensures that the exit door exists, and is open." — Design principle
Compared to Paperless-ngx alone.
Paperless-ngx is an excellent open-source document archive. On its own, however, it requires disciplined human behaviour to obtain a well-classified archive. Vdoc is what you build on top of Paperless to automate what a person does by hand today.
| Capability | Paperless-ngx (alone) | Vdoc (with integrated Paperless) |
|---|---|---|
| Document archive, OCR, full-text search | Native | Reused |
| User, group and per-document permission management | Native | Extended with rules |
| Recycle bin, restore, retention | Native | Reused |
| Progressive numbering (ASN) | Native | Reused |
| Multi-channel ingestion (USB · email · Telegram · folder) | Partial (folder, email) | Four unified channels |
| Automatic AI classification | Rule-based (regex, sender) | Forge AI multi-provider |
| Title, summary, sender and date extraction from content | Not available | Automatic |
| Cross-channel deduplication | Simple checksum | Pre-ingestion hash |
| Fuzzy tag matching (anti-proliferation) | Not available | Two passes · second AI judgement |
| Visibility rules by channel and document type | Manual per-doc permissions | Declarative rules |
| Role-differentiated Telegram notifications | Not available | Integrated |
| Unified configuration dashboard | Paperless UI for archive | Vdoc dashboard + Paperless |
| AI cost tracking and quotas | Not applicable | Forge AI |
| AI vendor independence | Not applicable | Four interchangeable providers |
The overlap is intentional. Vdoc does not replace Paperless-ngx: it is its main consumer. Whoever administers the system can access the Paperless interface directly for advanced operations — manual metadata editing, complex search, bulk export — without having to wait for dedicated features in the Vdoc dashboard.
What the company
can change.
Every organisation has its own vocabulary, categories and flows. An administration panel lets the system be adapted without touching the code. Changes take immediate effect on subsequent documents.
| Configuration area | What can be modified |
|---|---|
| Groups and users | Group list (native Paperless), user membership, designation of supervisor groups with full visibility. |
| Ingestion channels | Several monitored email addresses, several registered PC workstations, several authorised Telegram users. Each with its own default groups. |
| Competence rules | Channel → default-group mapping. Overrides by document type (adds or replaces visibility). |
| AI instructions | Company context, tag rules, sender rules, date rules, summary rules. Demonstration examples provided by the company. The technical response schema stays locked. |
| Filing | Paperless paths by document type, optional progressive numbering, deletion policy, recycle-bin duration. |
| Matching | Similarity thresholds for tags, senders, document types. Minimum confidence level for the second AI judgement. |
| AI provider | Provider choice, specific model, monthly quota in tokens and euros, API keys. |
| Notifications and alerts | Recipients by channel. Operational alert rules: consecutive errors, error rate, channel inactivity, disk space, AI quota nearing exhaustion. |
On first access a guided procedure walks the administrator through the minimum necessary configuration. Afterwards, the panel stays open, with a list of optional configurations still to be defined.
Where the documents are.
Company documents stay on a server dedicated to the company, stored in the Paperless database. No shared platform with other clients, no mandatory transit through third-party servers other than the chosen AI provider, and only for the time of the analysis.
Internal segregation
Users see only the documents of their groups. The segregation is enforced by the native Paperless permission engine and cannot be bypassed from the user side. The system administrator is the only one with full technical visibility, as per standard practice.
Operational log
Every processed document leaves a record: who sent it, when, with what outcome, with what metadata. The event archive can be consulted from the Vdoc dashboard and is kept for the configured period.
What lies beneath.
For those evaluating the integration from an IT perspective, a concise view of the technical components and baseline choices. All open source or industry standard.
| Component | Technology |
|---|---|
| Server operating system | Ubuntu LTS 24.04 |
| Document archive | Paperless-ngx (Docker), PostgreSQL, OCR Tesseract |
| Application orchestration | Vdoc Server (Python + Flask) as a systemd service |
| AI engine | Forge AI (Python library) with local SQLite backend for state |
| Supported AI providers | Gemini, Claude, OpenAI, Vertex AI, local models via Ollama |
| Reverse proxy & HTTPS | Caddy (automatic certificate renewal) |
| Telegram bot | Dedicated bot per company |
| Windows folder client | Windows executable with automatic startup |
| USB Inbox device | Raspberry Pi Zero 2W with MTP gadget |
| Backup | Encrypted Borg backup to a separate Storage Box |
| Monitoring & alerts | Telegram alerts on operational thresholds |
Hosting: VPS or on-premise
The system is designed to run on a single modest machine — typically a VPS with 4 GB of RAM and 2 vCPUs in a European data centre is sufficient for companies up to about 500 documents per month. For higher volumes, or for internal data-residency requirements, the system installs identically on a physical server hosted in-house.
What Vdoc does not do.
For completeness, some clarifications on what is out of scope. Vdoc is designed for filing and classification; it does not replace other business tools with different responsibilities.
- It is not a management system. It does not record accounting entries, does not issue invoices, does not manage active deadlines. It files and classifies documents that come from other systems.
- It is not a PEC or an interchange system. Filing electronic invoices goes through ordinary channels; Vdoc can receive copies via email after they have been acquired.
- It does not enforce approval workflows. A filed document is filed; there are no intermediate states like 'awaiting signature' managed by the system. Approval takes place in the existing company processes.
- It does not delete automatically by regulatory deadline. Fiscal and legal retention rules are the company's responsibility. The system offers only optional retention and protections against accidental deletion, but it does not decide on its own what to eliminate.
- It does not interpret content beyond classification. The automatic summary is an aid to search, not a substitute reading of the document. Decisions based on content require human reading.