I built Logseq Rig for people who want AI coding agents to work with a Logseq OG graph without giving them unrestricted access to the whole thing.
The idea is simple: Markdown and Git stay authoritative. The agent gets bounded retrieval, explicit context, and integrity checks.
Instead of recursively reading an entire graph, an agent can ask for exactly what it needs:
logseq-rig resolve /path/to/graph "Project Alpha"
logseq-rig find /path/to/graph "release notes"
logseq-rig context /path/to/graph "Project Alpha" --children 2
logseq-rig backlinks /path/to/graph "Project Alpha"
Results are JSON, so they work well in shell, Codex, and other agent workflows.
After an agent edits the Markdown:
logseq-rig check /path/to/graph --changed
The checks are meant to catch graph-specific breakage involving properties, assets, block IDs/references, configured directories, and related invariants.
The project is deliberately narrow. It is not an MCP server, semantic search layer, remote endpoint, or unrestricted graph-writing API.
The question I’m exploring is:
What is the smallest trustworthy interface an AI agent needs to work effectively with an existing Logseq OG graph?
Logseq Rig currently provides:
- exact page/block/reference/backlink retrieval
- bounded context instead of broad graph reads
- Git-aware history and changed-file checks
- managed Codex setup
- safe install/update/uninstall with
--dry-run - optional local read-only DataScript queries
- Python 3.11+, with no runtime Python dependencies
Quick start:
git clone https://github.com/gustavo-meilus/logseq-rig.git
cd logseq-rig
python -m pip install .
logseq-rig status /path/to/graph
logseq-rig doctor /path/to/graph
I’m especially interested in feedback from people using OG graphs with Claude, Codex, or other coding agents:
- What retrieval operation is missing?
- What has an external editor or AI agent broken in your graph before?
- What agent integration would be useful next without turning this into a general-purpose graph server?
Real edge cases and small synthetic reproductions are very welcome.