memql

command module
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 15 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 {
  id          string   @required
  subject     string   @required
  priority    string
  createdAt   datetime @required
}

@enabled
@handler(type="query", query="concept==v1:acme:ticket && ticket.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 development environment (Docker)
docker compose -f docker/docker-compose.full.yml up --build

# Run tests
go test ./...

# Deploy to staging (Google Cloud Run)
gcloud run deploy

Full setup guide: 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
  • SI: 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
  • Automations: Event-driven workflows (.memql files)
  • Functions: Reusable query functions (.memql files)

Environments

Development (Docker)

  • Database: Local PostgreSQL + TimescaleDB container
  • Service: Local memQL container
  • Access: All developers
  • Command: docker compose -f docker/docker-compose.full.yml up --build

Staging (Cloud)

  • Database: TimescaleDB Cloud (Tiger Cloud)
  • Service: Google Cloud Run (us-central1)
  • Access: All developers
  • Command: gcloud run deploy

Production (Cloud)

  • Database: TimescaleDB Cloud (Tiger Cloud) - separate instance
  • Service: Google Cloud Run (production)
  • Access: Senior/Lead developers only
  • Deploy: Automatic via CI/CD on merge to main

Full details: TECH_STACK_AND_PRACTICES.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)
  • gcloud CLI
  • git

Local Development Workflow

  1. Clone repository

    git clone https://github.com/znasllc-io/memql.git
    cd memql
    
  2. Start development environment

    docker compose -f docker/docker-compose.full.yml up --build
    
  3. Make changes and test

    # Edit code
    # ...
    
    # Run tests
    go test ./...
    
    # View logs
    docker compose -f docker/docker-compose.full.yml logs -f
    
  4. Deploy to staging for integration testing

    gcloud run deploy
    
  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/         # SI collaboration
│   └── audio/             # Audio streaming
├── automations/           # MemQL DSL automations (.memql)
├── queries/               # MemQL DSL query functions (.memql)
├── mutations/             # MemQL DSL mutation functions (.memql)
├── specs/                 # MemQL DSL specification predicates (.memql)
├── tools/                 # MemQL DSL SI tool definitions (.memql)
├── docs/                  # Documentation
│   ├── core/              # Architecture, language
│   ├── api/               # API references
│   ├── guides/            # How-to guides
│   └── auth/              # Authentication
├── docker/                # Docker configuration
└── .claude/               # Configuration

Common Commands

Task Command
Start Docker stack docker compose -f docker/docker-compose.full.yml up --build
Stop Docker services docker compose -f docker/docker-compose.full.yml down
Run Go test suite go test ./...
Deploy to staging gcloud run deploy
View container logs docker compose -f docker/docker-compose.full.yml logs -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 ./...

Docker

Development Stack

Full stack with PostgreSQL + TimescaleDB + memQL service:

# Start everything
docker compose -f docker/docker-compose.full.yml up --build

# View logs
docker compose -f docker/docker-compose.full.yml logs -f

# Access database
psql postgres://memql:memql_dev@localhost:5432/memql

# Stop (preserves data)
docker compose -f docker/docker-compose.full.yml down

Documentation: docker/README.md


MemQL Language

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

Example Query

// Find recent utterances in a space
spaceUtterances({
  "spaceId": "space_123",
  "limit": 10
})

Example Automation

@enabled
@trigger(event="graph.node.created.v1:cognition:participant")
@description("Auto-join SI agents to spaces")
func (Automation) autoJoinSI() {
  // Automation logic...
}

Full reference: docs/core/memql.md


Deployment

Staging Environment

# Deploy latest code to staging (Google Cloud Run)
gcloud run deploy

# View logs
gcloud logging read "resource.type=cloud_run_revision AND resource.labels.service_name=memql-anequim" --limit 50

Production Environment

  • Automatic deployment via CI/CD when code is merged to main branch
  • Manual deployment requires production access permissions
  • Always test in staging before deploying to production

Contributing

  1. Read TECH_STACK_AND_PRACTICES.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: QUICKSTART.md
  2. Find documentation: GLOSSARY.md
  3. Tech stack details: TECH_STACK_AND_PRACTICES.md
  4. Component docs: Check directory CLAUDE.md files
  5. Issues: Create GitHub issue

memQL - Time-series memory graph database for SI-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.
Package appprofiles embeds the app-profile markdown files into the compiled binary so every node-type (BFF, cognition, agent, planner) carries them regardless of filesystem layout.
Package appprofiles embeds the app-profile markdown files into the compiled binary so every node-type (BFF, cognition, agent, planner) carries them regardless of filesystem layout.
cmd
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/.
genesis-seal command
Command genesis-seal seals a plaintext .env into the encrypted ~/.memql/genesis.znas envelope that the local cluster (make dev-refresh / docker compose) decrypts at startup.
Command genesis-seal seals a plaintext .env into the encrypted ~/.memql/genesis.znas envelope that the local cluster (make dev-refresh / docker compose) decrypts at startup.
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.
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.
architecture/embedded
Package embedded ships the workspace's architecture model baked into every binary that imports it.
Package embedded ships the workspace's architecture model baked into every binary that imports it.
architecture/extract
Package extract reads a Go workspace (or a single module) and produces a model.Model describing its architecture.
Package extract reads a Go workspace (or a single module) and produces a model.Model describing its architecture.
architecture/model
Package model defines the in-memory and on-disk schema for memQL's architecture graph: the intermediate representation that sits between static analysis of the Go source and the cockpit's diagram renderer.
Package model defines the in-memory and on-disk schema for memQL's architecture graph: the intermediate representation that sits between static analysis of the Go source and the cockpit's diagram renderer.
auth
Package auth provides shared authentication utilities for MemQL.
Package auth provides shared authentication utilities for MemQL.
automations
Package automations provides an automation engine for MemQL.
Package automations provides an automation engine for MemQL.
automations/steps
Package steps provides step executors for the automation engine.
Package steps provides step executors for the automation engine.
bus
config
Package config provides centralized configuration loading from environment variables.
Package config provides centralized configuration loading from environment variables.
database/memory-nodes
Package memoryNodes -- concept_parser.go
Package memoryNodes -- concept_parser.go
events
Package events provides an in-memory pub/sub event bus for MemQL.
Package events provides an in-memory pub/sub event bus for MemQL.
fileprocessor
Package fileprocessor extracts plain text from uploaded file data.
Package fileprocessor extracts plain text from uploaded file data.
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).
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/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.
language/ast
Package ast defines the MemQL Abstract Syntax Tree node types.
Package ast defines the MemQL Abstract Syntax Tree node types.
language/compiler
Package compiler transpiles MemQL AST to various output formats.
Package compiler transpiles MemQL AST to various output formats.
memql
Meta-command dispatch for introspection builtins (help / docs / concepts / validate / functions / tools / serviceVersion / memqlVersion / shapeTemplates / shapeHelp / contentId / previewInsert).
Meta-command dispatch for introspection builtins (help / docs / concepts / validate / functions / tools / serviceVersion / memqlVersion / shapeTemplates / shapeHelp / contentId / previewInsert).
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/baseparser
Package baseparser holds the shared scanning + annotation primitives every dedicated DSL parser (shape / spec / tool / prompt / provider / policy / builtin) embeds via Go struct composition:
Package baseparser holds the shared scanning + annotation primitives every dedicated DSL parser (shape / spec / tool / prompt / provider / policy / builtin) embeds via Go struct composition:
memql/baseregistry
Package baseregistry holds the generic thread-safe name -> *T store every per-construct registry (Function / Tool / Spec / Shape / Prompt / Policy / ...) embeds.
Package baseregistry holds the generic thread-safe name -> *T store every per-construct registry (Function / Tool / Spec / Shape / Prompt / Policy / ...) embeds.
memql/dslfs
Package dslfs provides the runtime indirection between the embedded .memql tree (compiled into every node-type binary via //go:embed) and an optional on-disk override rooted at MEMQL_DSL_PATH.
Package dslfs provides the runtime indirection between the embedded .memql tree (compiled into every node-type binary via //go:embed) and an optional on-disk override rooted at MEMQL_DSL_PATH.
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/liveknowledge
Package liveknowledge owns the runtime dispatch for v1:knowledge:liveSource queries (Phase 5 of the planner-redesign work).
Package liveknowledge owns the runtime dispatch for v1:knowledge:liveSource queries (Phase 5 of the planner-redesign work).
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).
metadata
Package metadata provides contextual metadata collection for memQL nodes.
Package metadata provides contextual metadata collection for memQL nodes.
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.
observe
Package observe is the runtime side of the architecture framework: a thin instrumentation surface call sites use to emit per-invocation records (count, duration, args, result, error) that the cockpit's drill-down view consumes alongside the static topology model.
Package observe is the runtime side of the architecture framework: a thin instrumentation surface call sites use to emit per-invocation records (count, duration, args, result, error) that the cockpit's drill-down view consumes alongside the static topology model.
planner
Package planner houses planner-node-shared types and helpers that the v1 design references but doesn't yet wire into a full async integration.
Package planner houses planner-node-shared types and helpers that the v1 design references but doesn't yet wire into a full async integration.
polyphon
Package polyphon implements the Polyphon multi-agent voice conversation orchestration system.
Package polyphon implements the Polyphon multi-agent voice conversation orchestration system.
provenance
Package provenance defines the engine-stamped "where did this row come from" intrinsic that every v1:* row carries.
Package provenance defines the engine-stamped "where did this row come from" intrinsic that every v1:* row carries.
router
Package router is the memQL SI Router: the single entry point every SI call flows through.
Package router is the memQL SI Router: the single entry point every SI call flows through.
safety
Package safety is the command-classifier foundation: a dependency- free package that defines the risk taxonomy, the normalized `ActionDescriptor` that every execution surface lowers into, the `Classifier` interface, and the central `Gate` choke point that later phases plug enforcement, decisioning, audit, and human approval into.
Package safety is the command-classifier foundation: a dependency- free package that defines the risk taxonomy, the normalized `ActionDescriptor` that every execution surface lowers into, the `Classifier` interface, and the central `Gate` choke point that later phases plug enforcement, decisioning, audit, and human approval into.
safety/approval
Package approval is the DSL-backed implementation of safety.ApprovalSink (memql#232).
Package approval is the DSL-backed implementation of safety.ApprovalSink (memql#232).
safety/llm
Package llm is the semantic-classifier layer (#230) of the command-classifier epic (#226).
Package llm is the semantic-classifier layer (#230) of the command-classifier epic (#226).
safety/recorder
Package recorder is the persistence side of the safety command- classifier observability layer (memql#234).
Package recorder is the persistence side of the safety command- classifier observability layer (memql#234).
secret
Package secret provides authenticated symmetric encryption helpers for memql.
Package secret provides authenticated symmetric encryption helpers for memql.
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.
core
env
httptls
Package httptls provides the HTTP-side companion to core/grpctls: optional TLS for the memQL HTTP server and a CA-overlay HTTP client for nodes that talk to the identity service over an internal (self-signed) CA.
Package httptls provides the HTTP-side companion to core/grpctls: optional TLS for the memQL HTTP server and a CA-overlay HTTP client for nodes that talk to the identity service over an internal (self-signed) CA.
id
Package contentid provides deterministic, content-addressable ID generation.
Package contentid provides deterministic, content-addressable ID generation.
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.
Package integrations provides external service integrations for MemQL.
Package integrations provides external service integrations for MemQL.
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, spaceId)` builtin's executor -- the runtime side of the agents-as-DSL-primitive feature.
Package agents implements the `agent(name, prompt, spaceId)` builtin's executor -- the runtime side of the agents-as-DSL-primitive feature.
audio
Package audio provides audio format utilities for TTS streaming.
Package audio provides audio format utilities for TTS streaming.
auth
Package auth provides an IntegrationProvider for user/group lookup operations.
Package auth provides an IntegrationProvider for user/group lookup operations.
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.
deepgram
Package deepgram implements ASR and TTS providers for the Polyphon voice pipeline backed by Deepgram (Nova-3 streaming WebSocket for ASR; Aura-2 streaming WebSocket for TTS, added in Phase 5 of the Deepgram migration).
Package deepgram implements ASR and TTS providers for the Polyphon voice pipeline backed by Deepgram (Nova-3 streaming WebSocket for ASR; Aura-2 streaming WebSocket for TTS, added in Phase 5 of the Deepgram migration).
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.
gcs
Package gcs provides Google Cloud Storage upload functionality.
Package gcs provides Google Cloud Storage upload functionality.
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:common:documentChunk rows scoped to a v1:common: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:common:documentChunk rows scoped to a v1:common:knowledgeDomain, and cosine similarity retrieval filtered by a set of domain IDs.
liveavatar
Package liveavatar exposes LiveAvatar session management to the MemQL DSL.
Package liveavatar exposes LiveAvatar session management to the MemQL DSL.
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 copresent 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 copresent 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
router
Package router exposes BYOK credential + budget admin capabilities to the memQL DSL so the CoPresent /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 CoPresent /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.
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.
training
Package training implements the per-agent "Train" pipeline invoked by CoPresent's Training panel.
Package training implements the per-agent "Train" pipeline invoked by CoPresent's Training panel.
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
add-imports-to-legacy command
add-imports-to-legacy walks every .memql file under dsl/v1/ outside of concepts/, finds @useConcept(<name>...) annotations, looks up the concept's directory, and prepends an `import (...)` block at the file top with each concept aliased to its bare name.
add-imports-to-legacy walks every .memql file under dsl/v1/ outside of concepts/, finds @useConcept(<name>...) annotations, looks up the concept's directory, and prepends an `import (...)` block at the file top with each concept aliased to its bare name.
audit-import-model command
audit-import-model reports the import-model refactor's per-construct migration status (Commit 2 of dsl-import-model-refactor.md).
audit-import-model reports the import-model refactor's per-construct migration status (Commit 2 of dsl-import-model-refactor.md).
audit-legacy-migration command
audit-legacy-migration walks the new domain-first DSL tree (dsl/<domain>/...) and reads the "Sources:" headers each consolidated file carries (emitted by scripts/restructure-dsl).
audit-legacy-migration walks the new domain-first DSL tree (dsl/<domain>/...) and reads the "Sources:" headers each consolidated file carries (emitted by scripts/restructure-dsl).
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.
migrate-seeds command
migrate-seeds converts all seed.json files to seed.memql format.
migrate-seeds converts all seed.json files to seed.memql format.
policies/cli command
Command policies-lint walks dsl/v1/policies and runs the policy loader against the on-disk tree, surfacing every error the engine would surface at startup.
Command policies-lint walks dsl/v1/policies and runs the policy loader against the on-disk tree, surfacing every error the engine would surface at startup.
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:
restructure-dsl command
restructure-dsl emits the new domain-first DSL tree alongside the old kind-first tree, per the 11 locked decisions in docs/dsl-import-model-refactor.md.
restructure-dsl emits the new domain-first DSL tree alongside the old kind-first tree, per the 11 locked decisions in docs/dsl-import-model-refactor.md.
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/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/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.

Jump to

Keyboard shortcuts

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