memql

command module
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

README

memQL

memQL

AI-native time-series memory graph with a single DSL.
Unifies concepts, queries, agent workflows, and voice into deployable primitives.

CI License Go version Last commit Go Report Card

Designed and built with Claude as co-author.

Status: Alpha / pre-1.0 — not production-ready. memQL is under active development. The DSL, engine API, and wire surface are still evolving; expect breaking changes between commits. Suitable for experimentation, prototyping, and early-design feedback today.


What is memQL?

memQL is a distributed time-series memory graph with its own DSL — a single language for declaring concepts (schemas), queries, mutations, tools, and event-driven automations side-by-side, then executing them across specialized nodes.

It replaces the integration glue AI-native teams typically hand-write — vector store + workflow engine + AI gateway + voice stack — with one deployable primitive. A team that would otherwise stitch together four systems can declare an agent's memory, behavior, and triggers in one DSL file and run them on a memQL cluster.

Why memQL?

Agent and voice deployments today are integration-heavy. Most of the engineering effort is plumbing — keeping state consistent across a vector store, an orchestrator, a tool registry, and a model provider. memQL collapses that plumbing: concepts and queries live in the same place; tools, automations, and workflows reference them directly; the engine handles consistency, time-series storage, and execution.

Example

@version("1.0.0")
@namespace("acme")
concept ticket {
  subject     string   @required
  priority    string   @default("normal")
  status      enum("open", "closed") @default("open")
}

@enabled
@handler(type="query", query="concept==v1:acme:ticket && payload.priority==\"$args.priority\"")
@executionTime("fast")
@description("List tickets by priority")
tool listByPriority {
  priority string @required
}

A concept (schema) and an LLM-callable tool in the same file, same language. Add queries, mutations, or event-driven automations right next to them.


Quick Start

# Start the local cluster (k3d + ArgoCD)
make up

# Run tests
go test ./...

# Deploy to staging (Azure AKS)
make deploy VERSION=X

Full setup guide: docs/public/overview/quickstart.md


Documentation


Tech Stack

Backend

  • Language: Go 1.26.1+
  • Database: PostgreSQL 16 + TimescaleDB
  • API: gRPC (primary) + WebSocket bridge for browsers + HTTP for OAuth callbacks / health / file uploads
  • AI: Centralized provider system (OpenAI, Anthropic) on MemqlService.Stream
  • Auth: in-house identity service (magic-link + JWT, JWKS-published)

Query Language

  • MemQL DSL: Custom query language for time-series graphs
  • Constructs: Concepts, queries, mutations, shapes, specs, tools, prompts, automations -- declared in .memql files under dsl/<namespace>/
  • Automations: Event- and schedule-triggered workflows

Environments

Development (k3d + ArgoCD)

  • Database: PostgreSQL + TimescaleDB pod in the local k3d cluster
  • Service: memQL node pods reconciled by ArgoCD from deploy/k8s/overlays/local
  • Access: All developers
  • Command: make up

Staging (Cloud)

  • Database: TimescaleDB Cloud (Tiger Cloud)
  • Service: Azure Kubernetes Service (AKS, cluster aks-memql-staging)
  • Access: All developers
  • Command: make deploy VERSION=X

Production (Cloud)

  • Database: TimescaleDB Cloud (Tiger Cloud) - separate instance
  • Service: Azure Kubernetes Service (AKS)
  • Access: Senior/Lead developers only
  • Deploy: Promote a validated version (see docs/public/operate/deploy-bundle-runbook.md)

Full details: docs/public/overview/tech-stack.md


Development

Prerequisites

Hardware:

  • macOS with Apple Silicon (M1/M2/M3)
  • MacBook Pro or MacBook Air
  • 16GB RAM minimum (32GB recommended)

Software:

  • Go 1.26.1+ (ARM64 build)
  • Docker Desktop for Mac (Apple Silicon)
  • k3d + kubectl (brew install k3d kubectl)
  • Azure CLI (az) — for staging/prod deploys
  • git

Local Development Workflow

  1. Clone repository

    git clone https://github.com/znasllc-io/memql.git
    cd memql
    
  2. Start the local cluster

    make up
    
  3. Make changes and test

    # Edit code
    # ...
    
    # Rebuild + reload the changed node into k3d
    make dev
    
    # Run tests
    go test ./...
    
    # View logs
    kubectl logs -n memql deploy/bff -f
    
  4. Deploy to staging for integration testing

    make deploy VERSION=X
    
  5. Commit to main (focused commits) or open a feature branch + PR when review is genuinely useful. Stage by explicit path:

    git add path/to/changed.file
    git commit -m "domain: imperative subject"
    git push origin main
    

Project Structure

memQL/
├── main.go                 # Entry point (thin orchestrator)
├── app/                    # Phased service bootstrap
│   ├── app.go             # Build() orchestrator
│   ├── config.go          # Config + auth
│   ├── database.go        # Database + concepts
│   ├── engine.go          # Engine + bus + automations
│   ├── integrations.go    # Integration providers
│   ├── transport.go       # gRPC + HTTP + WebSocket
│   ├── cluster.go         # Distributed node bootstrap
│   └── adapters.go        # Engine adapter types
├── component/              # Go service components
│   ├── memql/             # Core query engine
│   ├── database/          # Database providers
│   ├── server/            # HTTP/WebSocket servers
│   └── auth/              # Authentication
├── integrations/          # External service integrations
│   ├── cognition/         # AI collaboration
│   └── audio/             # Audio streaming
├── dsl/                   # The MemQL DSL tree (one directory per namespace)
│   ├── cognition/         # e.g. concepts.memql, queries.memql, mutations.memql,
│   │                      #      tools.memql, automations.memql, ... per namespace
│   ├── identity/
│   ├── _reference/        # Authoring reference skeletons (not loaded)
│   └── ...
├── docs/                  # Documentation
│   ├── public/            # Published docs (overview, concepts, language, ai,
│   │                      #      build, operate) -- rendered on memql.io
│   └── internal/          # Design records, plans, internal runbooks
├── deploy/k8s/            # Kustomize manifests (base + overlays/local|staging|prod)
└── .claude/               # Configuration

Common Commands

Task Command
Start local cluster make up
Tear down cluster make down
Inner-loop rebuild + reload make dev [NODE=<type>]
Run Go test suite go test ./...
Deploy to staging make deploy VERSION=X
View pod logs kubectl logs -n memql deploy/<node> -f
Database shell psql postgres://memql:memql_dev@localhost:5432/memql

Authentication

Every environment authenticates against the in-house identity service (component/identity):

  • Magic-link sign-in (no passwords)
  • OAuth-style code exchange for SPAs (/oauth/token)
  • JWKS-published EdDSA signing keys (/.well-known/jwks.json)
  • Role-based access control (RBAC) per v1:identity:user.role
  • Centralized user / partition-access management at /admin/

Developer access:

  • Development: All developers (own machine)
  • Staging: All developers (shared testing)
  • Production: Senior/Lead developers only (live system)

Testing

# Run all tests
go test ./...

# Run specific package tests
go test -v ./component/memql/...

# Run with coverage
go test -cover ./...

Local Cluster (k3d + ArgoCD)

Full stack with PostgreSQL + TimescaleDB + memQL node pods, reconciled by ArgoCD from deploy/k8s/overlays/local:

# Bootstrap (cluster + ArgoCD + seeded secrets)
make up

# View pod logs
kubectl logs -n memql deploy/bff -f

# Access database (via the k3d postgres port-forward)
psql postgres://memql:memql_dev@localhost:5432/memql

# Tear down
make down

Documentation: docs/public/operate/reproduce-staging-locally.md


MemQL Language

MemQL DSL is a domain-specific query language for time-series memory graphs.

Example Query

// Find active human participants in a space
activeHumanParticipants({
  "spaceId": "space_123"
})

Example Automation

@enabled
@trigger(event="node.created", concept="v1:cognition:space", partition="*")
@description("On space creation, auto-join the creator's assistant")
automation autoJoinSI {
  step run {
    logic autoJoinSI { event: event }
  }
}

Full reference: docs/public/language/memql.md


Deployment

memQL runs on Azure Kubernetes Service (AKS). Deploy to staging with make deploy VERSION=X (scripts/deploy/aks-deploy.sh); production promotes a validated version.

See docs/public/operate/deploy-bundle-runbook.md for deploy/topology (cluster aks-memql-staging, ACR acrmemql.azurecr.io, Tiger Cloud DB, the migration + smoke gates, and the staging → prod promotion flow).


Contributing

  1. Read docs/public/overview/tech-stack.md
  2. Make changes and test in development environment (go test ./...)
  3. Deploy to staging for integration testing
  4. Commit directly to main for focused changes, or open a PR when review is useful
  5. Stage files by explicit path (git add <file>)

Git workflow: Single long-lived main branch. Pre-release: no backwards-compat shims; fix both memQL and the consumer at once.


License

Apache License 2.0 — see LICENSE.


Need Help?

  1. Quick start: docs/public/overview/quickstart.md
  2. Find documentation: GLOSSARY.md
  3. Tech stack details: docs/public/overview/tech-stack.md
  4. Component docs: Check directory CLAUDE.md files
  5. Issues: Create GitHub issue

memQL - Time-series memory graph database for AI-powered collaboration

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package app implements the phased bootstrap for the memQL service.
Package app implements the phased bootstrap for the memQL service.
cmd
action-upgrade command
Command action-upgrade is the Phase 5 verified upgrade-migration tool for the action library (#1740, epic #1734).
Command action-upgrade is the Phase 5 verified upgrade-migration tool for the action library (#1740, epic #1734).
admin-preview command
Command admin-preview renders every templ-backed admin page with representative mock data and writes the resulting HTML into /tmp/admin-preview/.
Command admin-preview renders every templ-backed admin page with representative mock data and writes the resulting HTML into /tmp/admin-preview/.
deploy-gate-check command
Command deploy-gate-check is the in-cluster deploy-gate client (deployment-v2 Phase 3, znasllc-io/memql#701/#712).
Command deploy-gate-check is the in-cluster deploy-gate client (deployment-v2 Phase 3, znasllc-io/memql#701/#712).
docs-gen command
docs-gen emits the machine-generated reference for the documentation bundle: a concept catalog derived from the live DSL.
docs-gen emits the machine-generated reference for the documentation bundle: a concept catalog derived from the live DSL.
envscan command
Command envscan is the shared env-var classifier for Epic 7 (memql#2103).
Command envscan is the shared env-var classifier for Epic 7 (memql#2103).
envscan/scan
Package scan is the reusable core of the env-var classifier for Epic 7 (memql#2103).
Package scan is the reusable core of the env-var classifier for Epic 7 (memql#2103).
genesis-seal command
Command genesis-seal seals a plaintext .env into the encrypted ~/.memql/genesis.znas envelope that the local k3d cluster decrypts into k8s Secrets at `make up` (scripts/k3d/seed-secrets.sh).
Command genesis-seal seals a plaintext .env into the encrypted ~/.memql/genesis.znas envelope that the local k3d cluster decrypts into k8s Secrets at `make up` (scripts/k3d/seed-secrets.sh).
harness-eval command
harness-eval runs the MemQL-native agent harness eval scaffold (#589): a fixed set of task fixtures driven through the harness reconciler over an in-memory graph (no Postgres, no LLM), scored on task success, step count, tool-call count, token cost, and wall-clock, then checked against a regression threshold.
harness-eval runs the MemQL-native agent harness eval scaffold (#589): a fixed set of task fixtures driven through the harness reconciler over an in-memory graph (no Postgres, no LLM), scored on task success, step count, tool-call count, token cost, and wall-clock, then checked against a regression threshold.
healthcheck command
Package main provides a minimal health check binary for distroless containers.
Package main provides a minimal health check binary for distroless containers.
memql-arch command
memql-arch walks a Go workspace and emits a topology.model.json describing its architecture: cluster, services, packages, types, and the relationships between them.
memql-arch walks a Go workspace and emits a topology.model.json describing its architecture: cluster, services, packages, types, and the relationships between them.
memql-lsp command
Command memql-lsp is the MemQL offline Language Server: a standalone binary that speaks LSP over stdio and serves .memql files from disk, with no cluster and no auth (handoff Part I §4).
Command memql-lsp is the MemQL offline Language Server: a standalone binary that speaks LSP over stdio and serves .memql files from disk, with no cluster and no auth (handoff Part I §4).
memql-lsp/internal/grammar
Package grammar generates the baseline TextMate grammar (memql.tmLanguage.json) for .memql files from the machine-readable DSL spec (component/language/dslspec) -- the same source of truth MemQL Sense projects from.
Package grammar generates the baseline TextMate grammar (memql.tmLanguage.json) for .memql files from the machine-readable DSL spec (component/language/dslspec) -- the same source of truth MemQL Sense projects from.
memql-lsp/internal/position
Package position converts between LSP and MemQL Sense coordinate systems -- the single most likely source of bugs in the language server (handoff §4), so it is isolated here and gated by table-driven round-trip tests.
Package position converts between LSP and MemQL Sense coordinate systems -- the single most likely source of bugs in the language server (handoff §4), so it is isolated here and gated by table-driven round-trip tests.
memqlfmt command
memqlfmt is the canonical formatter for MemQL source files.
memqlfmt is the canonical formatter for MemQL source files.
memqllint command
memqllint runs the same DSL-load + diagnostic pipeline the engine runs at startup, on demand against a .memql file or a whole DSL root.
memqllint runs the same DSL-load + diagnostic pipeline the engine runs at startup, on demand against a .memql file or a whole DSL root.
memqlmigrate command
memqlmigrate applies named syntax rewrites to MemQL source files.
memqlmigrate applies named syntax rewrites to MemQL source files.
component
actions
Package actions is the registry + runtime for AUTHORED actions (memql#2218, behavioral-constructs ADR §2.3).
Package actions is the registry + runtime for AUTHORED actions (memql#2218, behavioral-constructs ADR §2.3).
actions/capability
Package capability is the authoritative registry of the action-construct capability vocabulary and its side-effect classification (memql#2219, behavioral-constructs ADR §2.3 + §3 + §7).
Package capability is the authoritative registry of the action-construct capability vocabulary and its side-effect classification (memql#2219, behavioral-constructs ADR §2.3 + §3 + §7).
automations
budget.go
budget.go
automations/steps
Package steps provides step executors for the automation engine.
Package steps provides step executors for the automation engine.
database/dbtest
Package dbtest provides shared setup for the Postgres-gated ("*_db_test.go") suites that CI runs together in the db-tests lane (.github/workflows/ci.yml) against ONE shared database.
Package dbtest provides shared setup for the Postgres-gated ("*_db_test.go") suites that CI runs together in the db-tests lane (.github/workflows/ci.yml) against ONE shared database.
database/memory-nodes
Package memoryNodes -- concept_parser.go
Package memoryNodes -- concept_parser.go
deploycontrol
capability_result.go is the Go side of the capability-script contract (docs/internal/design/capability-script-contract.md, znasllc-io/memql#2221).
capability_result.go is the Go side of the capability-script contract (docs/internal/design/capability-script-contract.md, znasllc-io/memql#2221).
genesis
Package genesis owns the .env -> genesis.znas orchestration: reads a developer's .env, validates it against memql's manifest, and seals the result into an encrypted envelope under MEMQL_MASTER_KEY.
Package genesis owns the .env -> genesis.znas orchestration: reads a developer's .env, validates it against memql's manifest, and seals the result into an encrypted envelope under MEMQL_MASTER_KEY.
harness
Package harness holds the MemQL-native agent harness control plane (epic #590).
Package harness holds the MemQL-native agent harness control plane (epic #590).
harness/actionpin
Package actionpin implements Phase 5 of the action library (#1740, epic #1734): version pinning of action references and the verified upgrade migration.
Package actionpin implements Phase 5 of the action library (#1740, epic #1734): version pinning of action references and the verified upgrade migration.
harness/actionplan
Package actionplan implements Phase 3 retrieval-augmented composition for the action library (#1738, epic #1734): the planner's per-sub-goal decision against the action library, mirroring the agent route/upgrade/provision thresholds one level down (over actions instead of agents).
Package actionplan implements Phase 3 retrieval-augmented composition for the action library (#1738, epic #1734): the planner's per-sub-goal decision against the action library, mirroring the agent route/upgrade/provision thresholds one level down (over actions instead of agents).
harness/actionreplay
Package actionreplay implements Phase 1 literal replay for the action library (#1736, epic #1734): re-executing the concrete capability calls a minted action recorded, with no LLM, keyed on an input fingerprint and gated by a result fingerprint.
Package actionreplay implements Phase 1 literal replay for the action library (#1736, epic #1734): re-executing the concrete capability calls a minted action recorded, with no LLM, keyed on an input fingerprint and gated by a result fingerprint.
harness/actiontrace
Package actiontrace implements Phase 0 trace capture for the action library (#1735, epic #1734): deriving value + resource provenance from the ordered capability calls an LLM step performed.
Package actiontrace implements Phase 0 trace capture for the action library (#1735, epic #1734): deriving value + resource provenance from the ordered capability calls an LLM step performed.
harness/actiontrust
Package actiontrust implements Phase 4 of the action library (#1739, epic #1734): the surface-aware trust gate and the reliability lifecycle that decides when a minted action is safe to offer for replay.
Package actiontrust implements Phase 4 of the action library (#1739, epic #1734): the surface-aware trust gate and the reliability lifecycle that decides when a minted action is safe to offer for replay.
harness/parambind
Package parambind implements Phase 3 automatic parameterization for the action library (#1738, epic #1734): replaying a minted action on VARYING input by binding each captured arg from the current step input, rather than replaying the literal recorded args (Phase 1).
Package parambind implements Phase 3 automatic parameterization for the action library (#1738, epic #1734): replaying a minted action on VARYING input by binding each captured arg from the current step input, rather than replaying the literal recorded args (Phase 1).
harness/surfaceresolver
Package surfaceresolver implements Phase 2 of the action library (#1737, epic #1734): binding an abstract capability to a concrete execution surface at replay time, and the resource-coupling correctness constraint (decision A) that keeps coupled actions in one world.
Package surfaceresolver implements Phase 2 of the action library (#1737, epic #1734): binding an abstract capability to a concrete execution surface at replay time, and the resource-coupling correctness constraint (decision A) that keeps coupled actions in one world.
identity
Package identity implements the in-house identity service — the authentication provider for the cluster.
Package identity implements the in-house identity service — the authentication provider for the cluster.
identity/abuse
Package abuse implements the anti-abuse middleware stack for the identity service.
Package abuse implements the anti-abuse middleware stack for the identity service.
identity/admin
Package admin hosts the operator-facing admin web app for the identity service.
Package admin hosts the operator-facing admin web app for the identity service.
identity/badge
Package badge implements registered operator badges for shared terminals (memql#2513).
Package badge implements registered operator badges for shared terminals (memql#2513).
identity/emailsender
Package emailsender bridges the identity service's magic-link issuer to the engine-resident email integration plug-in.
Package emailsender bridges the identity service's magic-link issuer to the engine-resident email integration plug-in.
identity/http
Package http hosts the HTTP handlers identity binaries serve.
Package http hosts the HTTP handlers identity binaries serve.
identity/magiclink
Package magiclink owns the issuance and verification of magic-link tokens.
Package magiclink owns the issuance and verification of magic-link tokens.
identity/pat
Package pat implements Personal Access Tokens for CLI clients.
Package pat implements Personal Access Tokens for CLI clients.
identity/refresh
Package refresh implements the /auth/refresh endpoint.
Package refresh implements the /auth/refresh endpoint.
identity/registration
Package registration owns the policy decisions that fire when a previously-unknown email shows up at /auth/magic-link.
Package registration owns the policy decisions that fire when a previously-unknown email shows up at /auth/magic-link.
identity/verifier
Package verifier holds the per-node JWT verifier that bff, voice, cognition, agent, and planner binaries use to validate access tokens minted by the identity service.
Package verifier holds the per-node JWT verifier that bff, voice, cognition, agent, and planner binaries use to validate access tokens minted by the identity service.
identity/web
Package web hosts the public-facing identity web app: login form, check-email page, magic-link landing page, error page, first-run wizard, legal markdown, and the per-user /me/* dashboard.
Package web hosts the public-facing identity web app: login form, check-email page, magic-link landing page, error page, first-run wizard, legal markdown, and the per-user /me/* dashboard.
identity/web/templ
templ: version: v0.3.1020
templ: version: v0.3.1020
identity/workerpairing
Package workerpairing implements short-lived pairing codes for the computer-use enrollment flow.
Package workerpairing implements short-lived pairing codes for the computer-use enrollment flow.
identity/workertoken
Package workertoken implements credentials for the workers (computer-use) feature.
Package workertoken implements credentials for the workers (computer-use) feature.
inbound
Package inbound implements the engine's inbound-delivery receiver (memql#2957): a signature-verifying webhook endpoint that stages v1:platform:inboundRequest rows which product DSL then drains with an ordinary automation.
Package inbound implements the engine's inbound-delivery receiver (memql#2957): a signature-verifying webhook endpoint that stages v1:platform:inboundRequest rows which product DSL then drains with an ordinary automation.
language/compiler
Package compiler transpiles MemQL AST to various output formats.
Package compiler transpiles MemQL AST to various output formats.
language/dslspec
Package dslspec is the single machine-readable source of truth for the memQL DSL authoring surface: the top-level constructs an author may write, the keywords / operators / field-types the grammar accepts, the annotations each construct allows, and the "legal-next" rules that drive context-aware completion.
Package dslspec is the single machine-readable source of truth for the memQL DSL authoring surface: the top-level constructs an author may write, the keywords / operators / field-types the grammar accepts, the annotations each construct allows, and the "legal-next" rules that drive context-aware completion.
language/pagination
Package pagination is the single source of truth for memQL's pagination authoring rule (epic 5, issue 5.1 / memql#1965).
Package pagination is the single source of truth for memQL's pagination authoring rule (epic 5, issue 5.1 / memql#1965).
mcp
Package mcp implements the memQL MCP (Model Context Protocol) server -- the protocol head that lets external MCP hosts (Claude Desktop / Claude Code and others) talk to a memQL deployment's tool surface.
Package mcp implements the memQL MCP (Model Context Protocol) server -- the protocol head that lets external MCP hosts (Claude Desktop / Claude Code and others) talk to a memQL deployment's tool surface.
memql
ai_guard.go
ai_guard.go
memql/baseloader
Package baseloader holds the generic walk-and-register pipeline every unified loader uses: read all .memql files in the DSL tree, extract per-keyword slices, parse each slice via the per-construct parser, and register the result through a supplied callback.
Package baseloader holds the generic walk-and-register pipeline every unified loader uses: read all .memql files in the DSL tree, extract per-keyword slices, parse each slice via the per-construct parser, and register the result through a supplied callback.
memql/callgraph
Package callgraph enforces the behavioral DSL call-graph contract from the ADR (docs/internal/design/dsl-behavioral-constructs-adr.md, §2):
Package callgraph enforces the behavioral DSL call-graph contract from the ADR (docs/internal/design/dsl-behavioral-constructs-adr.md, §2):
memql/dslimports
Package dslimports is the integration layer that ties the parser, the path resolver, and the import-graph machinery together into one entry point the engine + validator CLI call.
Package dslimports is the integration layer that ties the parser, the path resolver, and the import-graph machinery together into one entry point the engine + validator CLI call.
memql/sense
Package sense provides the MemQL Sense language service -- syntax highlighting, autocompletion, diagnostics, hover info, and signature help for .memql files.
Package sense provides the MemQL Sense language service -- syntax highlighting, autocompletion, diagnostics, hover info, and signature help for .memql files.
memql/taskstamp
Package taskstamp owns the engine-side auto-stamping of v1:planner:task rows on every agent tool call (Q5 + Q6 in the planner-redesign brainstorm).
Package taskstamp owns the engine-side auto-stamping of v1:planner:task rows on every agent tool call (Q5 + Q6 in the planner-redesign brainstorm).
node
Package node provides the distributed node identity, peer management, and NodeService gRPC server for inter-node communication in a memQL cluster.
Package node provides the distributed node identity, peer management, and NodeService gRPC server for inter-node communication in a memQL cluster.
outbound
Package outbound implements the engine-drained outbound-delivery worker (memql#2521): products stage v1:platform:outboundRequest rows from pure DSL; this worker drains pending/retrying rows, performs the delivery through deploy-configured transports (email / webhook), and stamps status transitions back onto the rows.
Package outbound implements the engine-drained outbound-delivery worker (memql#2521): products stage v1:platform:outboundRequest rows from pure DSL; this worker drains pending/retrying rows, performs the delivery through deploy-configured transports (email / webhook), and stamps status transitions back onto the rows.
router
Package router is the memQL AI Router: the single entry point every AI call flows through.
Package router is the memQL AI Router: the single entry point every AI call flows through.
server
Package server implements memQL's HTTP surface: the documented exceptions to the gRPC-first endpoint policy (health probes, WebSocket upgrades, file uploads, inbound webhooks) plus the middleware they share.
Package server implements memQL's HTTP surface: the documented exceptions to the gRPC-first endpoint policy (health probes, WebSocket upgrades, file uploads, inbound webhooks) plus the middleware they share.
server/audiows
Package audiows provides a WebSocket handler for real-time audio streaming and speech-to-text transcription in MemQL spaces.
Package audiows provides a WebSocket handler for real-time audio streaming and speech-to-text transcription in MemQL spaces.
server/polyphonws
Package polyphonws provides HTTP handlers for the Polyphon multi-agent voice system.
Package polyphonws provides HTTP handlers for the Polyphon multi-agent voice system.
worker
Package worker hosts the WorkerService gRPC surface and the in-memory registry of connected memql-cockpit workers.
Package worker hosts the WorkerService gRPC surface and the in-memory registry of connected memql-cockpit workers.
architecture module
auth module
bus module
bus/gen module
compose module
config module
envregistry module
events module
fileprocessor module
frontdoor module
grpc/gen module
healing module
language/ast module
metadata module
metrics module
node/gen module
observe module
planner module
polyphon module
provenance module
safety module
secret module
skills module
work module
workjournal module
core module
Package dsl is the unified embed surface for the new domain-first .memql tree.
Package dsl is the unified embed surface for the new domain-first .memql tree.
examples
deploypack
Package deploypack is the memQL DEPLOY PACK (Epic 2 / #2095) -- the dogfood pack that packages memQL's own deployment workflow as a memQL pack.
Package deploypack is the memQL DEPLOY PACK (Epic 2 / #2095) -- the dogfood pack that packages memQL's own deployment workflow as a memQL pack.
referencepack
Package referencepack is the minimal REFERENCE PACK for the memQL pack model (epic 2, issue 2.5).
Package referencepack is the minimal REFERENCE PACK for the memQL pack model (epic 2, issue 2.5).
Package integrations provides external service integrations for MemQL.
Package integrations provides external service integrations for MemQL.
actionsearch
Package actionsearch exposes the `searchActions` DSL builtin (#1758, epic #1734): a pgvector cosine search over the action library's `intent` embeddings, so the planner can find a reusable action for a sub-goal before reasoning it from scratch.
Package actionsearch exposes the `searchActions` DSL builtin (#1758, epic #1734): a pgvector cosine search over the action library's `intent` embeddings, so the planner can find a reusable action for a sub-goal before reasoning it from scratch.
agent
Package agent hosts the agent-node reply pipeline: prompt rendering, the bounded tool-calling loop, and the non-streaming fallback.
Package agent hosts the agent-node reply pipeline: prompt rendering, the bounded tool-calling loop, and the non-streaming fallback.
agentdef
Package agentdef is the single, modality-independent projection of an agent's generation definition.
Package agentdef is the single, modality-independent projection of an agent's generation definition.
agents
Package agents implements the `agent(name, prompt, partitionId)` builtin's executor -- the runtime side of the agents-as-DSL-primitive feature.
Package agents implements the `agent(name, prompt, partitionId)` builtin's executor -- the runtime side of the agents-as-DSL-primitive feature.
auth
Package auth provides an IntegrationProvider for user/group lookup operations.
Package auth provides an IntegrationProvider for user/group lookup operations.
avatardirect
Package avatardirect exposes the direct/Guide avatar session to the MemQL DSL for the cloud-engine avatar vendors -- Anam (avatar bring-up, #291) and Simli (memql#782).
Package avatardirect exposes the direct/Guide avatar session to the MemQL DSL for the cloud-engine avatar vendors -- Anam (avatar bring-up, #291) and Simli (memql#782).
azureblob
Package azureblob provides Azure Blob Storage upload functionality.
Package azureblob provides Azure Blob Storage upload functionality.
chat
Package chat backs the `recentChat` tool: the assistant's read-only window into the space's single utterance stream plus space metadata.
Package chat backs the `recentChat` tool: the assistant's read-only window into the space's single utterance stream plus space metadata.
cognition
Package cognition provides the cognition integration for MemQL.
Package cognition provides the cognition integration for MemQL.
dailyspace
Package dailyspace owns the platform-driven lifecycle of per-user daily spaces: a one-per-user-per-day v1:cognition:space row that the user implicitly drops into when they open the app, the designated landing surface for ad-hoc conversation with their assistant.
Package dailyspace owns the platform-driven lifecycle of per-user daily spaces: a one-per-user-per-day v1:cognition:space row that the user implicitly drops into when they open the app, the designated landing surface for ad-hoc conversation with their assistant.
database
Package database provides a database management IntegrationProvider.
Package database provides a database management IntegrationProvider.
deployversion
Package deployversion exposes pure version-arithmetic as a DSL-callable, READ-ONLY integration capability.
Package deployversion exposes pure version-arithmetic as a DSL-callable, READ-ONLY integration capability.
email
Package email is a minimal outbound-mail helper used by memQL for transactional messages (currently just guest invites).
Package email is a minimal outbound-mail helper used by memQL for transactional messages (currently just guest invites).
embedding
Package embedding provides an IntegrationProvider that exposes vector embedding capabilities to the MemQL DSL.
Package embedding provides an IntegrationProvider that exposes vector embedding capabilities to the MemQL DSL.
harnessrecall
Package harnessrecall exposes the `recall` DSL operator -- the MemQL-native hybrid recency x relevance memory query (#585, epic #590).
Package harnessrecall exposes the `recall` DSL operator -- the MemQL-native hybrid recency x relevance memory query (#585, epic #590).
harnesstrace
Package harnesstrace exposes the `harnessTrace` DSL/SDK builtin -- the history-over-gRPC contract a remote client (the memql-cockpit CLI) calls to fetch a plan's full execution timeline (issue memql-cockpit#142, phase 1; epic #590).
Package harnesstrace exposes the `harnessTrace` DSL/SDK builtin -- the history-over-gRPC contract a remote client (the memql-cockpit CLI) calls to fetch a plan's full execution timeline (issue memql-cockpit#142, phase 1; epic #590).
identity
Package identity provides an IntegrationProvider for delegation management.
Package identity provides an IntegrationProvider for delegation management.
knowledge
Package knowledge provides retrieval-augmented generation primitives for agents: chunking + embedding text into v1:knowledge:documentChunk rows scoped to a v1:knowledge:knowledgeDomain, and cosine similarity retrieval filtered by a set of domain IDs.
Package knowledge provides retrieval-augmented generation primitives for agents: chunking + embedding text into v1:knowledge:documentChunk rows scoped to a v1:knowledge:knowledgeDomain, and cosine similarity retrieval filtered by a set of domain IDs.
library
Package library owns the server-side edit path for Library documents: the append-only version history (v1:library:documentVersion) and the user / assistant / restore flows that append to it (memql#1228-1231).
Package library owns the server-side edit path for Library documents: the append-only version history (v1:library:documentVersion) and the user / assistant / restore flows that append to it (memql#1228-1231).
liveknowledge
Package liveknowledge exposes Live Knowledge dispatch as a DSL-callable capability (Phase 5 of the planner-redesign work).
Package liveknowledge exposes Live Knowledge dispatch as a DSL-callable capability (Phase 5 of the planner-redesign work).
openai
Package openai implements OpenAI ASR and TTS clients for the Polyphon multi-agent voice system.
Package openai implements OpenAI ASR and TTS clients for the Polyphon multi-agent voice system.
openairealtime
Package openairealtime exposes OpenAI Realtime ephemeral client-secret minting to the MemQL DSL, so the browser can open a DIRECT browser<->OpenAI Realtime WebRTC session (the v2 voice path; see the frontend repo's docs/openai_agents_sdk/realtime-v2-direct-webrtc-handoff.md) WITHOUT ever seeing the standing OpenAI API key.
Package openairealtime exposes OpenAI Realtime ephemeral client-secret minting to the MemQL DSL, so the browser can open a DIRECT browser<->OpenAI Realtime WebRTC session (the v2 voice path; see the frontend repo's docs/openai_agents_sdk/realtime-v2-direct-webrtc-handoff.md) WITHOUT ever seeing the standing OpenAI API key.
planner
agent_loop.go
agent_loop.go
rbac
Package rbac exposes the relational governance decision (component/auth/rbac_governance.go) to the MemQL DSL as builtin capabilities.
Package rbac exposes the relational governance decision (component/auth/rbac_governance.go) to the MemQL DSL as builtin capabilities.
router
Package router exposes BYOK credential + budget admin capabilities to the memQL DSL so the frontend's /router/settings page can add, rotate, and delete API keys and budgets without the plaintext ever being persisted.
Package router exposes BYOK credential + budget admin capabilities to the memQL DSL so the frontend's /router/settings page can add, rotate, and delete API keys and budgets without the plaintext ever being persisted.
similarity
Package similarity exposes the `similarTo` DSL operator backed by pgvector.
Package similarity exposes the `similarTo` DSL operator backed by pgvector.
stt
Package stt provides speech-to-text provider interfaces and implementations for real-time audio transcription in MemQL.
Package stt provides speech-to-text provider interfaces and implementations for real-time audio transcription in MemQL.
telephony
Package telephony provides carrier-agnostic PSTN number + trunk management for memQL voice agents.
Package telephony provides carrier-agnostic PSTN number + trunk management for memQL voice agents.
telephony/telnyx
Package telnyx implements the telephony.CarrierProvider over the Telnyx v2 REST API: DID search / purchase / release / inbound-routing.
Package telnyx implements the telephony.CarrierProvider over the Telnyx v2 REST API: DID search / purchase / release / inbound-routing.
timeutil
Package timeutil exposes thin time + timezone helpers as DSL-callable integration capabilities.
Package timeutil exposes thin time + timezone helpers as DSL-callable integration capabilities.
voice
Package voice owns the canonical voice catalog and the gender-bucketed auto-assignment + provider-resolution path used by Polyphon and the agent reply pipeline.
Package voice owns the canonical voice catalog and the gender-bucketed auto-assignment + provider-resolution path used by Polyphon and the agent reply pipeline.
voice/agent
Package agent is the Go voice-agent: the media participant that joins a LiveKit room on behalf of a memQL space's General Assistant, opens a MemqlService.Stream gRPC session, and runs the turn-taking / STT / TTS orchestration that the retired Python voice-agent (LiveKit Agents 1.5) used to own.
Package agent is the Go voice-agent: the media participant that joins a LiveKit room on behalf of a memQL space's General Assistant, opens a MemqlService.Stream gRPC session, and runs the turn-taking / STT / TTS orchestration that the retired Python voice-agent (LiveKit Agents 1.5) used to own.
workbench
Package workbench implements the agent-node-side handler for the workbenchHost tool.
Package workbench implements the agent-node-side handler for the workbenchHost tool.
scripts
audit-pagination command
audit-pagination enumerates every list-returning query in the DSL tree and reports how each is bounded -- the pagination authoring rule audit (epic 5, issue 5.1 / memql#1965).
audit-pagination enumerates every list-returning query in the DSL tree and reports how each is bounded -- the pagination authoring rule audit (epic 5, issue 5.1 / memql#1965).
ci
Package ci hosts the static guards that verify this repository's CI configuration is what it claims to be.
Package ci hosts the static guards that verify this repository's CI configuration is what it claims to be.
cidb
Package cidb holds the CI drift gate for the db-tests lane (memql#2886).
Package cidb holds the CI drift gate for the db-tests lane (memql#2886).
citags
Package citags holds the CI drift gate for build-tagged test suites (memql#2903).
Package citags holds the CI drift gate for build-tagged test suites (memql#2903).
cluster/rolling-drain command
Command rolling-drain sends a single operator maintenance/drain trigger (memql#1270) to ONE target node and prints the typed result as JSON.
Command rolling-drain sends a single operator maintenance/drain trigger (memql#1270) to ONE target node and prints the typed result as JSON.
dedupe-peruser-seeds command
dedupe-peruser-seeds is a one-shot data migration that cleans up the duplicate per-user seed rows created by pre-PR-#274 cluster boots, where the seed materializer minted fresh random UUIDs for every concurrent startup-sweep racer instead of the documented deterministic `<seedName>-<userId>` id.
dedupe-peruser-seeds is a one-shot data migration that cleans up the duplicate per-user seed rows created by pre-PR-#274 cluster boots, where the seed materializer minted fresh random UUIDs for every concurrent startup-sweep racer instead of the documented deterministic `<seedName>-<userId>` id.
migrate-concepts command
migrate-concepts reads all JSON-based concept definitions and generates concept.memql files.
migrate-concepts reads all JSON-based concept definitions and generates concept.memql files.
migrations/construct_invocation command
Command construct_invocation migrates the authored .memql tree from the legacy call forms to the kind-prefixed construct-invocation forms introduced in Story 2 (#2324) of epic #2322.
Command construct_invocation migrates the authored .memql tree from the legacy call forms to the kind-prefixed construct-invocation forms introduced in Story 2 (#2324) of epic #2322.
migrations/event_payload_args command
Command event_payload_args is the G5 (memql#2367 / event-payload-binding ADR Decision 6) tree migrator: for every FULL-FORM event-triggered automation it
Command event_payload_args is the G5 (memql#2367 / event-payload-binding ADR Decision 6) tree migrator: for every FULL-FORM event-triggered automation it
restructure-by-construct command
scripts/restructure-by-construct/main.go reorganises dsl/<domain>/*.memql so that each construct kind lives in its own file:
scripts/restructure-by-construct/main.go reorganises dsl/<domain>/*.memql so that each construct kind lives in its own file:
sdk-gen command
sdk-gen is the thin CLI wrapper over the importable generator package (sdk/gen).
sdk-gen is the thin CLI wrapper over the importable generator package (sdk/gen).
secrets command
scripts/secrets is a slim operator tool invoked internally by memQL's dev-refresh flow.
scripts/secrets is a slim operator tool invoked internally by memQL's dev-refresh flow.
sdk
gen
Package gen is the importable core of the typed-SDK generator.
Package gen is the importable core of the typed-SDK generator.
go/authoring
Package authoring is the Go SDK surface for memQL's authoring operations -- the cockpit-facing way to VALIDATE and SESSION-DEFINE a user "bundle" (a set of .memql sources) over the engine's gRPC stream (issue memql#2128 / C1).
Package authoring is the Go SDK surface for memQL's authoring operations -- the cockpit-facing way to VALIDATE and SESSION-DEFINE a user "bundle" (a set of .memql sources) over the engine's gRPC stream (issue memql#2128 / C1).
go/client
Package client is the canonical Go SDK for talking to a memQL cluster.
Package client is the canonical Go SDK for talking to a memQL cluster.
go/dslspec
Package dslspec is the Go SDK surface for the memQL DSL spec export -- the portable, versioned JSON form of the DSL authoring surface (the top-level constructs, keywords, operators, field types, per-construct annotation legality, and "legal-next" completion rules).
Package dslspec is the Go SDK surface for the memQL DSL spec export -- the portable, versioned JSON form of the DSL authoring surface (the top-level constructs, keywords, operators, field types, per-construct annotation legality, and "legal-next" completion rules).
go/pack
Package pack is the Go SDK surface for the memQL pack browser -- the read-only enumeration of a node's embedded + plugin-registered .memql tree.
Package pack is the Go SDK surface for the memQL pack browser -- the read-only enumeration of a node's embedded + plugin-registered .memql tree.
go/sense
Package sense is the Go SDK surface for memQL Sense -- the language-intelligence service that powers editor affordances over .memql source: syntax tokens, diagnostics, autocompletion, hover docs, and signature help.
Package sense is the Go SDK surface for memQL Sense -- the language-intelligence service that powers editor affordances over .memql source: syntax tokens, diagnostics, autocompletion, hover docs, and signature help.
go/voice
Package voice is the SDK's voice subpackage.
Package voice is the SDK's voice subpackage.
go/worker
Package worker is the SDK's worker subpackage.
Package worker is the SDK's worker subpackage.
test
conformance
Package conformance is the automated MCP conformance suite (memql#1715), the capstone regression gate for epic #1704.
Package conformance is the automated MCP conformance suite (memql#1715), the capstone regression gate for epic #1704.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL