Skip to content

DX on-ramp: memctl data-plane + docker-compose + examples (#38) - #56

Merged
mkorbi merged 3 commits into
mainfrom
feat/dx-onramp
Jul 24, 2026
Merged

DX on-ramp: memctl data-plane + docker-compose + examples (#38)#56
mkorbi merged 3 commits into
mainfrom
feat/dx-onramp

Conversation

@mkorbi

@mkorbi mkorbi commented Jul 20, 2026

Copy link
Copy Markdown
Member

Closes the remaining #38 bullets. Time-to-first-value went from "install buf + grpcurl, hand-build JSON+base64 for every op" to docker compose up + memctl.

1. memctl data-plane verbs

memctl was control-plane only; now it talks to a running server with the token it already issues (no grpcurl):

  • kv put/get, semantic search, episodic tail (live stream), graph neighbors, ns ls (Admin.ListNamespaces).
  • Shared --addr/--token/--tls; capability rides an outgoing metadata interceptor on unary + stream. Flags work before or after positionals.

2. docker-compose.yml

docker compose up --build → memsidecar + Postgres (pgvector) + MinIO (S3), with a one-shot bucket setup and token/memctl helper services (tools profile). configs/compose.yaml binds 0.0.0.0 and backs every durable block with Postgres + artifacts with MinIO. .dockerignore tightened (no node_modules/website in the build context).

3. examples/agent_tour.py + quickstart

A runnable tour of all six blocks as one agent turn (episodic → kv → semantic → artifact → graph → lease). The quickstart now leads with Compose and drives everything through memctl instead of grpcurl.

Verification (all real, not just compiles)

  • memctl: against a live server — kv put/get round-trips, ns ls counts reflect writes, semantic/graph/episodic authenticate + stream, a bad token is rejected Unauthenticated.
  • compose: docker compose up --build boots on Postgres+MinIO; kv put/get round-trips through Postgres and ns ls shows the postgres + s3 backends.
  • examples: ran end-to-end against a live server — all six steps print correct output (semantic recall score 1.000, artifact bytes match, graph edge, lease acquire/release).
  • buf lint, go vet, go test -race ./..., golangci-lint (0 issues), Docusaurus build all clean.

With this, #38 is fully closed (the PyPI-publish bullet shipped in #55). DEV credentials only — the compose PASETO keypair is public in-repo.

mkorbi and others added 3 commits July 20, 2026 11:00
…#38)

memctl was control-plane only (token issue / gen-keypair / version), so the
quickstart needed hand-built grpcurl JSON+base64 for every data op. Add verbs
that talk to a running server using the token memctl already issues, reusing the
in-tree Go stubs — no grpcurl.

- kv put/get, semantic search, episodic tail (live stream), graph neighbors,
  ns ls (Admin.ListNamespaces).
- Shared --addr ($MEMSIDECAR_ADDR or 127.0.0.1:7777), --token
  ($MEMSIDECAR_TOKEN), --tls flags; the capability token rides an outgoing
  metadata interceptor (x-memsidecar-capability: Bearer …) on unary + stream.
- Flags may appear before or after the positionals (the stdlib flag package
  otherwise stops at the first positional).

Verified end-to-end against a live server: kv round-trip, ns ls counts reflect
writes, semantic/graph/episodic calls authenticate and stream, and a bad token
is rejected with Unauthenticated. go vet + golangci-lint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
`docker compose up --build` brings up memsidecar backed by Postgres (pgvector,
so the semantic block works) and MinIO (S3 artifacts), with helper services to
mint a token and run memctl verbs — no local Go/buf toolchain needed.

- docker-compose.yml: postgres (pgvector/pgvector:pg16, healthchecked), minio +
  a one-shot minio-setup that creates the bucket, memsidecar (built from the
  Dockerfile, waits for both healthy), and `token` / `memctl` helper services
  under the `tools` profile.
- configs/compose.yaml: binds 0.0.0.0, backs every durable block with Postgres
  and artifacts with MinIO via env-injected DSN + S3 creds.
- .dockerignore: exclude node_modules / website / ts dist from the build
  context (the image only builds the Go server + memctl).

Verified: `docker compose up --build` boots the server on Postgres+MinIO;
`docker compose run --rm -T token` mints a token; `memctl kv put/get` round-trips
through Postgres and `memctl ns ls` shows the postgres + s3 backends. DEV
credentials only (the PASETO keypair is public in-repo).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- examples/agent_tour.py: a runnable tour of all six blocks framed as one agent
  turn (episodic log, kv cache, semantic recall, artifact store, graph link,
  lease), plus examples/README.md. Verified end-to-end against a live server.
- quickstart.md: lead with `docker compose up` (no toolchain) and drive the data
  plane with `memctl` verbs instead of hand-built grpcurl JSON+base64; point at
  the example tour. Docusaurus build clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mkorbi
mkorbi merged commit 9f54285 into main Jul 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant