Skip to main content
Hyper-Extract Logo

Smart Knowledge Extraction CLI

Transform documents into structured knowledge with one command.

๐Ÿ“– English Version ยท ไธญๆ–‡็‰ˆ

Trendshift

PyPI Version Python Version License Docs GitHub Stars


"Stop reading. Start understanding."
"ๅ‘Šๅˆซๆ–‡ๆกฃ็„ฆ่™‘๏ผŒ่ฎฉไฟกๆฏไธ€็›ฎไบ†็„ถ"


Hero & Workflow

๐Ÿ“ฐ What's New

  • ๐Ÿค– DeepSeek Provider โ€” Use deepseek-v4-flash / deepseek-v4-pro directly via create_client(llm="deepseek"). V4 thinking mode is auto-disabled for structured extraction compatibility. (#67)
  • ๐Ÿ”Œ MCP Server โ€” Query your knowledge abstracts from Claude Desktop and IDE agents with he-mcp. (PR #40)
  • ๐Ÿง  Anthropic Claude Support โ€” Use claude-opus-4-8, claude-sonnet-4-6, and claude-haiku-4-5 directly as your LLM provider. (PR #38)
  • ๐Ÿ“ Obsidian Export โ€” Turn any graph into an Obsidian vault with Markdown notes linked by [[wikilinks]]. (PR #37)
  • ๐Ÿงน he clean โ€” Remove a KA's index or the whole knowledge abstract in one command. (PR #39)
  • ๐Ÿ”ง Reliability Fixes โ€” True mean for multi-chunk embeddings, capped OpenAI-compatible batch sizes, and resolved multi-word llm_* merge strategies. (PRs #35, #36, #41)

See the full changelog in the GitHub releases.

Hyper-Extract is an intelligent, LLM-powered knowledge extraction and evolution framework. It radically simplifies transforming highly unstructured texts into persistent, predictable, and strongly-typed Knowledge Abstracts. It effortlessly extracts information into a wide spectrum of formatsโ€”ranging from simple Collections (Lists/Sets) and Pydantic Models, to complex Knowledge Graphs, Hypergraphs, and even Spatio-Temporal Graphs.

โœจ Core Features

๐Ÿ”ท 8 Knowledge Structures From simple Lists to advanced Graphs, Hypergraphs, and Spatio-Temporal Graphs
๐Ÿง  10+ Extraction Engines GraphRAG, LightRAG, Hyper-RAG, KG-Gen, and more โ€” ready to use
๐Ÿ“ 80+ YAML Templates Zero-code extraction across Finance, Legal, Medical, TCM, Industry, and General domains
๐Ÿ”„ Incremental Evolution Feed new documents anytime to expand and refine your knowledge base
๐Ÿ“ค Obsidian Export Turn any extracted graph into an Obsidian vault โ€” Markdown notes linked by [[wikilinks]]

๐ŸŽฏ What Can You Do With It?

๐Ÿ“„ Researcher โ€” Turn papers into knowledge graphs

Feed a 20-page academic paper, get an interactive graph of key concepts, authors, and citations.

he parse paper.pdf -t general/academic_graph -o ./paper_kb/
he show ./paper_kb/
๐Ÿฆ Financial Analyst โ€” Extract entities from earnings reports

Automatically identify companies, executives, financial metrics, and their relationships from unstructured reports.

he parse earnings.md -t finance/earnings_graph -o ./finance_kb/
he search ./finance_kb/ "What are the key risk factors?"
๐Ÿ”’ Local Deployment โ€” Keep data on-premise with vLLM

Run Qwen3.5-9B + bge-m3 locally via vLLM. No data leaves your machine.

from hyperextract import create_client
llm, emb = create_client(
    llm="vllm:Qwen3.5-9B@http://localhost:8000/v1",
    embedder="vllm:bge-m3@http://localhost:8001/v1",
    api_key="dummy",
)

๐Ÿš€ Supported Platforms & Models

Hyper-Extract relies on the LLM's structured output capability (json_schema or Function Calling).

Platform Verified Models
OpenAI gpt-4o, gpt-4o-mini, gpt-5
Anthropic claude-opus-4-8, claude-sonnet-4-6, claude-haiku-4-5
DeepSeek deepseek-v4-flash, deepseek-v4-pro
้˜ฟ้‡Œไบ‘็™พ็‚ผ qwen-plus, qwen-turbo, deepseek-r1
Local vLLM Qwen3.5-9B (GPTQ-Marlin)

Embedding models (semantic search) work with any OpenAI-compatible endpoint: text-embedding-3-small, text-embedding-v4 (Bailian), bge-m3 (local vLLM).

DeepSeek note: DeepSeek V4 models default to "thinking" mode, which Hyper-Extract auto-disables so structured extraction works. Set DEEPSEEK_API_KEY. DeepSeek has no embeddings API โ€” pair it with an OpenAI-compatible embedder:

from hyperextract import create_client
llm, emb = create_client(llm="deepseek", embedder="openai:text-embedding-3-small")

Anthropic note: Claude is used for the LLM (set ANTHROPIC_API_KEY). Anthropic has no embeddings API, so pair it with an OpenAI-compatible embedder:

from hyperextract import create_client
llm, emb = create_client(llm="anthropic", embedder="openai:text-embedding-3-small")

Requires the extra: pip install 'hyperextract[anthropic]'.

๐Ÿ“– Full guide: Provider System & Local Model Support

โšก 30-Second Quick Start

# Install
uv tool install hyperextract

# Configure API key
he config init -k YOUR_OPENAI_API_KEY

# Extract knowledge from a document
he parse examples/en/tesla.md -t general/biography_graph -o ./output/ -l en

# Query it
he search ./output/ "What are Tesla's major achievements?"

# Visualize
he show ./output/

# Export to an Obsidian vault (Markdown notes + [[wikilinks]])
he export obsidian ./output/ -o ./vault/
๐Ÿ Python API (click to expand)
uv pip install hyperextract
from hyperextract import Template

ka = Template.create("general/biography_graph")

with open("examples/en/tesla.md") as f:
    result = ka.parse(f.read())

result.show()

๐Ÿ”— More examples: examples/en

๐Ÿ“ˆ Why Hyper-Extract?

Feature GraphRAG LightRAG KG-Gen ATOM Hyper-Extract
Knowledge Graph โœ… โœ… โœ… โœ… โœ…
Temporal Graph โœ… โŒ โŒ โœ… โœ…
Spatial Graph โŒ โŒ โŒ โŒ โœ…
Hypergraph โŒ โŒ โŒ โŒ โœ…
Domain Templates โŒ โŒ โŒ โŒ โœ…
Interactive CLI โœ… โŒ โŒ โŒ โœ…
Multi-language โœ… โŒ โŒ โŒ โœ…

๐Ÿงฉ Supported Knowledge Structures

From simple to complex โ€” pick the right structure for your data:

Knowledge Structures Matrix

Example โ€” AutoGraph visualization:

AutoGraph Visualization
๐Ÿ“‹ What's under the hood? (Architecture & Templates)

Hyper-Extract follows a three-layer architecture:

  • Auto-Types โ€” 8 strongly-typed data structures (Model, List, Set, Graph, Hypergraph, Temporal Graph, Spatial Graph, Spatio-Temporal Graph)
  • Methods โ€” Extraction algorithms: KG-Gen, GraphRAG, LightRAG, Hyper-RAG, Cog-RAG, and more
  • Templates โ€” 80+ presets across 6 domains. Zero-code setup.
Architecture

Template example (Graph type):

language: en
name: Knowledge Graph
type: graph
tags: [general]
description: 'Extract entities and their relationships.'
output:
  entities:
    fields:
    - name: name
      type: str
    - name: type
      type: str
    - name: description
      type: str
  relations:
    fields:
    - name: source
      type: str
    - name: target
      type: str
    - name: type
      type: str
identifiers:
  entity_id: name
  relation_id: '{source}|{type}|{target}'

๐Ÿ“š Documentation & Resources

Resource Link
Full Documentation yifanfeng97.github.io/Hyper-Extract
CLI Guide Command-line interface
Provider System Model compatibility & local deployment
Template Gallery 80+ presets
Examples Working code

๐Ÿ”Œ MCP Server

Expose your knowledge abstracts to MCP-capable assistants (Claude Desktop, IDE agents) via the Model Context Protocol โ€” read + export only.

pip install 'hyperextract[mcp]'
he-mcp        # stdio MCP server

Tools: list_templates, info, search, ask (RAG), export_obsidian. Full guide: MCP Server docs.

๐Ÿค Contributing & License

Contributions are welcome! Please submit Issues and PRs.
Licensed under Apache-2.0.

๐Ÿ”’ Security

This project has been security assessed by MseeP.ai.

AtomGit Mirror

AtomGit mirror - a synchronized AtomGit mirror of Agent Reach for easier access and cloning in China. Hosted on AtomGit: https://atomgit.com/yifanfeng97/Hyper-Extract

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hyperextract-0.4.0.tar.gz (171.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hyperextract-0.4.0-py3-none-any.whl (229.2 kB view details)

Uploaded Python 3

File details

Details for the file hyperextract-0.4.0.tar.gz.

File metadata

  • Download URL: hyperextract-0.4.0.tar.gz
  • Upload date:
  • Size: 171.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hyperextract-0.4.0.tar.gz
Algorithm Hash digest
SHA256 54ac009de51f059c2e3a68d7153268d1fb24a7516754d827fd7240ecb239bb38
MD5 14da95a5cbfb7294b64c34bbbdcea9bb
BLAKE2b-256 8df3af5b02fc1e86ea668f87a275ed787385189dea2ef8c577b5863d46fefacb

See more details on using hashes here.

Provenance

The following attestation bundles were made for hyperextract-0.4.0.tar.gz:

Publisher: publish.yml on yifanfeng97/Hyper-Extract

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file hyperextract-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: hyperextract-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 229.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for hyperextract-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f17619ad8030c2a5fdc97bc29b393d9771fea1f4d1ae4c8e1a1f6289d7955dfe
MD5 a502d6ce137159e395a69a48164ac2ac
BLAKE2b-256 761a757a4c1c3cdae5d9795b2cfbe1ca1f38bfee10c75d032707d11443d715c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for hyperextract-0.4.0-py3-none-any.whl:

Publisher: publish.yml on yifanfeng97/Hyper-Extract

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page