
Antu
io.github.zh-xxv0.9.0Updated Oct 6, 2026
Legal diagrams (fact, procedure, relationship, justification) from JSON, as one offline HTML page.
Overview
Turns a JSON description of legal facts, procedures, relationships or reasoning into a single offline HTML diagram page.
- What it does
- Antu converts one JSON document into one self-contained HTML legal diagram. It exposes tools for schema lookup, guidance, examples, validation, layout, rendering and preview, and supports four diagram kinds: relationship graphs, fact timelines, procedure flowcharts and justification reasoning trees. The output is a single file of roughly 2.3 MB that makes no network request and needs no server, so it can be opened offline, archived, printed or sent as an attachment. The same JSON always produces the same diagram.
- When to use it
- Use it when an assistant has read case materials and needs to present extracted facts, procedural paths, party relationships or legal reasoning as a reproducible diagram for filing, printing or sharing. It suits legal and case-analysis workflows where a stable, offline artifact matters more than interactive charting.
- Requirements
- Runs locally over stdio as the npm package @zh-xx/antu, typically launched with npx. No authentication, environment variables or headers are declared. The README's usage example installs dependencies and runs a diagram command against a JSON example file.
Installation
In SourceWeft
- Open Antu in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Antu 案图
中文 | English
Antu turns one JSON document into one self-contained HTML legal diagram. The page is one file of about 2.3 MB that makes no network request and needs no server; it opens offline and can be archived, printed or sent as an attachment. An AI Agent can read the case materials and write the JSON; the engine then draws the diagram from it, and the same JSON gives the same diagram. Antu is at version 0.x, and the formats of the relationship and justification diagrams are still drafts.
Diagram Types
Four types of legal content, each drawn in several ways. A selector in the page switches between the ways; nothing in the JSON chooses one.
Relationship diagrams show parties, roles and legal relationships; fact diagrams the time, the participants and how events went; procedure diagrams a procedural path and its branches; justification diagrams a conclusion drawn from norms and facts. The relationship and justification schemas are still drafts.
Three looks, called themes: document (black and white and square, for print and filing; the default), modern
(rounded, pale) and legal (navy). The reader switches in the page, or a call fixes a page to one. Only the diagram is
themed. See spec/theme.md.
Usage
The page is written beside the JSON file. The interface language of a page is set with ?lang=en or ?lang=zh; the case content is never translated.
Principle
The engine does not write JSON, and the Agent does not draw. The model puts information into JSON; the engine draws. The JSON specification is a specification of its own, for four reasons:
- General-purpose charting syntax is built on nodes, edges and state machines, and has no place for procedural standing or the source of a piece of evidence.
- The diagram does not depend on which model extracted the information.
- The same JSON gives the same diagram at any time and in any environment, so a diagram handed to a court or to the other side can be reproduced.
- The source is recorded when the facts are extracted: each fact states the document, the page and the provision it rests on, and the diagram shows them. The materials themselves are neither bundled nor linked.
Agent Integration
The reference material for an Agent, for the fact diagram, is a field table of about 3.3k characters and a mechanism note of about 5.8k characters.
Skill
The Skill is in skills/antu/; each release also carries it as antu-skill-<version>.zip.
MCP
The MCP server is the npm package @zh-xx/antu, registered as io.github.zh-xx/antu in the MCP registry.
Tools: antu_schema, antu_guide, antu_examples, antu_validate, antu_layout, antu_render, antu_preview.
Documentation
- Design documents for people, under
spec/: architecture, the source types, themes, the MCP server, and the diagrams (fact, procedure, relationship, justification). The notes for Agents are underspec/agent/. - CHANGELOG.md and the versioning rules in spec/versioning.md.
- Known problems and requests are tracked as GitHub issues. Working rules for contributors are in CONTRIBUTING.md.
License
Copyright (C) 2026 Ji Cheng.
Antu is free software, licensed under the GNU Affero General Public License, version 3 or any later version (LICENSE, SPDX AGPL-3.0-or-later). In short: you may use, study, change and share it, including for commercial purposes. If you distribute a changed version, or let others use it over a network (for example as a hosted service), you must release your changes under the same licence, keep the copyright and licence notices, and make the source available. There is no warranty. This summary is not the licence; the licence text is.
- Additional permission (AGPL section 7). A page made with Antu contains Antu's code together with the diagram data you gave it. The diagram data, and the content of the diagram you drew from your material, are not part of Antu and are not covered by this licence: you may keep them private, publish them, or sell them on any terms you like. The licence covers Antu's code in the page, and the notices in the page must stay with it. The same text is in every page and at the top of the command line.
- Everything in the repository (the code, the examples, the specifications and the guides) is under the same licence, except what is named below.
- Code of other projects inside the pages and the command line keeps its own licence. Its notices are in
skills/antu/THIRD-PARTY-NOTICES.md, and also inside every page and at the top of the command line, together with the licence of Antu and the place of the source of that version. - The cases in
examples/and the judgment texts inexamples/raw/are fictional: the people, companies, dates, amounts and provisions are made up for Antu and match no real case. They are under the same licence. - Versions up to 0.5.0 were published without a licence file. The licence applies from 0.5.1.
Source: README.md at commit b49240a
Tools
0Version history
1- v0.9.0LatestOct 6, 2026


