sha256:666ce9b464e4d395b101349567ef1ced2afeb7b8747a92c2a5e8f4980844aa36
Last pushed
5 days by richardaubin
Type
Sandbox Kit
Manifest digest
sha256:666ce9b464e4d395b101349567ef1ced2afeb7b8747a92c2a5e8f4980844aa36
schemaVersion: "3"
displayName: agentmemory client
description: Vendored @agentmemory/agentmemory CLI, pi package and MCP shim, wired into pi by `agentmemory connect pi --with-mcp` on every boot, pointed at a self-hosted agentmemory server on the host's loopback with the bearer injected by the sandbox proxy.
sourceUrl: https://github.com/rohitg00/agentmemory
version: 1.0.0
licenses:
- Apache-2.0
kind: mixin
provides:
- [email protected]
requires:
- pi >= 1.5.2, < 2.0.0
capabilities:
- type: com.docker.sandbox/network-policy@1
config:
runtime:
allow:
- host.docker.internal:3111
- localhost:3111
- type: com.docker.sandbox/credential@1
config:
apiKey:
inject:
- domain: host.docker.internal
format: Bearer %s
header: Authorization
- domain: localhost
format: Bearer %s
header: Authorization
name: AGENTMEMORY_PROXY_TOKEN
proxyManaged: true
phase: runtime
service: agentmemory
description: 'Bearer for the self-hosted agentmemory server. It never enters the sandbox: the container holds only the sentinel, and the sandbox proxy rewrites Authorization on the way out.'
- type: com.docker.sandbox/lifecycle@1
config:
startup:
- command:
- sh
- -c
- |
set -u
log="$HOME/.agentmemory-kit.log"
fail=0
{
printf '== agentmemory kit startup %s ==\n' \
"$(date -u +%Y-%m-%dT%H:%M:%SZ)"
agentmemory connect pi --with-mcp || fail=1
node /opt/agentmemory/wire-mcp-exposure.mjs || fail=1
if [ "$fail" -ne 0 ]; then
printf '[agentmemory-kit] wiring FAILED (see above)\n'
fi
} >>"$log" 2>&1
# Never brick the sandbox for a memory add-on: the failure is
# logged, and the agent-context note below tells the agent how
# to check (`agentmemory status`, this log).
exit 0
description: Wire pi to the agentmemory server (idempotent, every boot)
env:
- AGENTMEMORY_URL
- type: com.docker.sandbox/agent-context@2
optional: true
config:
content: 'Persistent cross-session memory is available from a self-hosted agentmemory server at http://host.docker.internal:3111 (REST and MCP). It is a service on the machine hosting this sandbox, not internet egress, and its bearer is injected by the sandbox proxy: never handle or paste a token yourself. pi is wired two ways by the agentmemory kit — the native package from `agentmemory connect pi --with-mcp` (recall on start, capture on stop, /agentmemory-status, /skill:recall, /skill:remember and friends) and an MCP server named `agentmemory`. Of that server only 14 tools are declared directly: memory_save, memory_recall, memory_consolidate, memory_smart_search, memory_sessions, memory_diagnose, memory_lesson_save, memory_reflect and memory_slot_list, memory_slot_get, memory_slot_create, memory_slot_append, memory_slot_replace, memory_slot_delete. The server''s other ~40 tools (graph, actions, sentinels, leases, signals, sketches, checkpoints, vision, mesh, export/import) are callable from the codemode tool as mcp__agentmemory__<name> — look one up there instead of giving up because it is not in your tool list. The CLI is /usr/local/bin/agentmemory: run `agentmemory status` to see whether the server is reachable and authenticated, and `agentmemory doctor` when it is not; the wiring log is ~/.agentmemory-kit.log. A status reading of `Connected — v?` plus `Health: unknown` means the egress grant to the endpoint is missing, not that memory is off. To test the whole path — reach, write, read back, delete — run `agentmemory-smoke`; it writes one row tagged kit-smoke and removes it again, and needs no token from you. Prefer slots for durable state: persona, user_preferences, tool_guidelines, project_context, guidance and pending_items are injected automatically, so write standing preferences and corrections there with memory_slot_append instead of repeating them, and use memory_save for facts worth recalling later. After any wiring change restart pi or run /reload.'
args:
version:
default: 0.9.33
description: '@agentmemory/agentmemory release this kit vendors. Pin the agentmemory SERVER to the same release: the shim speaks that server''s tool protocol, and the pi package is copied out of this same tarball.'
pattern: ^[0-9]+\.[0-9]+\.[0-9]+$
buildArg: AGENTMEMORY_VERSION