DeepRefine-Skill plugs into agent workflows and use a single command /deeprefine in your agent CLI to refine and evolve your LLM-Wiki (e.g., graphify) knowledge base.
/deeprefineIt refines your graphify knowledge graph for better future retrieval and Q&A quality.
- [2026/6/15] v0.1.8 - Aligned interaction memory with LLM-Wiki (graphify) and fixed the single query refinement issue.
- [2026/6/2] v0.1.7 — Cursor skill +
deeprefine refinewith configurable API. And strict DeepRefine agent loop.
This is the default mode and the main workflow for this project.
- Uses your current Cursor session model (no separate API/vLLM setup required)
- Follows the same control flow as
Reafiner.refine() - Integrates with graphify query memory automatically
- Handles pending queries in batch, one by one
pip install deeprefine-cli graphifyy
cd /path/to/your-kb-project
graphify cursor install
deeprefine cursor installAfter upgrading the package, run deeprefine cursor install again to refresh local skill files.
/graphify .
/graphify ./ --wiki
/graphify query "your question 1"
/graphify query "your question 2"
# ..
/deeprefineWhen you run /deeprefine, it should follow this order:
deeprefine history sync-memory- import queries from
graphify-out/memory/query_*.md - write to
graphify-out/.deeprefine/history.jsonl
- import queries from
- load pending queries from
history.jsonl(refined != true) - refine all pending queries sequentially
- mark each finished query as refined via
deeprefine loop finish
graphify-out/
├── graph.json # graphify main graph (refined in-place)
├── memory/
│ └── query_*.md # graphify query logs (sync source)
└── .deeprefine/
├── history.jsonl # DeepRefine-maintained history queue
├── graph.json.bak # backup before first apply in this run
├── loop_trace_<query_id>.json # per-query loop audit trace
├── refinement_results_<YYYYMMDD>.jsonl # per-day run log
└── refinement_actions_*.txt # optional; only when refinement path is taken
Run from your KB project root.
| Command | Description |
|---|---|
deeprefine cursor install |
Install /deeprefine skill into current project |
deeprefine cursor install --user |
Install skill for all projects (~/.cursor/skills/) |
deeprefine history sync-memory |
Import graphify-out/memory/query_*.md into DeepRefine history |
deeprefine history list --pending |
Show unrefined queue |
deeprefine loop init --query "..." |
Create loop_trace_<id>.json template |
deeprefine loop validate --trace-file T |
Validate trace against Reafiner control flow |
deeprefine apply --trace-file T --refinement-file F |
Apply <refinement> actions to graph.json |
deeprefine loop finish --trace-file T [--refinement-file F] |
Persist results and mark history refined |
Use this section when you want a pure terminal workflow without Cursor /deeprefine.
- DeepRefine repository installed in
atlastune - Inference backend configured (API or vLLM)
conda activate atlastune
cd /path/to/DeepRefine && pip install -e .
pip install deeprefine-cli
# Optional, if DeepRefine repo is elsewhere
export DEEPREFINE_REPO=/path/to/DeepRefine| Variable | Default |
|---|---|
DEEPREFINE_LLM_URL |
(empty; SDK default) |
DEEPREFINE_EMBED_URL |
(empty; SDK default) |
DEEPREFINE_API_KEY |
fallback to OPENAI_API_KEY |
DEEPREFINE_LLM_API_KEY |
fallback to DEEPREFINE_API_KEY |
DEEPREFINE_EMBED_API_KEY |
fallback to DEEPREFINE_API_KEY |
DEEPREFINE_MODEL |
gpt-4.1-mini |
DEEPREFINE_EMBED_MODEL |
text-embedding-3-small |
cd /path/to/your-kb-project
# Option A: import from graphify memory first (recommended)
deeprefine history sync-memory
deeprefine history list --pending
deeprefine refine
# Option B: add one explicit query
deeprefine history add --query "your question"
deeprefine refine| Command | Description |
|---|---|
deeprefine history add --query "..." |
Append one query to history |
deeprefine history list |
List all history rows |
deeprefine history sync-memory |
Import graphify memory queries into history |
deeprefine history list --pending |
List only unrefined queries |
deeprefine refine |
Refine all pending queries |
deeprefine refine --query "..." |
Refine a single query (also records it) |
deeprefine refine --rebuild-index |
Rebuild FAISS before refine |
deeprefine index --rebuild |
Rebuild FAISS cache only |
| Method | Command |
|---|---|
| PyPI | pip install deeprefine-cli==0.1.7 |
| Source | pip install -e /path/to/DeepRefine-Skill |
deeprefine --help
# Expect: cursor, history, index, refine, apply, loopMIT — see LICENSE.