Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ archives:
formats:
- zip
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- LICENSE
- README.md
- CHANGELOG.md
- src: internal/records/LICENSE.v8
dst: .
strip_parent: true
- src: internal/memoryagent/LICENSE.memory-agent
dst: .
strip_parent: true

checksum:
name_template: "checksums.txt"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

### Added

- Optional v0.3.4 Memory Agent/AML backend: original records, source-linked
consolidation, evidence retrieval, and operational metrics, logs and traces.
Existing Memory commands and databases retain the public CLI behavior.
The separate hosted frontend and UI/UX are not part of this source snapshot.
- `npm install --global @mnemon-dev/mnemon` is now the canonical CLI install
path. Tagged releases publish pinned native artifacts for macOS, Linux, and
Windows before advancing the npm `latest` or `next` channel.
Expand Down
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ DETERMINISTIC_PKGS := \
./internal/agency/attach \
./internal/agency/authority \
./internal/agency/artifact \
./internal/records \
./internal/retrieval \
./internal/localrpc \
./internal/memoryagent \
./internal/aml \
./internal/memory/service \
./internal/memory/embed \
./internal/memory/graph \
./internal/memory/importdraft \
Expand All @@ -36,15 +42,16 @@ DETERMINISTIC_PKGS := \
./web \
./test/mnemond/architecture \
./test/mnemond/observer \
./test/mnemond/domainops/trace
./test/mnemond/domainops/trace \
./test/deploy/...

TESTDATA_PKGS := \
./testdata/mnemond/domainops/cmd/domain-load \
./testdata/mnemond/domainops/cmd/domain-world \
./testdata/mnemond/domainops/cmd/domainctl \
./testdata/mnemond/domainops/world

.PHONY: deps build install uninstall test test-integration test-live
.PHONY: deps build build-linux-amd64 install uninstall test test-integration test-live
.PHONY: docker-build docker-run compose-up compose-down compose-dev release-snapshot clean help

.DEFAULT_GOAL := help
Expand All @@ -56,6 +63,10 @@ build: ## Build the mnemon product binary
@mkdir -p $(BIN_DIR)
go build -ldflags "$(MNEMON_LDFLAGS)" -o $(MNEMON) .

build-linux-amd64: ## Cross-compile a static linux/amd64 binary (AML deployment kit)
@mkdir -p $(BIN_DIR)
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-s -w -X github.com/mnemon-dev/mnemon/cmd.version=$(VERSION)" -o bin/mnemon-linux-amd64 .

install: build ## Install mnemon to GOBIN
@mkdir -p $(GOBIN)
cp $(MNEMON) $(GOBIN)/mnemon
Expand Down Expand Up @@ -104,8 +115,9 @@ release-snapshot: ## Build local GoReleaser snapshot artifacts
clean: ## Remove build artifacts and test data
rm -f mnemon
rm -f $(BIN_DIR)/mnemon
rm -f $(BIN_DIR)/mnemon-linux-amd64
rm -rf .testdata

help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-16s\033[0m %s\n", $$1, $$2}'
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ Browse the knowledge accumulated by your agents in a standalone local website:
```sh
mnemon web
# Open http://127.0.0.1:8484

Optional: [shared Memory service and paper strategy](docs/memory-service.md), with [composable records indexes](docs/records-indexes.md).
```

Explore a searchable memory library, readable memory pages, a relationship graph,
Expand Down Expand Up @@ -562,15 +564,38 @@ make help # show all targets

See [Development and Deployment](docs/DEPLOYMENT.md) for Docker, Compose, Ollama embedding, and release setup.

## Optional Memory Agent and AML backend

The [Memory Agent](docs/memory-service.md) exposes the v0.3.4 AML evaluation
engine through explicit `mnemon memory-agent ...` commands. It stores original
records, builds a source-linked memory index, and returns evidence for an agent
to answer from. Reads and consolidation require separately configured models.

Existing `remember`, `recall`, `search`, `setup`, hooks, and the Web library keep
using native Memory and `mnemon.db`. No automatic migration, model activation,
or switch of the default engine is performed. Build this branch to use the new
commands; opening a PR does not update the published CLI or npm release.

`mnemon memory-agent aml-serve` adds the AML Add/Search API with per-user stores,
bounded background consolidation, authentication and budgets. Its operational
surface includes readiness, metrics, redacted logs, traces and read-only
inspection. See the [AML adapter runbook](docs/aml-adapter.md),
[Admin API](docs/admin-api.md), and [Inspect API](docs/inspect-api.md).
The separate hosted console, frontend UI/UX, design prototypes and private
evaluation data are outside this source snapshot.

## Documentation

- [Agency Preview](docs/AGENCY.md) — maturity boundary, Pi setup, operating model, completion semantics, and optional peers
- [Go Engineering Standard](docs/development/go-engineering-standard.md) — maintainability, concurrency, persistence, testing, and review thresholds
- [Design & Architecture](docs/DESIGN.md) — current engine architecture, algorithms, integration design
- [Memory Usage & Reference](docs/USAGE.md) — root Memory commands, import, receipts, and embedding support
- [Optional Memory Agent](docs/memory-service.md) — v0.3.4 baseline, explicit configuration, records and evidence Views
- [Memory Import Guide](docs/IMPORT.md) — schema and LLM prompt for importing historical chats
- [Architecture Diagrams](docs/diagrams/) — system architecture, pipelines, lifecycle management
- [Memory Agent (experimental)](experimental/memory-agent/) — research preview of Mnemon as a memory agent on DSH, with Jev as its System 1 decision model; paper, code and run records
- [AML adapter runbook](docs/aml-adapter.md) — the Agent Memory Leaderboard service as memory cloud instances: install, open, operate, alerts, data deletion
- [Admin API](docs/admin-api.md) — an instance's admin listener: token, private bind, metrics, readiness, status and store overview

## Star History

Expand Down
32 changes: 31 additions & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,42 @@ We will acknowledge receipt within 48 hours and aim to release a fix within 7 da

## Scope

Mnemon runs locally and stores data in `~/.mnemon/`. Key security considerations:
The Memory CLI runs locally and stores data in `~/.mnemon/`. The AML adapter is a network
service; its model is under "Network service" below. Key security considerations for local use:

- **SQLite database** — contains all stored insights; protected by filesystem permissions (`0644`).
- **Hook scripts** — shell scripts executed by the LLM CLI at lifecycle events; written with `0755` permissions.
- **Embedding provider connection** — optional requests send insight or query text to the configured Ollama or OpenAI-compatible server. The default local Ollama endpoint does not use TLS. If `MNEMON_EMBED_ENDPOINT` points outside a trusted local network, use HTTPS to protect content and any `MNEMON_EMBED_API_KEY` bearer token in transit.

### Network service (memory cloud instances)

`mnemon memory-agent aml-serve` is a network service: one engine instance per account of the
memory cloud ([runbook](docs/aml-adapter.md)). Its security model:

- **Data plane.** `POST /add` and `POST /search` require the instance's API key
(`Authorization: Bearer`, `Token`, or `X-Api-Key`), compared in constant time. The data
listener binds loopback; Caddy terminates TLS in front of it. `GET /health` needs no key and
says nothing but `{"status":"ok"}`. Each user has a separate store; one user cannot reach
another's records.
- **Admin plane.** Metrics, readiness, status, the store overview and the profiler are served
on a separate admin listener, never on the data listener. It binds a loopback address, or a
private one only together with an admin token, which every admin request must carry as a
bearer token ([Admin API](docs/admin-api.md)); any other address is refused at startup.
- **Private network.** The instances' admin listeners bind their hosts' WireGuard overlay
addresses. The console on the ops host reaches them over that overlay only, and the instance
hosts' firewalls admit the admin ports only from the hub, on the overlay interface. No admin
port listens on a public address.
- **Secrets.** API keys, admin tokens, provider keys and alert webhooks live in root-only
(0600) environment files on the instance host; the console keeps the admin tokens in its own
0600 registry and only a fingerprint of each API key. An API key, an admin token or a provider
key never appears in a URL, a log line, a metric label or an error. An alert webhook is a URL
by design (a Telegram bot's token, or a Feishu or WeCom hook's key, is in its path or its
query), so it is never printed, logged or passed as an argument. The host scripts pass the
other secrets to programs only on standard input, never as arguments.
- **Data handling.** Request bodies and user ids are never logged; a user appears only as the
first 8 hex digits of its store's hash. An instance's data is removed with
`mnemon-instance delete`, one user's with `mnemon-instance delete-user`.

## Supported Versions

| Version | Supported |
Expand Down
Loading
Loading