Lawyer Knowledge Graph
wxlawyers/lawyer-knowledge-graph
Case-knowledge system and Hermes Agent litigation skills for lawyers, documented in Chinese
Lawyer Knowledge Graph is a two-part legal toolkit for litigation lawyers that pairs a vector-search case knowledge system with a set of Hermes Agent skills covering the case workflow. Its documentation and legal focus are Chinese.
What Lawyer Knowledge Graph does
Lawyer Knowledge Graph has two modules. The first is a knowledge system: a lawyer pastes a judgment or case summary, an LLM extracts knowledge cards (dispute focus, adjudication rule, statute application, practice experience), and the cards are vectorized and stored in PostgreSQL 16 with pgvector. Entering a new case description returns semantically similar cards with similarity scores. The backend is FastAPI, the interface is Streamlit, vectors come from text2vec-large-chinese, and the extraction model can be DeepSeek, Kimi or GLM.
The second module is a skill collection in skills/legal for Hermes Agent, covering the case workflow, including case analysis, evidence organization, legal research, document drafting, trial preparation and trial response. The skills run in conversation and need a Hermes Agent environment. The knowledge system starts with a deploy script or docker-compose, and two standalone scripts, extract_cards.py and vector_search.py, run without the full service. A statute-tracking feature is marked as planned.
Key features
- Knowledge cards extracted from judgments: dispute focus, adjudication rule, statute application and practice experience
- Semantic similar-case search over pgvector with similarity scores
- Hermes Agent skills for case analysis, evidence organization, legal research, document drafting and trial preparation
- Docker Compose stack with a FastAPI backend, Streamlit frontend and text2vec vector service
- Standalone scripts extract_cards.py and vector_search.py
- deploy.sh script that guides setup of the LLM model and API key
When to use it
- Finding earlier cases with a similar dispute before starting new research
- Drafting legal documents and preparing for trial from a Hermes chat
- Building a personal archive of case experience that grows with each matter
Who it is for: Litigation lawyers working with Chinese civil and commercial law who want an AI-assisted case archive and Hermes skills.
How it fits with Hermes Agent
The skills module is written for Hermes Agent and requires a Hermes Agent runtime, while the knowledge system runs as a separate Docker stack.
How to install Lawyer Knowledge Graph
These commands are copied from the project's README. Check the repository for the latest steps before you run them.
git clone https://github.com/wxlawyers/lawyer-knowledge-graph.git
cd lawyer-knowledge-graph
bash deploy.shRequirements: Docker Engine 24+ with Docker Compose v2, 4 CPU cores, 8 GB RAM (16 GB recommended), 20 GB free disk, an LLM API key and network access to the LLM API; Hermes Agent for the skills
Note: The README is written in Chinese, and its statute-tracking feature is marked as planned rather than built.
FAQ
What is Lawyer Knowledge Graph?
Lawyer Knowledge Graph is an AI personal knowledge system and skill set for litigation lawyers. It stores knowledge cards from past cases for similarity search and provides Hermes Agent skills for day-to-day case work.
Does Lawyer Knowledge Graph work with Hermes Agent?
Yes, its skills module in skills/legal is built for Hermes Agent and needs a Hermes Agent environment. The knowledge graph system runs separately in Docker.
What do I need to run Lawyer Knowledge Graph?
You need Docker Engine 24 or newer with Docker Compose v2, at least 4 CPU cores, 8 GB of RAM and 20 GB of disk. It also needs network access to an LLM API such as DeepSeek, Kimi or GLM, and an API key for it.
Similar automations for Hermes Agent
All automationsPlaywright-based skill that publishes Markdown chapters to the Fanqie novel author backend
Bomx SEO Keyword ResearchPrompt-driven keyword research with scoring, clusters and a 30-day calendar, runnable from several agents
hooper-lee CrossPulseDaily cross-border e-commerce market monitoring that scores signals and pushes a report to Feishu
setasoma Mycodo Hermes SkillHermes skill that runs a 30-minute grow-control cycle for mushrooms using Mycodo sensors and relays
davidmosiah Delx Wellness for HermesOne-command Hermes wellness profile with skills, a recovery-aware SOUL.md and 15 wearable MCP connectors
LLMQuant llmquant-hermesFinancial analyst setup for Hermes: five standing market watchers and 18 analysis skills via LLMQuant Data
Related guides: Build agent teams with the Hermes kanban board · How to run Hermes Agent securely