Skip to content

feat(memoryagent): add self-hosted "systemone" decision provider kind - #184

Open
audreyt wants to merge 1 commit into
mnemon-dev:masterfrom
audreyt:feat/memoryagent-systemone
Open

audreyt wants to merge 1 commit into
mnemon-dev:masterfrom
audreyt:feat/memoryagent-systemone

Conversation

@audreyt

@audreyt audreyt commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Add a "systemone" provider kind alongside "jev" so AML memory-agent deployments can use self-hosted or custom System One decision servers (such as Karpo Decision 31B or local Ollama clef/clef-flash) over POST /v1/systemone without JEV version pinning, paid budget requirements, or mandatory API keys.

Summary of changes

  • internal/memoryagent/provider.go: Add kind: "systemone" accepting https:// or loopback http:// baseURLs, normalizing base, /v1, and /v1/systemone paths. Reuses the System One decision path (MaxQuestions() == 128, rejects Complete), parses usage without JEV USD billing, and checks keyEnv fail-closed when explicitly configured. Leaves all "jev" invariants untouched.
  • internal/memoryagent/budget.go: Treat "systemone" as unpaid (like "local"), requiring no paid budget reservation.
  • internal/memoryagent/resilience.go: Apply interactiveDecisionTimeout to "systemone" calls.
  • internal/memoryagent/keys.go: Recognize "systemone" in KindName, modelsURL, and checkBody.
  • internal/memoryagent/provider_test.go: Add TestSystemOneProviderSupportsKarpoDecision covering Karpo-shaped responses, endpoint normalization, keyless loopback, HTTPS + optional keyEnv, and non-loopback HTTP rejection.

Example memory-config.json

"judge": {
  "kind": "systemone",
  "model": "karpo-decision",
  "baseURL": "http://127.0.0.1:18440"
}

Validation

  • go vet ./...
  • go test ./internal/memoryagent ./test/mnemond/architecture -count=1
  • Verified end-to-end against karpo-decision-31B over POST /v1/systemone.

Add a "systemone" provider kind alongside "jev" so AML memory-agent deployments can use self-hosted or custom System One servers (such as Karpo Decision 31B or local Ollama clef/clef-flash) over POST /v1/systemone without JEV model pinning, paid budget requirements, or mandatory API keys.

- Accepts https:// or loopback http:// baseURLs and normalizes base, /v1, and /v1/systemone paths.
- Leaves all existing "jev" invariants (pinned versions, strict metering, USD billing, BYOK, budget caps) untouched.
- Enforces fail-closed credential checks when keyEnv is explicitly configured, uses the 128-question batch limit and interactive decision timeout, and rejects completion calls.

Validation: go vet ./... and targeted memoryagent/aml/architecture tests pass.
@audreyt
audreyt force-pushed the feat/memoryagent-systemone branch from 18ad06d to b0f58e5 Compare November 22, 2026 00:45
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