AI-native time-series memory graph with a single DSL.
Unifies concepts, queries, agent workflows, and voice into deployable primitives.
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.
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.
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.
@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.
# Start development environment (Docker)
docker compose -f docker/docker-compose.full.yml up --build
# Run tests
go test ./...
# Deploy to staging (Azure AKS)
make deploy VERSION=XFull setup guide: docs/public/overview/quickstart.md
- CLAUDE.md - Project overview and architecture
- docs/public/overview/quickstart.md - 5-minute setup guide
- GLOSSARY.md - Complete documentation index
- docs/public/overview/tech-stack.md - Tech stack and deployment practices
- 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)
- MemQL DSL: Custom query language for time-series graphs
- Automations: Event-driven workflows (.memql files)
- Functions: Reusable query functions (.memql files)
- Database: Local PostgreSQL + TimescaleDB container
- Service: Local memQL container
- Access: All developers
- Command:
docker compose -f docker/docker-compose.full.yml up --build
- Database: TimescaleDB Cloud (Tiger Cloud)
- Service: Azure Kubernetes Service (AKS, cluster
aks-memql-staging) - Access: All developers
- Command:
make deploy VERSION=X
- 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/deployment-strategy.md)
Full details: docs/public/overview/tech-stack.md
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)
- Azure CLI (
az) + kubectl - git
-
Clone repository
git clone https://github.com/znasllc-io/memql.git cd memql -
Start development environment
docker compose -f docker/docker-compose.full.yml up --build
-
Make changes and test
# Edit code # ... # Run tests go test ./... # View logs docker compose -f docker/docker-compose.full.yml logs -f
-
Deploy to staging for integration testing
make deploy VERSION=X
-
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
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
| 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 | make deploy VERSION=X |
| View container logs | docker compose -f docker/docker-compose.full.yml logs -f |
| Database shell | psql postgres://memql:memql_dev@localhost:5432/memql |
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)
# Run all tests
go test ./...
# Run specific package tests
go test -v ./component/memql/...
# Run with coverage
go test -cover ./...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 downDocumentation: docker/README.md
MemQL DSL is a domain-specific query language for time-series memory graphs.
// Find recent utterances in a space
spaceUtterances({
"spaceId": "space_123",
"limit": 10
})
@enabled
@trigger(event="graph.node.created.v1:cognition:participant")
@description("Auto-join SI agents to spaces")
func (Automation) autoJoinSI() {
// Automation logic...
}
Full reference: docs/public/language/memql.md
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/deployment-strategy.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).
- Read docs/public/overview/tech-stack.md
- Make changes and test in development environment (
go test ./...) - Deploy to staging for integration testing
- Commit directly to
mainfor focused changes, or open a PR when review is useful - 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.
Apache License 2.0 — see LICENSE.
- Quick start: docs/public/overview/quickstart.md
- Find documentation: GLOSSARY.md
- Tech stack details: docs/public/overview/tech-stack.md
- Component docs: Check directory
CLAUDE.mdfiles - Issues: Create GitHub issue
memQL - Time-series memory graph database for SI-powered collaboration