OpenViking
volcengine
Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:rrrrrredy/agent-memory-system
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Local-first, evidence-backed memory for coding agents.
Agent Memory System preserves the task evidence a runtime exposes, rebuilds it into episodes, turns supported observations into reviewable memory candidates, and shares only redacted memories with explicit validation and promotion records through a separate private Git repository. Deployment policy requires an operator to make those decisions; the software binds each attestation to the evidence but does not authenticate that the caller is human.
It is built for a harder question than “what should the agent remember?”:
What evidence supports this memory, is it still current, and can another machine use it without receiving the private transcript?
Version 0.3.0 adds immutable memory loadouts, evidence-bound review packets, replay-verifiable local Codex execution receipts, prospective longitudinal study records, and a loopback-only read-only dashboard to the storage, derivation, review, private Git, retrieval, recovery, and evaluation foundation. Runtime adapters remain version-sensitive. The system fails closed when evidence is incomplete or a compatibility claim cannot be verified.
Most memory tools summarize a conversation and place the summary in a retrieval index. This project separates evidence, judgment, and distribution:
flowchart LR
A["Agent-local traces"] --> B["Append-only evidence ledger"]
B --> C["Episodes and compaction checks"]
C --> D["Candidate memories"]
D --> E["Validation attestation"]
E --> F["Promote, supersede, or revoke"]
F --> G["Private Git memory repository"]
G --> H["Bounded cross-agent retrieval"]
H --> I["Immutable memory loadouts"]
I --> J["Native receipts and prospective studies"]
Raw transcripts, tool output, exposed reasoning, and local paths remain in the local evidence store. Git receives only the portable projection of an approved memory. A private repository is not treated as permission to upload raw task history.
AGENTS.md, Skills, and other rule surfaces are never changed without a
distinct, target-bound approval.These guarantees apply to locally available evidence. No client can recover provider-hidden reasoning or bytes that the runtime never exposed.
The project can be built from source with Go 1.25 or newer.
Windows PowerShell:
git clone https://github.com/rrrrrredy/agent-memory-system.git
cd agent-memory-system
New-Item -ItemType Directory -Force .\bin | Out-Null
go build -o .\bin\agentmem.exe .\cmd\agentmem
.\bin\agentmem.exe version
macOS or Linux:
git clone https://github.com/rrrrrredy/agent-memory-system.git
cd agent-memory-system
mkdir -p ./bin
go build -o ./bin/agentmem ./cmd/agentmem
./bin/agentmem version
Tagged releases provide checksum-verified Windows, macOS, and Linux archives; the supported installers target Windows and macOS. See install, upgrade, and uninstall.
A privacy-safe fixture under examples/quickstart exercises the same path as
real Codex history. One command imports, derives, verifies, and reports the next
operator action:
$Evidence = Join-Path ([System.IO.Path]::GetTempPath()) ("agentmem-" + [guid]::NewGuid())
$Onboard = .\bin\agentmem.exe onboard codex --root $Evidence --path .\examples\quickstart | ConvertFrom-Json
.\bin\agentmem.exe status --root $Evidence
.\bin\agentmem.exe review list --root $Evidence --status review_ready --limit 20
evidence="$(mktemp -d)/evidence"
./bin/agentmem onboard codex --root "$evidence" --path ./examples/quickstart
./bin/agentmem status --root "$evidence"
./bin/agentmem review list --root "$evidence" --status review_ready --limit 20
Review and promotion remain separate explicit decisions; onboard never makes
either decision. The quickstart provides complete
PowerShell and POSIX commands for review, promotion, private Git export, exact
retrieval, and switching to an existing Codex sessions directory.
A runtime probe is optional and never gates history import:
.\bin\agentmem.exe compatibility --agent codex
./bin/agentmem compatibility --agent codex
history_import_available remains separate from runtime_status, so a blocked
version probe does not hide a working offline importer.
| Surface | Current evidence |
|---|---|
| Codex rollout import | Maintainer-reported private real-rollout acceptance on Windows, plus public loss/compaction fixtures and cross-platform protocol tests; the private run is not independently reproducible from this repository |
| Claude Code import | Transcript, history, companion, thinking, and unknown-block fixtures on Windows, macOS, and Linux |
| OpenCode plugin | Pinned OpenCode runtime starts on a GitHub-hosted runner, loads the plugin, captures the matching session.created event, imports it, and verifies the ledger; no provider model or secret is used |
| DeepSeek Harness Bundle | Real Cordis, SessionStore, JSONL Persistence, and agent/pre-step composition tests cover verbatim backfill, crash-safe live capture, verified-memory injection, real CLI import, and clean unload; this is community-Bundle evidence, not DeepSeek certification |
| Review and memory lifecycle | Evidence-bound caller attestations, promotion, supersession, revocation, secret scanning, and conflict tests; caller identity is not authenticated |
| Cross-device memory | Private Git history verification, offline use, divergence handling, recovery, and hosted Windows/macOS/Linux tests |
| Native Codex memory diagnostic | A frozen 20-cluster synthetic suite ran 20 paired authenticated codex exec tasks with sealed no-tools policy and verified retrieval injections: 19 wins, 1 tie, 0 losses; baseline 1/20, memory 20/20; one-sided sign-test p=0.0000019073. This is bounded capability evidence, not longitudinal certification; see the aggregate receipt |
| Native Codex process receipts | Exact local Codex and runner bytes, request, arguments, raw JSONL, usage, output, and terminal state are replayed; provider, model, and private reasoning are not independently attested |
| Portable loadouts | Content-addressed exact revision sets, scope, Agent allowlist, budgets, stale-head rejection, and composite delivery receipts |
| Prospective studies | Pre-sealed requests and workspace snapshots, immutable Agent-message acceptance hashes, deterministic balanced assignment, one single-use study-bound attempt, and replay-derived outcomes; no completed real-world longitudinal efficacy claim is made |
| Learning efficacy | Frozen-corpus metrics and replay are implemented; efficacy certification remains blocked unless task execution is independently verified |
Run a local, non-mutating runtime probe:
agentmem compatibility
The probe checks executable availability and version output. It does not claim that an account is authenticated, that a provider ran a model, or that a native session was captured. See compatibility and evidence levels.
A portable memory is not an editable note. It is an immutable revision chain:
promote -> active revision
active revision -> supersede -> new active revision
active revision -> revoke -> tombstone
Only the current, non-revoked head can be retrieved. Two roots, two children of one parent, an altered historical file, or opposing active memories make verification fail. See promotion and portable memory.
Retrieval is deterministic and offline. It combines exact identity lookup, Unicode word and CJK-bigram matching, scope specificity, evidence strength, and stable tie-breaking. There is no zero-match fallback.
Use the CLI directly or expose the same verified search through a local stdio MCP server:
agentmem recall search --root <evidence> --repo <private-memory> --agent codex --query "release checks"
agentmem serve mcp --root <evidence> --repo <private-memory> --agent codex
Codex, Claude Code, OpenCode, and DeepSeek Harness consume the same portable
protocol. Their native hooks, plugins, or Bundles are optional; CLI and MCP
remain the stable boundary. The DeepSeek Harness community Bundle is documented
under integrations/deepseek-harness.
Create a reusable, exact set of promoted revisions:
agentmem loadout create --repo <private-memory> --name "Release checks" \
--scope-kind project --scope-value example-project --agent codex \
--memory <memory-id>
agentmem loadout context --root <evidence> --repo <private-memory> \
--loadout <loadout-id> --agent codex --scope-project example-project
Build one immutable review surface before promotion:
agentmem review packet --root <evidence> --status review_ready --limit 20
agentmem promote candidate --root <evidence> --candidate <candidate-id> \
--packet <review-packet-path-or-id> --approver local-user \
--reason "Approved after reviewing the bound packet."
Run and replay a local Codex process from a versioned request:
agentmem agent run codex --root <evidence> --file <request.json> \
--codex <codex-executable>
agentmem agent verify --root <evidence>
The local dashboard exposes verification summaries only:
agentmem serve dashboard --root <evidence> --repo <private-memory>
See loadouts, native execution, longitudinal studies, and the dashboard.
| Zone | Contains | May enter Git? |
|---|---|---|
| Local evidence | Exact transcripts, tool output, exposed reasoning, normalized events, gaps, receipts | No |
| Portable memory | Attested and redacted Markdown/YAML revisions plus immutable loadouts | Separate private repository only |
| Encrypted backup | Complete local evidence snapshot | Optional backup backend, never the memory repository |
Do not copy ~/.codex, Agent state databases, session directories, or the local
evidence root into the memory repository. SQLite may be used as a rebuildable
local index, never as Git-merged canonical data.
cmd/agentmem: cross-platform CLIadapters: loss-aware Codex, Claude Code, OpenCode, and DeepSeek Harness importersinternal/ledger: append-only evidence and content-addressed blobsinternal/episodes, internal/candidates: reconstruction and extractioninternal/review, internal/promotion: attested decisions and memory lifecycleinternal/portable, internal/gitsync: portable projection and private Gitinternal/loadout, internal/retrieval, internal/mcpserver: exact loadouts,
bounded query, and delivery receiptsinternal/reviewpacket: immutable candidate review surfacesinternal/agentbridge: replay-verifiable local Codex process evidenceinternal/study: prospective assignment, observation, and descriptive reportsinternal/dashboard: loopback-only read-only operational summaryinternal/codexbench: sealed native Codex baseline/memory diagnosticsinternal/evaluation: frozen corpora, paired trials, metrics, and replayinternal/backup, internal/diagnostics: encrypted recovery and integrityschemas: versioned public JSON contractsdocs/adr: architectural decisions and threat boundariesDetailed protocol documentation lives under docs. Start with the
product contract, threat model,
and verification guide.
go test ./...
go vet ./...
go build ./cmd/agentmem
The CI matrix runs on Ubuntu, Windows, and macOS. Stateful safety packages also run with the Go race detector. The OpenCode runtime smoke test installs its pinned runtime only inside the disposable hosted runner. The DeepSeek Harness Bundle has its own Node 22.19+/24 build, Cordis composition, and package tests.
See CONTRIBUTING.md before changing an adapter, schema, or evidence boundary. Never attach real transcripts or raw evidence to an issue.
MIT. See LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: agent-memory、claude-code。