The interesting problem with AI-assisted academic writing is not producing text — it is producing text whose citations actually exist and actually support the claims attached to them. A general chatbot will happily invent a plausible reference. The pipeline also had to work from a researcher's own curated library rather than whatever the open web returns, respect a chosen citation style, and produce the bilingual abstract that Indonesian journals expect regardless of the language the body is written in.
We built a seven-stage agent pipeline on NestJS 11 and Bun: retrieval, drafting, review, revision, bibliography, formatting, and an integrity gate. Sources are labelled with stable short refs that models reproduce reliably inline, so citations are parsed deterministically from the generated markers and grounded back to their source — no fragile second extraction pass. Researchers can connect a Zotero library over OAuth (hand-signed HMAC-SHA1, keys encrypted at rest with AES-256-GCM) and ground the work on the full text of their own PDFs, retrieved via PostgreSQL full-text search and reranked by DeepSeek. The integrity gate verifies at quote level that a claim's terms occur in the source it cites, and blocks the run when they do not. Output is exported to Markdown or DOCX through Pandoc, with progress streaming live over Socket.IO.
Agent pipeline from retrieval to formatted manuscript
APA, Chicago, MLA, IEEE, Vancouver citation output
Designed & engineered by Manggala Code