REQL
REQL is a local repository context and working-memory layer for coding agents and developer tools. It compiles source files and supported documents into a property graph, then returns bounded context about code, tests, dependencies, findings and provenance.
Installed assistant instructions make REQL part of the agent's normal workflow. The project graph holds repository facts; Agent Workspace holds engineering intent, decisions and handoffs. Current source and tests remain authoritative.
REQL runs locally without mandatory model calls, accounts, hosted services or an external graph database. Bounded retrieval and saved work can reduce repeated discovery, but instructions and tool results also consume tokens; total savings depend on the host and workflow.
Quick Start
REQL requires Python 3.10 or newer:
python -m pip install reql
reql install codex
For development from a checkout, use python -m pip install -e .. Replace
codex with another supported agent platform, or run interactive installation
to detect one. Run project commands from the target repository root:
reql project status
reql project compile
reql query_context --query "payment service" --code
Compile when the graph is missing or needs refresh. If a watcher already owns
refresh, leave it responsible; reql project compile --if-stopped checks that
ownership before opening the graph. Registration alone does not establish a
successful compilation.
Use reql locate "src/service.py" for a known path. Follow the inspection
commands returned by context retrieval for missing source, and reuse complete
verified excerpts. Test targets are suggestions; use the repository's test runner.
See retrieval and source limits.
For assigned work, recover with reql project context --task WORK_ID.
Use project overview when project direction is unknown. Multi-step or resumed
work can use Agent Workspace to record decisions and verified outcomes; see
Engineering coordination.
The installer also adds the explicit-only reql-context-compact skill for hosts
that can export and replace a JSON transcript. It removes only large, exact
duplicate tool results. It cannot replace the live context window in Codex or
another host without that capability. See assistant installs.
From a checkout, python cli.py ... exposes the same CLI without an editable
installation. Dependencies must still be installed. Start the optional MCP server
with reql-mcp --read-only; see MCP setup.
Features
- Incremental code and document compilation with hashes, source spans and provenance.
- Bounded lexical and graph retrieval through a shared Python, CLI and MCP contract.
- Static-analysis findings, structural code links, communities and hub analysis.
- Revision-checked shared work, private session scratch and recoverable checkpoints.
- Local block storage with transactions, locking, compaction and retention.
- Markdown reports, JSON and HTML graph export, and project pipeline views.
Supported languages, formats and parser requirements are listed in Code analysis and Artifact ingestion.
Runtime Model
project files -> scan and compile -> canonical graph -> bounded source context
agent outcomes -> shared work records -> task recovery and project overview
project compile, update_project and watch mode share the incremental
compiler. File hashes, compiler options and successfully compiled content
govern cache reuse. An incomplete scan cannot establish deletions or publish a
new revision. See Incremental compilation for
stage ordering, failures and recovery.
Storage defaults to ./.reql/memory.reql. Projects configure behavior through
reql.conf; see Configuration for precedence and defaults.
Storage accepts the current validated format. storage clear builds a fresh
graph and discards history after a successful replacement; see
Storage maintenance.
Interactive Launcher
python launcher.py
python launcher.py --storage .reql/memory.reql
The launcher guides storage selection, compilation, queries, analysis, reports, exports and MCP configuration. Use the CLI for scripting and the complete command surface. See CLI entry points.
Documentation
| Guide | Contents |
|---|---|
| Architecture | Components, ownership and dependency boundaries |
| CLI | Commands, arguments, installation and source-context output |
| Configuration | Defaults, reql.conf, overrides and scan rules |
| Engineering coordination | Work records, sessions, batches and handoffs |
| Incremental compilation | Stages, cache, deletion and recovery |
| Storage | Format, transactions, locking and maintenance |
| Artifact ingestion | Document parsers, fragments and relations |
| Code analysis | Languages, Tree-sitter and static findings |
| REQL language | Query syntax and examples |
| Schema | Node, edge and provenance fields |
| Graph analysis | Communities, hubs and bridge signals |
| Repository explanation | Derived capabilities and semantic workflows |
| Reporting | Reports and HTML/Mermaid export |
| MCP server | Transports, tools and client configuration |
| Extending | Adapter and extractor contracts |
Architecture
The public API delegates to application services, deterministic engines and the
GraphStore storage port. Repository facts, shared engineering work and private
scratch have separate owners. See the architecture guide.
Public API
The canonical import is from reql import MemoryGraph. The same package exposes
BlockGraphStore for direct storage access and typed query-context models:
from reql import MemoryGraph, QueryContextRequest, QueryMode, RetrievalBudget
graph = MemoryGraph.open(".reql/memory.reql")
try:
graph.compile_project(".")
request = QueryContextRequest(
text="payment service",
mode=QueryMode.INFORMATIVE,
scopes=frozenset({"code"}),
budget=RetrievalBudget(top_k=20, max_depth=3, max_items=20),
)
result = graph.query_context_result(request)
print(result.to_dict())
finally:
graph.close()
The MemoryGraph facade exposes compilation, retrieval,
inspection, REQL queries, reporting and analysis. Python compilation overrides
use CompilationOptions from memory.artifacts; see
typed configuration. Context requests return
schema-version-2 envelopes with source revision, freshness, confidence and a
nested payload; see retrieval contracts.
License
MIT. See LICENSE.
Contributing
See CONTRIBUTING.md for setup, tests, benchmarks and pull request expectations. Generated stores, caches and benchmark outputs stay local.
Metadata
Release files for reql 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| reql-0.1.8.tar.gz | 464.4 kB | Without provenance | Details for reql-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| reql-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for reql-0.1.8-py3-none-any.whl |
Total release size: 917.9 kB
Release files / reql-0.1.8.tar.gz
| Download URL | reql-0.1.8.tar.gz |
|---|---|
| Size | 464.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
92ce210f34fd7c8b94addceca8b4023f3b2696f57fb6a267e89533e6bd58ef9c
|
|
BLAKE2b-256 checksum How to use checksums |
7704d403237882a6763d757b8f0e50886d687bd0c75aec820a40dfdc7339b65d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.9
|
Release files / reql-0.1.8-py3-none-any.whl
| Download URL | reql-0.1.8-py3-none-any.whl |
|---|---|
| Size | 453.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d451e494643e373caf54693a9f070e6b0576bd3b44b90102c0a46ee0add8a9d4
|
|
BLAKE2b-256 checksum How to use checksums |
4a45db8c2e2ae501694d0c1b3ecaf44cedcf24f7eaa0a4c3c002ead3199e8a63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.9
|
Security for reql 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.