Uteke persistent memory extensions for the pi coding agent.
uteke-remote makes uteke your agent's long-term memory: it auto-recalls relevant
memories before each turn, can auto-save key facts after each turn, and registers
uteke_remember / uteke_recall tools the LLM can call on demand — all over plain
HTTP against any uteke server (local uteke-serve or remote). No CLI spawning,
no local store required.
- Auto-recall — before every agent turn, semantic memories relevant to the user's prompt are injected as context (project-tag scoped, with namespace-wide fallback).
- Auto-save — after a turn, a condensed summary of the key takeaway is
stored when it contains decision/fix/config/architecture signals; trivial
responses are filtered. On by default (
UTEKE_AUTOSAVE=falseto disable). - Direct tools —
uteke_remember/uteke_recallfor explicit LLM-driven memory operations (can be disabled to coexist with the uteke MCP server). - Commands —
/uteke,/uteke-recall,/uteke-save,/uteke-on,/uteke-off,/uteke-autosave. - Project isolation — every save is tagged
project:<name>and recalls are scoped to the current project first, preventing cross-project leakage in a shared namespace. - Resilient — server unreachable? Everything degrades silently; agent flow is never blocked.
pi install git:github.com/codecoradev/uteke-piOr try it once without installing:
pi -e git:github.com/codecoradev/uteke-piAll config is via environment variables (no credentials are stored in this repo):
| Env | Default | Description |
|---|---|---|
UTEKE_BASE_URL |
http://localhost:8767 |
uteke server base URL |
UTEKE_TOKEN |
(empty) | Bearer token (required when the server enforces auth) |
UTEKE_NAMESPACE |
default |
Memory namespace (multi-agent isolation) |
UTEKE_RECALL_LIMIT |
5 |
Max memories injected per turn |
UTEKE_MIN_SCORE |
0.80 |
Similarity floor for injected memories |
UTEKE_TIMEOUT_MS |
8000 |
Per-request HTTP timeout |
UTEKE_TOOLS |
auto |
auto (default) detects a uteke entry in pi's mcp.json (project .pi/mcp.json or global ~/.pi/agent/mcp.json) and skips direct tools when found; direct always registers tools; off always skips them |
UTEKE_AUTOSAVE |
true |
default ON: after each turn, a condensed summary is stored when it contains decision/fix/config/architecture signals (trivial responses are filtered). Set false/0 to start disabled, or toggle at runtime with /uteke-autosave |
UTEKE_PROJECT / UTEKE_PROJECT_TAG |
(auto) | Override project tag detection |
Example shell profile:
export UTEKE_BASE_URL="https://uteke.example.com"
export UTEKE_TOKEN="your-token-here"
export UTEKE_NAMESPACE="my-agent"- Local:
uteke-servefrom the uteke releases listens on127.0.0.1:8767. - Remote: any uteke server deployment works — the extension is just an HTTP client.
The MCP server exposes uteke_remember / uteke_recall / and more as MCP tools.
If you use both, this is detected automatically: when a uteke server is
configured in pi's mcp.json (project .pi/mcp.json or global
~/.pi/agent/mcp.json), the default UTEKE_TOOLS=auto skips registering the
direct tools so names don't collide. Set UTEKE_TOOLS=direct to force both
surfaces. Either way, the extension's auto-recall/auto-save/commands keep
working, and both surfaces read/write the same data.
| Command | Action |
|---|---|
/uteke |
Status: server health, totals, toggles |
/uteke-recall <query> |
Manual semantic recall |
/uteke-save <text> [--tags a,b] |
Store a memory |
/uteke-on / /uteke-off |
Toggle auto-recall injection |
/uteke-autosave |
Toggle auto-save |
| Endpoint | Purpose |
|---|---|
POST /remember |
Store {content, tags[], namespace, type?} → {id} |
POST /recall |
Semantic search {query, namespace, limit, tags?} → [{memory, score}] |
GET /health |
Liveness + memory count |
GET /stats |
Totals for the status command |
Apache-2.0 — same as uteke itself.