MemQL for VS Code & Cursor

A language for data and the work around it

Your engine.
Your editor.

Define data, search by meaning, call AI, and compose automations in MemQL. Author the DSL in VS Code or Cursor with offline language intelligence; connect to the engine to inspect and run your work.

Open source. Alpha. Local editing needs no cluster.

brief.memqlMemQL
/// A research brief you can inspect and review.
@rowAuthz(owner="ownerUserId")
concept researchBrief {
  ownerUserId  string!
  question     string!
  answer       string
  sources      []object
}
Ownership is part of the definition.Declare a row's owner, then use the authenticated actor in your reads and writes.
Excerpt from the complete research-brief example, using the bundled MemQL theme. No live cluster connection.

Write with context

Completion, hover, diagnostics, and definitions powered by MemQL Sense.

See what is there

Browse cluster definitions and the rows your account is allowed to read.

Choose what goes live

Run with arguments. Review training state. Explicitly promote your changes.

A shorter path from
definition to understanding.

MemQL is an AI platform with a typed, versioned memory graph and an execution engine. The extension brings its language and connected tools into your editor.

Start with a file.

The bundled language server runs on your machine. Get semantic highlighting, cross-reference diagnostics, signature help, and go-to-definition as you write.

Available offline

Connect to the real thing.

Select a cluster and sign in. Inspect a definition, open its source, or run a query with an argument form. Results belong to the selected cluster and your account.

Requires a trusted workspace

Make the next step explicit.

Saving changes your file. Training controls let you dry-run, try supported definitions in a session, stage for yourself, or promote to the cluster. A mutation run still writes real data.

Understand training and scope

Define the pieces.

Concepts model data. Traits and specs name conditions. Shapes, queries, and mutations define what comes out and what changes.

The same research-brief domain, from its foundation up.

brief.memql · core declarations
/// A reusable condition for concepts with a compatible status field.
trait hasDraftStatus = row => row.status == "draft"

/// A condition bound specifically to the researchBrief concept.
spec researchBrief hasResearchAnswer = row => row.answer != nil && row.answer != ""

A trait is an unbound row predicate; a spec binds its predicate to one concept or shape. The draft query below applies both, alongside the caller’s ownership check.

Logic composes calls and returns a value. Automation starts those steps from an event or schedule. Put these building blocks to work in the example below.

From a question
to a research draft.

Search your indexed Files, ask a configured agent to draft from the evidence, and save the result for review. Four pieces of one workflow, written in the DSL.

Focused excerpts from one program.
This page does not execute MemQL.

brief.memql
@actor
logic relevantResearchFiles {
  args { question string! }
  matches := builtin librarySimilarArtifacts(
    text: args.question, limit: 5
  )
  return matches.select(file => {
    title: file.title, snippet: file.snippet,
    artifactId: file.artifactId
  })
}

Search indexed Files by meaning with the caller’s ownership checks. The complete source includes imports, schema, mutations, and the automation.

Needs indexed Files, matching embedding configuration, and an agent with compatible inference on an agent node. The output is a draft for human review.

Setup and run the complete workflow
  1. Open the complete example in either editor. Its source includes the schema, both mutations, imports, and the four constructs above.
  2. Validate the bundle offline with go run ./cmd/memqllint examples/research-desk. The directory check uses the engine loader.
  3. On a development cluster, configure Files indexing and an agent, then load the domain as described in the guide. Model execution requires the cluster’s permissions and compatible inference.
  4. Run requestResearchBrief with a fresh briefId, a question, and your configured agentId. Inspect the saved draft with researchBriefs.

Complete setup and execution guide (Markdown) →

Make room
for MemQL.

Build the extension from the repository and install it into your editor. Your first file can stay entirely local.

VS Code 1.91+ or compatible Cursor · Node.js 20+ · Go toolchain from go.mod · npm · Git · Make · unzip

Read the installation guide
  1. Clone and install

    git clone https://github.com/znasllc-io/memql.git
    cd memql
    make vscode-install                  # VS Code
    make vscode-install EDITOR_CMD=cursor # Cursor

    Choose the install command for your editor. It builds for your host and uses the selected code or cursor CLI. Replaces an existing local MemQL extension.

  2. Reload your editor

    Run Developer: Reload Window, then open a folder of .memql files.

  3. Connect when you need the engine

    Use MemQL: Add Cluster and sign in. Local cluster installation supports Linux x64 and Apple Silicon macOS, with Docker running.

Want only the archive? Run make vscode-package. The script prints the VSIX path. Public registry availability is not assumed here.

Two themes. Your choice.

MemQL Light pairs neutral paper with green accents. MemQL Dark uses brighter charcoal surfaces with mint and amber syntax. In VS Code or Cursor, open Preferences: Color Theme and choose either. The page appearance control changes only this website.

An editor for a broader engine.

MemQL connects typed data, relationships, agent work, automations, integrations, and hosted sites. VS Code and Cursor are where you author. MemQL OS is where you manage the cluster.

Meet MemQL