docsThe language

Reference

This is the exhaustive enumeration layer of the memQL documentation: the dense, grouped lists that the conceptual and how-to docs point into. It catalogs every concept (the schemas), every tool (the SI-callable surface), every provider (the SI vendor/model records), every routing policy, and every builtin (Go-backed DSL functions) currently shipped in the dsl/ tree of the public memQL repository.

This is the most drift-prone document in the set. It is a hand-verified snapshot of the dsl/ tree on the current main branch. Counts and descriptions are copied from the @description annotations in the source .memql files. When the DSL tree changes, regenerate this page from dsl/*/concepts.memql, dsl/*/tools*.memql, dsl/providers/providers.memql, dsl/policies/policies.memql, and dsl/*/builtins.memql. Where a count or claim could not be confirmed against source, it is marked inline.

How the DSL tree is organized

The public repo uses a flat per-namespace layout (one directory per namespace, with per-construct files inside it), not the nested dsl/v1/<type>/v1/<namespace>/ layout described in some internal docs:

text
dsl/<namespace>/concepts.memql # all concepts in the namespace
dsl/<namespace>/tools.memql # all tools (or dsl/<namespace>/tools/*.memql)
dsl/<namespace>/builtins.memql # all builtins in the namespace
dsl/providers/providers.memql # all SI providers (single file)
dsl/policies/policies.memql # all SI Router routing policies (single file)

Each concepts.memql carries file-level @version and @namespace annotations; an individual construct's canonical id is composed as v{major}:{namespace}:{conceptName}. For example, the agent concept in dsl/agents/concepts.memql (@namespace("agents"), @version("1.0.0")) is addressed canonically as v1:agents:agent.

text
// dsl/agents/concepts.memql (header)
@version("1.0.0")
@namespace("agents")

A note on @scope

Internal narrative in several @description strings refers to concepts being "global-scoped" (living in the reserved _system partition). However, the canonical reference doc dsl/_reference/_concept.memql states that the @scope("global") annotation was retired in the partition-removal pivot (section 5: "Authoring a @scope annotation on a concept is a load-time error"). That same reference file is internally inconsistent — a later section (13) still documents @scope("global") and a worked example uses it. No concepts.memql file in the tree carries a live @scope annotation. Treat the "global-scoped" language in concept descriptions below as historical intent, not a confirmed runtime property. (File: dsl/_reference/_concept.memql.)


Concepts (101 total, 22 namespaces)

Concepts are schemas for time-series nodes — the base of the DSL dependency tree; every other construct references one or more concept ids. The one-line summaries below are condensed from each concept's @description. Source files: dsl/<namespace>/concepts.memql.

NamespaceCount
agents7
calendar1
cluster7
cognition18
common2
curriculum2
data3
guide2
harness5
identity12
knowledge12
library3
memql1
notes1
observability3
planner4
platform6
router4
safety3
todos1
workbench1
worker2
Total100

agentsdsl/agents/concepts.memql

ConceptSummary
v1:agents:agentAI assistant templates with configurable capabilities, personalities, and provider settings; per-user platform agents keyed by ownerUserId, addressed as _system:v1:agents:agent:<seedName>-<userShortId>.
v1:agents:agentAuthorizationStanding authorization granting an agent permission to trigger Plans of certain kinds without per-Plan user approval (tiered-trust / opt-in autonomy, per (agentId, planKind, spaceScope) with token cap + expiry).
v1:agents:agentRoleFirst-class catalog of agent roles — picks locked minimum skills, recommended LLM policy, and a cap on skills an agent in the role may carry.
v1:agents:skillFirst-class capability bundle: a named unit of (knowledgeDomains + toolSlugs + liveSources) the Planner Agent attaches in createSpecialist/extendSpecialist.
v1:agents:skillChangeEventAppend-only audit log for every skill attach/reconfigure event on an agent.
v1:agents:operatorMemorySession-scoped memory for UI-driving agents; one record per user, accumulates notes across takeovers.
v1:agents:avatarPersonaOperator-curated avatar persona catalog; each row minted once from an operator image into one vendor (Anam or Simli). Carries an operator-configurable avatarModel (Anam: cara-3 / cara-4) threaded to the vendor handshake.

calendardsl/calendar/concepts.memql

ConceptSummary
v1:calendar:calendarEventA single calendar event owned by one user; app-native source of truth (source discriminates native vs externalSync; recurrence is an optional RFC-5545 RRULE carried verbatim).

clusterdsl/cluster/concepts.memql

ConceptSummary
v1:cluster:clusterA memQL cluster — top-level deployment unit (shared database + seed nodes bff/cognition/planner).
v1:cluster:databaseA PostgreSQL instance backing a cluster; tracks connection info, engine version, installed extensions.
v1:cluster:identityProviderAn identity provider used for auth/user management; typically the in-house identity service.
v1:cluster:nodeA registered node in the cluster; updated on every liveness transition (states mirror NodeHealthStatus in component/node/node.proto).
v1:cluster:nodeTypeDefinition of a node type and its expected capabilities.
v1:cluster:spawnEventLifecycle event recording node state transitions (started/stopped/failed); legacy name retained for data compatibility.
v1:cluster:trainingResultEphemeral result node returned by trainAgent / trainAgentRetryStep handlers (per-run summary; transit container, not persisted).

cognitiondsl/cognition/concepts.memql

ConceptSummary
v1:cognition:audioOverridePer-(spaceId, agentId) audio control override (on/off/mirror_user) for one space; deterministic id audioOverride:<spaceId>:<agentId>.
v1:cognition:chunkA streaming text chunk emitted incrementally during AI response generation; frontend accumulates chunks into a real-time message.
v1:cognition:requestEphemeral request envelope for a client-executed tool call bridging cluster nodes (cognition's client-tool relay).
v1:cognition:responseEphemeral response envelope paired with a client:tool:request; inserted by the browser after dispatching the tool.
v1:cognition:contextQueryable runtime context snapshot for a space (participants, sessions, media activity).
v1:cognition:micStatePer-(spaceId, userId) mic state record; lets the cognition handler resolve mirror_user audio control.
v1:cognition:participantA human or SI participant instance within a space.
v1:cognition:presenceUI-friendly presence snapshot for a participant (thinking/responding/waiting).
v1:cognition:sessionReal-time interaction state (device + stream + activity) for a participant; audio gated by user mic toggle + agent audioControl.
v1:cognition:spacePersistent multi-participant rooms where humans and AI meet (bounded human + agent capacity; no 1:1 vs group distinction).
v1:cognition:stateConversation turn-taking state — who is speaking and AI participation permissions.
v1:cognition:utteranceA single multi-modal contribution to the conversation stream.
v1:cognition:videoOverridePer-(spaceId, agentId) video control override mirroring audioOverride; governs lip-synced avatar video.
v1:cognition:guardrailHealthRolled-up guardrail health metrics for a time window; advisory signal for tuning the fit-score threshold.
v1:cognition:unmetCapabilityA single instance of the router determining no agent could meet the user's request (specialist_gap or full_gap).
v1:cognition:privateUtterancePer-user private "Team-tab" utterance; forUserId is server-stamped from actor.userId. Authz tier: owned.
v1:cognition:misrouteFeedbackAppend-only audit row capturing the misroute classifier's prediction and the user's response. Authz tier: owned.
v1:cognition:greetSuppressionShort-lived marker suppressing the greet-on-join greeting while a first-run walkthrough starts; TTL-bounded.

commondsl/common/concepts.memql

ConceptSummary
v1:common:attachmentA file attachment uploaded to a space, with extracted transcription.
v1:common:mediaAudio, video, image, and document assets referenced by utterances.

curriculumdsl/curriculum/concepts.memql

ConceptSummary
v1:curriculum:curriculumA guided lesson plan an app-control agent can run, executed segment by segment (first consumer: first-login demo copresent.welcome.v1).
v1:curriculum:segmentOne step in a curriculum: narration, recommended tool calls, and the options the user can pick to advance the graph.

datadsl/data/concepts.memql

ConceptSummary
v1:data:logAudit log entry for validation state transitions (who checked/confirmed/reverted, when, why).
v1:data:policyValidation policy defining check/confirm requirements for a record type.
v1:data:recordData record with validation lifecycle draft → checked → confirmed; visibility governed by validation state + policy.

guidedsl/guide/concepts.memql

ConceptSummary
v1:guide:guideA persisted, re-runnable Guide: an ordered sequence of Scenes the General Assistant narrates while driving CoPresent UI/Canvas in a voice walkthrough.
v1:guide:sceneOne Scene in a Guide: narration intent, Canvas actions, optional avatar directives, interruptibility contract; ordered by order.

harnessdsl/harness/concepts.memql

ConceptSummary
v1:harness:planDesired state of a unit of agent work — the spine the reconciler drives (open → running → done/failed/cancelled); ownerUserId is the owned-tier authz key.
v1:harness:stepA unit of work inside a Plan — one DAG node (pending → ready → running → done/failed/blocked); invalid transitions rejected by harness_step_validation.go.
v1:harness:observationWhat actually happened during a step — durable, recall-able; content is the embedding text stored to node_vectors.
v1:harness:semanticMemoryA durable, distilled belief consolidated from episodic memory; sourceEpisodes link the belief back to forming episodes; confidence rises/decays.
v1:harness:consolidationCursorPer-owner consolidation watermark stored as a node; makes consolidation incremental (cost bounded by new-episode delta).

identitydsl/identity/concepts.memql

ConceptSummary
v1:identity:accessRequestSelf-service access request on the waitlist queue; created when an unknown email registers under approval mode.
v1:identity:auditEventAppend-only audit log of security-relevant events; retention via IDENTITY_AUDIT_LOG_RETENTION_DAYS. prevEventHash reserved for future hash-chain.
v1:identity:authCodeOne-time OAuth authorization code (RFC 6749 §4.1); single-use, redirect-URI + client-ID bound, ~60s TTL.
v1:identity:authSessionBearer-token session record; one row per access token, looked up on every authenticated request for per-session revocation.
v1:identity:clusterSettingsRuntime-editable cluster settings, single-row (id='cluster'); operator-tunable knobs bootstrapped from IDENTITY_* env vars.
v1:identity:delegationGrants an AI agent the right to act through a user's identity for a bounded role/scope/lifetime.
v1:identity:identityAn account or credential set owned by a user (magic-link email, OAuth, PAT, service account, worker token); agents borrow via delegation.
v1:identity:invitationToken-hashed invitation credential mapping an invitee to an optional product scope hint (pending/accepted/expired/cancelled).
v1:identity:magicLinkRequestPending magic-link auth request; the plain token is SHA-256 hashed before persistence, single-use via consumedAt.
v1:identity:userA person (or synthetic principal); owns identities; same record cluster-wide.
v1:identity:workerPairingCodeShort-lived pairing credential for the computer-use enrollment flow (XXXX-XXXX code, single-use, ~10min TTL).
v1:identity:groupOrganization group; users belong to groups, agents assigned to groups for scoped access (externalId preserved for legacy sync rows).

knowledgedsl/knowledge/concepts.memql

ConceptSummary
v1:knowledge:documentA user-uploaded file (or chat-promoted segment) analyzed into queryable items; container concept owning metadata + back-references.
v1:knowledge:documentChunkA single retrievable text chunk attached to a knowledge domain; embedding lives in node_vectors keyed by chunk id. (Note: a documentChunk is also described in dsl/common; this is the knowledge-namespace definition.)
v1:knowledge:domainEntitySchemaPer-domain entity schema (entityKind, keyFields, displayFields) powering cross-file dedup; inferred on the second validated Document.
v1:knowledge:entityIndexThe cross-file dedup lookup table; one row per validated entity keyed by sha256(normalized key field values).
v1:knowledge:imageRegionOne detected region inside an image Document — bounding box, vision-generated caption, lazy visual embedding.
v1:knowledge:knowledgeBridgeSynthetic bridge combining multiple knowledge domains for a role; hash-keyed by (roleSlug, sortedDomainIds) to reuse across matching agents.
v1:knowledge:knowledgeDomainA knowledge domain agents can specialise in; carries scope (workspace/private) + ownerId and seed tier (A/B/C).
v1:knowledge:spreadsheetRowOne row extracted from a spreadsheet Document; typed so queries filter data.<columnName>=<value> as native column predicates.
v1:knowledge:validationEventAppend-only audit log for every validation status transition on any data-bearing concept.
v1:knowledge:liveSourceA named query against a volatile data source — the "live knowledge" counterpart to a knowledge domain; results carry citations.
v1:knowledge:liveConnectorDefines a backing data source for liveSources (memql concepts, postgres/mysql/mssql, REST, GraphQL, custom plug-ins); auth via partitionSecret references.
v1:knowledge:liveSnapshotCached result of a liveSource read, keyed by (liveSourceId, queryArgsHash); bounded-stale reuse until expiresAt.

librarydsl/library/concepts.memql

ConceptSummary
v1:library:artifactA single Library index row pointing at one backing source (document/output/note/todo/event/memory/liveSource); owned-tier authz.
v1:library:generatedOutputA deliverable produced through the app (workbench result, computer-use output, agent output); auto-promoted into the Library.
v1:library:memoryA durable memory the assistant retains about the user across sessions; surfaced in the Library's Records lens; owned-tier authz.
v1:library:liveSourceA connected, refreshable source backing the knowledge/skill layer; visibility can be workspace-scoped via a non-owned authz tier (#723), not strictly per-row owned.

memqldsl/memql/concepts.memql

ConceptSummary
v1:memql:checkpointAutomation execution checkpoints for failure recovery and audit history.

notesdsl/notes/concepts.memql

ConceptSummary
v1:notes:noteA user-owned standalone note (title, body, tags, updatedAt); distinct from copresent's canvasState note caption; owned-tier authz.

observabilitydsl/observability/concepts.memql

ConceptSummary
v1:observability:codeProfileLive per-function observability configuration; keyed by codeReference (matches model.Node.ID in topology model).
v1:observability:invocationOne captured invocation of a Method or Func; backed by the code_invocation TimescaleDB hypertable (time-partitioned, jsonb-compressed).
v1:observability:codeMetricAggregate observability rollups (callCount, p50/p95/p99, errorRate) backed by TimescaleDB continuous aggregates; outlive raw rows.

plannerdsl/planner/concepts.memql

ConceptSummary
v1:planner:planA user-visible unit of work the planner orchestrates; Plans can nest via parentPlanId; lifecycle queued/routing/running/.../succeeded/failed/cancelled.
v1:planner:responsibilityA user-authored standing directive aimed at an agent — REACTIVE / STANDING / RECURRING archetypes; replaces the retired standingTask concept.
v1:planner:taskOne executable step inside a Plan — semantic (planner decomposition) or toolInvocation (auto-stamped per tool call); one level of mechanical recursion.
v1:planner:taskStatePersisted working state of a Task parked awaiting user feedback or paused; bootstrap context for planner re-invocation on resume.

platformdsl/platform/concepts.memql

ConceptSummary
v1:platform:globalSecretInstance-wide encrypted secret (NaCl secretbox under MEMQL_MASTER_KEY); cleartext never stored; resolver falls back partition → global.
v1:platform:globalVariableInstance-wide plaintext config variable visible to every tenant; per-tenant overrides via partitionVariable.
v1:platform:partitionSecretPartition-scoped encrypted secret (BYOK vendor keys, per-tenant creds); falls back to globalSecret when no row found.
v1:platform:partitionVariablePartition-scoped plaintext config variable; falls back to globalVariable.
v1:platform:policyTracePersisted trace tree for a single policy evaluation; written when @traces_persisted or PersistTrace=true; retention via MEMQL_POLICYTRACE_RETENTION_DAYS (default 90).
v1:platform:missingCapabilityA capability the platform itself cannot yet provide (missing tool/integration/connector kind); logged by the Planner during capability-gap detection.

routerdsl/router/concepts.memql

ConceptSummary
v1:router:budgetSpend limit for a partition or specific agent; the router checks current-period spend before every SI call (rolls over at periodType boundary).
v1:router:callOne SI invocation recorded by the SI Router; one row per call with attribution, token counts, latency, cost (usage ledger).
v1:router:modelCatalogVirtual projection of a registered SI provider entry — never persisted, produced at query time by integration.router.listModels.
v1:router:policyCatalogVirtual projection of a registered SI Router policy — never persisted, produced at query time by integration.router.listPolicies.

safetydsl/safety/concepts.memql

ConceptSummary
v1:safety:classificationOne row per safety-classifier decision (verdict source rule/model/cache, surface + action, redacted payload); retention MEMQL_SAFETY_CLASSIFICATION_RETENTION_DAYS (default 90).
v1:safety:approvalRequestOne row per Ask-verdict approval request; keyed by correlationKey for idempotency; flipped approved/denied to unblock a gated action.
v1:safety:outputScreeningOne row per output-screening decision (ingress: should this string land in the model's context?); retention MEMQL_SAFETY_OUTPUT_SCREENING_RETENTION_DAYS (default 90).

todosdsl/todos/concepts.memql

ConceptSummary
v1:todos:todoA user-owned to-do (title, done flag, optional due date/priority, back-pointer to spawning responsibility); owned-tier authz.

workbenchdsl/workbench/concepts.memql

ConceptSummary
v1:workbench:workspacePer-Plan workbench workspace tracking the persistent filesystem mounted into every per-Task container; universal authorization (sandboxed in-cluster).

workerdsl/worker/concepts.memql

ConceptSummary
v1:worker:invocationPer-call telemetry for worker tool invocations; retention default 90 days (WORKER_INVOCATION_RETENTION_DAYS), soft-deleted by the retention sweep cron. (Concept id corrected in #667.)
v1:worker:registrationOperational registration of a worker (a memql-cockpit instance in worker mode); per-user routing — owned by exactly one user.

Tools (24 total)

Tools are the SI-callable surface — the discoverable, schema-typed entry points an agent's tool loop binds call args to. Each tool declares a @handler (the function it forwards to) and an @executionTime hint (fast or medium). The tool body is its input schema (a field list with types and @required/@default/@description annotations).

Handler types observed: type="query" (15 tools — forward to a query or mutation function) and type="function" (9 tools — forward to a named Go-backed function handler). Execution times observed: fast (20) and medium (4).

A representative tool body, copied from source:

memql
@handler(type="query", query="mutationCreateCalendarEvent({...})")
@executionTime("fast")
@description("Create a native calendar event for the caller...")
tool calendarCreate {
title string @required @description("Event title, e.g. 'Karate class'.")
startsAt string @required @description("Event start as an RFC3339 timestamp.")
endsAt string @description("Event end as an RFC3339 timestamp. Omit for a point-in-time reminder.")
allDay boolean @default("false") @description("True for a date-scoped all-day event.")
location string @description("Free-form location text.")
notes string @description("Free-form notes / description.")
recurrence string @description("Optional RFC-5545 RRULE recurrence rule.")
}

File: dsl/calendar/tools.memql.

calendardsl/calendar/tools.memql

ToolHandlerTimeSummary
calendarListquery queryUpcomingEventsfastList the caller's upcoming events whose start falls in [windowStart, windowEnd]; caller's own events only.
calendarFindquery queryFindEventsfastFind the caller's events by exact title; caller's own events only.
calendarCreatequery mutationCreateCalendarEventfastCreate a native calendar event for the caller (ownerUserId server-stamped, source='native').
calendarUpdatequery mutationUpdateCalendarEventfastUpdate an existing event the caller owns; only the fields in payload change.
calendarDeletequery mutationDeleteCalendarEventfastSoft-delete a calendar event the caller owns (recoverable in history).

memqldsl/memql/tools.memql

ToolHandlerTimeSummary
describeFunctionquery helpfastGet detailed usage guidance for a MemQL named function (docs, args schema, calling rules).
searchUsersquery concept==v1:memql:backend:userfastSearch for users.

notesdsl/notes/tools.memql

ToolHandlerTimeSummary
notesListquery queryNotesfastList the caller's notes (id, title, body, tags, updatedAt); read-only, owned.
notesCreatequery mutationCreateNotefastCreate a note for the user (server-stamped owner); body required, title/tags optional.
notesUpdatequery mutationUpdateNotefastUpdate a note's fields (title/body/tags) with a full merged payload; ownership re-enforced.
notesSearchquery queryNotesByTagfastSearch the caller's notes by tag; owned, read-only.

todosdsl/todos/tools.memql

ToolHandlerTimeSummary
todosListquery queryTodosfastList the caller's to-dos; optional done filter; read-only.
todosCreatequery mutationCreateTodofastCreate a to-do (server-stamped owner); optional dueAt/priority/sourceResponsibilityId.
todosCompletequery mutationCompleteTodofastMark a to-do complete (or re-open); pass the full updated payload with the done flag set.
todosUpdatequery mutationUpdateTodofastUpdate a to-do's fields (title/dueAt/priority) with a full merged payload.

agentsdsl/agents/tools/*.memql

ToolHandlerTimeSummaryFile
askSpecialistfunction askSpecialistmediumQuery a specialist agent for a structured answer {response, rationale?, confidence, needsMore?}.askSpecialist.memql
ensureAgentfunction ensureAgentForGoalmediumEnsure an agent exists that can handle a goal (match/extend/create from the role catalog); returns {agentId, action, reasoning}.ensureAgent.memql
requestUserFeedbackfunction requestUserFeedbackfastPause the active Plan and ask the user for missing detail mid-task (Plan → awaitingFeedback).requestUserFeedback.memql
webSearchfunction webSearchmediumIssue a web search; returns {url, title, snippet} list. STUB: no web-search provider wired in-repo yet (returns empty + note).trainerTools.memql
fetchUrlfunction fetchUrlmediumFetch and extract readable content from a URL; returns {url, status, contentType, text, truncated}.trainerTools.memql
writeKnowledgeChunkfunction mutationWriteKnowledgeChunkfastPersist a distilled knowledge chunk (source='trainerAgent', validated/canonical); sourceRef REQUIRED (no fabricated citations).trainerTools.memql
markChunkSupersededfunction mutationMarkChunkSupersededfastFlag a chunk as outdated (superseded=true, refresh mode only); row preserved for audit.trainerTools.memql
embedChunkfunction embedChunkfastEmbed a just-written chunk so it becomes semantically retrievable; idempotent.trainerTools.memql

cognitiondsl/cognition/tools/recentChat.memql

ToolHandlerTimeSummary
recentChatfunction recentChatfastRead recent space-chat content + space context; read-only; the assistant's window into the utterance stream.

Providers (57 total, single file)

Providers are SI vendor + model + auth records. They come in two forms:

  • Base providers (@base + @type) carry vendor-level auth and type. There are 6: anthropic, google, groq, mistral, openai, xai.
  • Model providers (@extends("<base>") + @model + optional @type) declare a concrete model, optional @description, and a params block (context window, completion-token cap, cost-per-million).

The default chat provider is stream54 (carries the @default annotation — "every caller that does not explicitly pick a provider lands here"). Source file: dsl/providers/providers.memql.

A representative model provider with its params block:

memql
@extends("openai")
@model("gpt-5.4-mini")
@description("OpenAI GPT-5.4 Mini - balanced cost/latency chat (non-streaming)")
provider chat54Mini {
params {
contextWindow 128000
maxCompletionTokens 16384
inputCostPerMillion 0.15
outputCostPerMillion 0.60
cachedInputCostPerMillion 0.075
}
}

File: dsl/providers/providers.memql.

Base providers

Provider@type
anthropicAnthropic
openaiOpenAI
googleGoogle
groqGroq
mistralMistral
xaixAI

Model providers

Grouped by capability. Each row lists the provider name, its @model, and the @type where one is declared (model providers that only set @extends inherit the base @type).

Chat — non-streaming

ProviderModelNotes
chat53Latestgpt-5.3-chat-latestAuto-updated chat-tuned alias (non-streaming).
chat54gpt-5.4Flagship standard-tier chat (non-streaming).
chat54Minigpt-5.4-miniBalanced cost/latency chat.
chat54Nanogpt-5.4-nanoCheapest high-volume chat for low-complexity tasks.
chat54Progpt-5.4Pro tier; aliases to gpt-5.4 (gpt-5.4-pro is responses-API only).
claudeHaikuclaude-haiku-4-5-20251001Anthropic Haiku.
claudeOpusclaude-opus-4-6Anthropic Opus.
claudeSonnetclaude-sonnet-4-6Anthropic Sonnet.
geminiFlashgemini-2.0-flashFastest + cheapest Gemini tier (OpenAI-compatible endpoint).
geminiProgemini-2.0-proHigher-capability Gemini for long-context reasoning.
grok2grok-2-latestxAI Grok-2 flagship reasoning.
groqLlama70Bllama-3.3-70b-versatileGroq-accelerated, high tokens/sec.
mistralLargemistral-large-latestMistral's top-tier general-purpose model.
codestralcodestral-latestMistral Codestral — coding-specialized, cheap and fast.

Chat — streaming (@type ends in Stream)

ProviderModel@typeNotes
stream53Latestgpt-5.3-chat-latestOpenAIStreamAuto-updated chat-tuned alias (streaming).
stream54gpt-5.4OpenAIStream@default — flagship standard-tier streaming chat.
stream54Minigpt-5.4-miniOpenAIStreamBalanced cost/latency streaming.
stream54Nanogpt-5.4-nanoOpenAIStreamCheapest high-volume streaming.
stream54Progpt-5.4OpenAIStreamPro tier (streaming); aliases to gpt-5.4.
streamClaudeHaikuclaude-haiku-4-5-20251001AnthropicStream
streamClaudeOpusclaude-opus-4-6AnthropicStream
reasoningClaudeOpusclaude-opus-4-6AnthropicStreamOpus 4.6 with extended-thinking (8192-token internal reasoning budget).
streamClaudeSonnetclaude-sonnet-4-6AnthropicStream
streamCodestralcodestral-latestMistralStreamCoding-specialized (streaming).
streamCodex51Maxgpt-5.1-codex-maxOpenAIStreamHeavy long-context coding (multi-file refactors).
streamCodex53gpt-5.3-codexOpenAIStreamCoding-specialized chat (NemoClaw / code-gen flows).
streamGeminiFlashgemini-2.0-flashGoogleStreamFastest + cheapest Gemini, tool-calling enabled.
streamGeminiProgemini-2.0-proGoogleStreamHigher-capability Gemini (streaming).
streamGrok2grok-2-latestxAIStreamGrok-2 flagship reasoning (streaming).
streamGroqLlama70Bllama-3.3-70b-versatileGroqStreamFirst-token latency under 300ms.
streamMistralLargemistral-large-latestMistralStreamTop-tier general-purpose streaming with tool support.
streamReasoning4Minio4-miniOpenAIStreamEfficient reasoning-focused o-series model (streaming).

Embedding (@type OpenAIEmbedding)

ProviderModelNotes
embedding3Largetext-embedding-3-largeHigh-fidelity embeddings (3072 dims).
embedding3Smalltext-embedding-3-smallCheaper embeddings (1536 dims); default for high-volume retrieval.

Speech-to-text (@type OpenAISTT)

ProviderModelNotes
whisper1whisper-1Verbatim STT; the memQL default STT model (MEMQL_WHISPER_MODEL).
transcribeDiarizegpt-4o-transcribe-diarizeSTT with speaker diarization. Placeholder type until the diarization-aware client lands.

Text-to-speech (@type OpenAITTS)

ProviderModelNotes
tts4oMinigpt-4o-mini-ttsNewest natural-sounding TTS.
tts1Hdtts-1-hdClassic HD TTS; reliable fallback.

Audio / realtime / multimodal (placeholder types — clients not yet landed)

The descriptions on these note "Placeholder type until the … client lands."

ProviderModel@typePurpose
audio15gpt-audio-1.5OpenAIAudioUnified audio in/out single-shot.
audioMinigpt-audio-miniOpenAIAudioSmaller unified audio in/out.
realtime15gpt-realtime-1.5OpenAIRealtimeBidirectional audio+text over WebSocket (Polyphon voice chat).
realtimeMinigpt-realtime-miniOpenAIRealtimeSmaller/cheaper realtime for high-volume voice.
computerUsecomputer-use-previewOpenAIComputerUseAgentic control of a virtual machine.
moderationOmniomni-moderation-latestOpenAIModerationSelf-updating moderation for text + image safety.
image15gpt-image-1.5OpenAIImageNewest generative image model.
image1Minigpt-image-1-miniOpenAIImageSmaller/cheaper generative image.
sora2sora-2OpenAIVideoGenerative video.
sora2Prosora-2-proOpenAIVideoHigher-quality / longer-duration generative video.
research3o3-deep-researchOpenAIDeepResearchHigher-tier long-form deep-research pipeline.
research4Minio4-mini-deep-researchOpenAIDeepResearchLong-form deep-research pipeline (cheaper tier).
search5gpt-5-search-apiOpenAISearchWeb-search-grounded chat.

Policies (5 total — SI Router routing policies)

The policies that ship in the public dsl/ tree are SI Router routing policies (block syntax: @primary / @fallback / latency knobs). They select which provider serves a given workload and define a fallback chain. Source file: dsl/policies/policies.memql.

Scope note. The internal CLAUDE.md describes a second, distinct policy system — cross-cutting decision policies (func (Policy) name(ctx) { ... } with @tier / @frontend_visible / @audited annotations, under dsl/policies/core/ and dsl/policies/bff/). No such decision policies exist in this repo's dsl/ tree. The only func (Policy) references are in the documentation/reference files (dsl/_reference/_trait.memql). The v1:platform:policyTrace concept and the EvaluatePolicy engine path exist, but the public DSL ships only the five routing policies below.

Routing-policy fields:

  • @primary("<provider>") — first-choice provider.
  • @fallback("<provider>") — ordered fallback chain (repeatable).
  • @maxLatencyMs / @maxTimeToFirstTokenMs — latency envelopes.
  • @preferredRole("<role>") — agent roles the policy targets (repeatable).
PolicyPrimaryFallbacksLatency capsPreferred rolesSummary
balancedChatstreamClaudeSonnetstream54Pro, streamGeminiPromaxLatency 60000msassistant, specialistDefault chat policy for non-operator agents; Sonnet-class floor for agent replies (Mini-primary produced hedged, un-cited replies).
cheapestCapablestreamGeminiFlashstreamGroqLlama70B, streamCodestralmaxLatency 15000msBulk suggestion + classification work where cost per call matters more than model ceiling.
fastCodingstreamCodestralstreamGroqLlama70B, stream54MinimaxLatency 20000msCheap + quick code generation / refactor assistance.
lowLatencyVoicestreamGroqLlama70BstreamGeminiFlash, stream54MiniTTFT 800ms, maxLatency 10000msTurn-taking in multi-party voice; Groq for best first-token latency.
strongReasoningstreamClaudeSonnetstream54Pro, streamGeminiPromaxLatency 60000msoperatorOperator-enabled UI-driving agents and complex tool-calling choreography.

Full source for one policy:

memql
@primary("streamClaudeSonnet")
@fallback("stream54Pro")
@fallback("streamGeminiPro")
@maxLatencyMs(60000)
@preferredRole("assistant")
@preferredRole("specialist")
@description("Default chat policy for non-operator agents...")
policy balancedChat { }

File: dsl/policies/policies.memql.


Builtins (66 total, 7 namespaces)

Builtins wrap Go integrations behind a declarative schema so they look like regular DSL function calls. Each declares an @executor (the Go integration or engine intrinsic it dispatches to); the body is the builtin's input schema.

A representative builtin:

memql
@executor("integration.similarity.similarTo")
@args(profile="object", additionalProperties="true")
@description("Retrieve top-K nodes of the given concept ranked by cosine similarity...")
builtin similarTo {
text string @required
concept string @required
limit int
provider string
}

File: dsl/common/builtins.memql.

Two kinds of @executor value appear: integration executors (integration.<area>.<op> — dispatch to a registered Go integration plug-in) and engine-intrinsic executors (bare names like concepts, help, validate, error — handled directly by the engine).

agentsdsl/agents/builtins.memql

BuiltinExecutorSummary
agentintegration.agents.invokeAsync-invoke a DSL-registered agent by name; creates a queued Plan (kind=agentInvocation) and returns its id.
askSpecialistintegration.agents.askSpecialistSynchronously query a specialist agent by role; returns one {response, rationale?, confidence, needsMore?} object.
requestUserFeedbackintegration.agents.requestUserFeedbackTransition the active Plan to awaitingFeedback with a feedbackRequest{question, kind, options?, timeoutAt}.
ensureAgentForGoalintegration.agents.ensureForGoalMatch-extend-or-create an agent that can handle a goal; returns {agentId, action, reasoning}.

cognitiondsl/cognition/builtins.memql

BuiltinExecutorSummary
recentChatintegration.chat.recentChatRead recent utterances + space context (readRecent / readByKeyword / readByTime / getSpaceContext / listParticipants).
ensureDailySpaceForUserintegration.dailyspace.ensureForUserEnsure today's daily space exists for a given user; idempotent, no-op if disabled.
ensureDailySpaceForCallerintegration.dailyspace.ensureForCallerEnsure today's daily space exists for the authenticated caller; no-op for system actors.
rolloverDailySpacesAllUsersintegration.dailyspace.rolloverAllUsersHourly cron entry point; ensures today's daily for every active user.

commondsl/common/builtins.memql

BuiltinExecutorSummary
authCheckPermissionintegration.auth.checkPermissionCheck if the current user has a specific role; returns boolean.
authResolveUserintegration.auth.resolveUserResolve the current authenticated user from request context.
cognitionScoreintegration.cognition.scoreUtteranceScore an utterance against agent candidates using the Polyphon turn-taking algorithm.
cognitionTrackPresenceintegration.cognition.trackPresenceUpdate participant presence state (idle/thinking/typing/responding).
conceptsconceptsReturn metadata for all registered concepts.
contentIdcontentIdPredict the content-addressed id for a concept+payload without inserting.
databaseHealthCheckintegration.database.healthCheckCheck database connectivity; returns healthy/unhealthy + response time.
databaseStatsintegration.database.statsReturn DB connection pool statistics (open/idle/in use/wait count).
ensureKnowledgeBridgeintegration.knowledge.ensureKnowledgeBridgeEnsure a cross-domain bridge corpus exists for an agent's (roleSlug, sortedDomainIds); idempotent, hash-keyed.
errorerrorConstruct and return an error from a message string.
filesExtractTextintegration.files.extractTextExtract plain text from a file by MIME type (PDF, DOCX, images, text).
functionsfunctionsReturn a minimal list of all registered functions (name + description).
helphelpReturn full details for a specific function or tool by name.
knowledgeAugmentDomainAnalyzeintegration.knowledge.augmentDomainAnalyzeDecide whether a chat exchange warrants augmenting an agent's knowledge domain; returns {outcome, domainId, topic, reasoning, confidence}.
knowledgeAugmentDomainGenerateintegration.knowledge.augmentDomainGenerateGenerate + embed + persist topic-focused chunks for a domain; inserts a Plan for audit.
knowledgeIngestintegration.knowledge.ingestChunk + embed + persist a document into a domain; source REQUIRED (provenance class).
knowledgeSeedStandardDomainsintegration.knowledge.seedStandardDomainsSeed standard knowledge domains + CoPresent UI corpus on startup; idempotent.
avatarDirectStartSessionintegration.avatardirect.startSessionStart a direct/Guide avatar session for an Anam-vendor agent; mints a LiveKit room + join token.
avatarDirectStopSessionintegration.avatardirect.stopSessionStop a direct/Guide avatar session; best-effort, always returns {ok:true}.
realtimeCreateClientSecretintegration.openairealtime.createClientSecretMint a short-lived OpenAI Realtime ephemeral client_secret for a browser↔OpenAI WebRTC session.
memqlDocsmemqlDocsReturn embedded MemQL documentation as queryable nodes.
openaiVoiceSynthesizeintegration.openaiVoice.synthesizeSynthesize text to speech using OpenAI TTS; returns base64 PCM16 audio.
previewInsertpreviewInsertValidate payload, predict id, and check existence — without inserting.
routerListModelsintegration.router.listModelsList every SI provider registered at startup (vendor, model id, pricing, availability).
routerListPoliciesintegration.router.listPoliciesList all routing policies loaded from policies/v1/*.memql.
routerSetApiKey(none)Set a router vendor API key (vendor, plaintextKey required; optional label, addedBy). Carries no @executor annotation in source — the declaration sits directly after routerListPolicies with no executor line; verify intended dispatch in dsl/common/builtins.memql.
seedAllDomainContentintegration.knowledge.seedAllDomainContentRun seedDomainContent across every shipped domain; optional tier/prefix filters.
seedDomainContentintegration.knowledge.seedDomainContentGenerate + embed + store seeded chunks for one domain (Tier-A LLM-generates, Tier-B disclaimer, Tier-C Wikipedia/placeholder).
webSearchintegration.knowledge.webSearchIssue a web search for the Trainer Agent. STUB: no provider wired in-repo (returns empty + note).
fetchUrlintegration.knowledge.fetchUrlFetch + extract readable text from a URL (bounded http.Client); returns {url, status, contentType, text, truncated}.
embedChunkintegration.knowledge.embedChunkEmbed one knowledge chunk so it becomes retrievable via similarTo; idempotent.
embedDomainItemsintegration.knowledge.embedDomainItemsEmbed every unembedded validated chunk in a domain, recompute the Document's embeddingStatus; idempotent.
serviceVersionserviceVersionReturn the current memQL service version.
shapeHelpshapeHelpGet full details for a shape template by name.
shapeTemplatesshapeTemplatesList available shape templates, optionally filtered by concept.
similarTointegration.similarity.similarToRetrieve top-K nodes ranked by cosine similarity to a free-text query, optionally scoped to domains.
storageUploadintegration.storage.uploadUpload file data to cloud storage; returns storage URL.
sttTranscribeintegration.stt.transcribeTranscribe audio data to text (non-streaming batch).
toolstoolsReturn MCP-compatible tool definitions (name, description, inputSchema).
trainAgentintegration.training.trainAgentTrain an agent: replace domains+tools, eager-embed chunks, refresh identity vector, distill system prompt (bracketed by a Plan + 3 Tasks).
trainAgentRetryStepintegration.training.trainAgentRetryStepRe-run a single failed training step (identity vector or distilled prompt).
validatevalidateValidate a payload against a concept's JSON schema; returns valid flag, errors, schema info.
voicePickForGenderintegration.voice.pickForGenderPick a canonical voice name for an agent of a given gender, biased away from voices the owner already uses.
voiceResolveintegration.voice.resolveResolve a canonical voice name + provider to the provider-specific voice id.
dateKeyInTimezoneintegration.timeutil.dateKeyInTimezoneCompute today's YYYY-MM-DD date key in a given IANA timezone; falls back to UTC.

identitydsl/identity/builtins.memql

BuiltinExecutorSummary
identityCreateDelegationintegration.identity.createDelegationCreate a delegation granting an agent scoped authority to act on behalf of an identity.
identityResolveDelegationintegration.identity.resolveDelegationResolve the active delegation chain for an agent subject.
identityRevokeDelegationintegration.identity.revokeDelegationRevoke an existing delegation by id, deactivating all scoped authority.
identityValidateScopeintegration.identity.validateScopeCheck whether a delegation permits a specific operation; returns boolean.

workbenchdsl/workbench/builtins.memql

BuiltinExecutorSummary
workbenchDispatchHostintegration.workbench.dispatchHostDispatch a workbenchHost.<action> call to the per-Plan workspace; lazily provisions on first call.
workbenchTeardownDirectoryintegration.workbench.teardownDirectoryRemove the on-disk workbench workspace directory for a Plan; idempotent.

workerdsl/worker/builtins.memql

BuiltinExecutorSummary
agentworkerDispatchComputerintegration.agentworker.dispatchComputerDispatch a workerComputer.<action> call to the user's GUI-capable worker.
agentworkerDispatchHostintegration.agentworker.dispatchHostDispatch a workerHost.<action> call to the user's connected worker.
agentworkerListWorkersintegration.agentworker.listWorkersList workers connected for a supplied user; returns {registrationId, name, capabilities, ...}.
agentworkerRequestScopeintegration.agentworker.requestScopeCreate a scope-elevation Plan + canvas card for a computer_use task awaiting approval.
agentworkerStatusintegration.agentworker.statusResolve the live computer-use availability for the calling agent's owner user.

harnessdsl/harness/queries.memql

These two builtins are declared in the harness namespace's queries.memql file (not a builtins.memql), alongside the harness query functions.

BuiltinExecutorSummary
recallintegration.harnessRecall.recallRecall top-k memories of a concept (default v1:harness:observation) by a single hybrid recency × relevance score (pgvector cosine + exponential time-decay), scored server-side in one SQL statement; owner-scoped, tunable halfLife/weights.
harnessTraceintegration.harnessTrace.traceFetch a harness plan's full execution timeline (every plan/step version transition + all observations) reconstructed from the append-only event stream; owner-scoped; backs the cockpit harness trace CLI.

Verification summary

All counts and names in this document were enumerated directly from the dsl/ tree of the public repo (grep "^concept ", grep "^tool ", grep "^provider ", grep "^builtin ", and the single dsl/policies/policies.memql file). Totals:

  • 100 concepts across 22 namespaces.
  • 24 tools across 5 namespaces.
  • 57 providers (6 base + 51 model) in one file.
  • 5 SI Router routing policies in one file.
  • 66 builtins across 7 namespaces (45 in common, 4 each in agents / cognition / identity, 5 in worker, 2 in workbench, and 2 in harness's queries.memql).

When this snapshot ages, re-run those greps against the source tree to refresh the tables.