AI Publisher (github.com/jakefearsd/aipublisher, separate from the Wikantik codebase) is a Java 25, Spring Boot 3.5 and LangChain4j command-line tool that turns a topic into a wiki article by passing one document through five specialised LLM agents. Rather than relying on single-shot generation, it separates research, drafting, verification, editing and review, and loops back for revision when a stage is not satisfied. It runs against a local Ollama server by default (llm.provider=ollama, model qwen3:14b) and against Anthropic Claude with --llm.provider=anthropic and ANTHROPIC_API_KEY.
This guide covers the agent roles, the state machine and revision loop, the quality settings, and the output format.
| Agent | Role | Output | Runs by default? |
|---|---|---|---|
| Research | Gathers key facts and sources and builds an outline, grounded with Wikidata | ResearchBrief | Yes |
| Writer | Drafts the article in JSPWiki syntax | ArticleDraft | Yes |
| Fact Checker | Verifies every claim against the sources; outcome APPROVE, REVISE or REJECT | FactCheckReport | No (pipeline.skip-fact-check=true) |
| Editor | Polishes prose, integrates wiki links, scores quality | FinalArticle | Yes |
| Critic | Reviews JSPWiki syntax, structure and readability | CriticReport | No (pipeline.skip-critique=true) |
The shipped application.properties skips the fact check and the critique, so a plain java -jar aipublisher.jar -t "Topic" runs Research, Writer and Editor only. ./publish.sh (or --pipeline.skip-fact-check=false --pipeline.skip-critique=false) runs all five.
CREATED -> RESEARCHING -> DRAFTING -> FACT_CHECKING -> EDITING -> CRITIQUING -> PUBLISHED
^ | ^ |
+--- REVISION LOOP ----------+------------+
Any non-terminal state -> AWAITING_APPROVAL -> continue or REJECTED
With the defaults, a document goes DRAFTING to EDITING and EDITING to PUBLISHED, skipping the two optional phases. A fact check that returns REVISE sends the document back to drafting, and a critique can send it back to editing or drafting. The loop is bounded by pipeline.max-revision-cycles (default 3), and each phase by pipeline.phase-timeout (default PT5M). PUBLISHED and REJECTED are terminal.
Each agent extends a common BaseAgent whose process() method owns the retry loop (3 attempts with exponential backoff by default), timing and contribution recording.
| Setting | Shipped default |
|---|---|
quality.min-editor-score | 0.8 |
quality.min-factcheck-confidence | MEDIUM |
quality.require-verified-claims | true |
pipeline.approval.before-publish | true (a human approves before the file is written; --auto-approve skips the prompt) |
pipeline.approval.after-research, after-draft, after-factcheck | false |
WikiSyntaxValidator checks, and where possible repairs, the JSPWiki markup. When a phase fails, the partial document is written to the output directory as PageName_FAILED_<STATE>_<timestamp>.txt with a header naming the phase and error.
-t "Topic" with --type (concept, tutorial, reference, guide, comparison, troubleshooting, overview or definition), -a for the audience and -w for the target word count (default 800).--universe <id> generates articles from a topic universe saved by AI Discovery (see AiDiscoveryTopicUniverses); --generate-stubs then fills broken wiki links with short definitions. --analyze-gaps only reports them..txt files in ./output (output.directory, output.file-extension). They are not Markdown; bin/wiki2markdown.py in the Wikantik repository converts them for a Markdown wiki.See also: ContentPipelineHub.