agentleFS
codecoradevcodecoradev/uteke/.agents/skills/uteke-memory/SKILL.md

uteke-memory

Skill268 starsChanged 57 days agoApache-2.0View on GitHub

Persistent memory engine for AI agents via the uteke CLI — remember, recall, search, forget with hybrid + fusion semantic search (fusion default since 0.16.0), documents, knowledge graph, rooms, tiered memory, and multi-agent namespaces.

  • In this repositoryOne other file it gives its agents.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    No shell hook, no daemon required (subprocess transport).

    line 305

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Uteke Memory Skill

Persistent memory engine for AI agents via the uteke CLI. Version: 0.19.1 — SQLite + usearch HNSW + FTS5 hybrid search (RRF k=60); fusion (weighted RRF of the vector and hybrid rankings) is the default recall strategy since 0.16.0. Zero unsafe code.

This skill ships with each release — its version tracks the CLI version (a CI gate fails when they drift, see skill-version-parity test). If this file is older than your uteke --version, run uteke init again or re-read the docs for the current release.

Hermes integration: Install the uteke-memory plugin for automatic recall on every turn via the pre_llm_call hook. No shell hook or daemon needed. See extensions/hermes-uteke-memory/ for the plugin source. Manual tool calls via uteke-tool plugin remain available for explicit remember/forget/room operations.

Global Flags (all commands)

FlagDescription
--store <PATH>Override store path (default: ~/.uteke)
--namespace <NS>Multi-agent isolation (default: "default")
--jsonMachine-readable JSON output
--verboseDebug logging

Commands

Core Memory Operations

CommandDescriptionKey Options
uteke remember <TEXT>Store a new memory--tags, --type, --entity, --category, --meta, --room, --author, --source, --source-type, --detect-contradiction
uteke recall <QUERY>Fusion search (default since 0.16.0 — weighted RRF of vector + hybrid rankings)--limit, --tags, --entity, --category, --min, --strategy (fusion/vector/fts5/hybrid/graph), --salience, --recency, --related, --depth, --context, --at (time-travel), --type (all/memory/doc), --where (JSON field filter)
uteke search <QUERY>Keyword text search--limit, --tags
uteke listList memories with filters--tag, --entity, --category, --limit, --offset, --at
uteke get <ID>Get single memory by UUID
uteke forget <ID>Delete memory by ID, tag, tier, or all--tag, --cold, --all, --confirm

Documents (Wiki / Knowledge Base)

CommandDescriptionKey Options
uteke doc create <SLUG>Create document from file/stdin--title, --file, --content, --tags, --parent
uteke doc get <ID_OR_SLUG>Get a document
uteke doc update <ID_OR_SLUG>Partial update — only provided fields change--title, --content, --file, --tags, --metadata
uteke doc delete <ID>Delete document (cascades to children)
uteke doc listList documents--limit, --tree (hierarchy)
uteke doc search <QUERY>Search documents (semantic + FTS5)--limit, --mode (semantic/fts/hybrid)
uteke doc children <PARENT>List child documents--limit
uteke doc move <ID_OR_SLUG>Move to new parent or root--parent
uteke doc breadcrumbs <ID_OR_SLUG>Show path from root
uteke doc descendants <ID_OR_SLUG>List all descendants--max-depth, --limit
uteke doc exportExport all documents as JSON--output

Knowledge Graph

CommandDescriptionKey Options
uteke graph nodesList all graph nodes--entity-type
uteke graph edgesList all graph edges--relation
uteke graph neighbors <LABEL>Find neighbors (BFS)--depth
uteke graph path <SRC> <TGT>Shortest path (BFS)--max-depth
uteke graph query <RELATION>Query edges by relation type
uteke graph statsGraph statistics

Memory Relationships

CommandDescriptionKey Options
uteke edges <ID>List edges for a memory (auto-wired backlinks/forward links)--deep (BFS depth), --direction (incoming/outgoing/both)
uteke rebuild-backlinksRebuild referenced_by from forward edges--quiet

Rooms (Collaborative Memory)

CommandDescriptionKey Options
uteke room create <ID>Create a room--title
uteke room listList all rooms--namespace
uteke room stats <ID>Room statistics and participants
uteke room recall <ID>Recall room memories--query, --author, --limit, --min
uteke room summary <ID>Topic clustering summary
uteke room document <ID>Generate structured document from room
uteke room delete <ID>Delete room (memories preserved)--confirm

Pinning & Importance

CommandDescription
uteke pin <ID>Pin a memory (never decays)
uteke unpin <ID>Unpin a memory
uteke importanceRecalculate importance scores for all memories
uteke orphansFind disconnected memories with low importance--threshold (default 0.3), --limit (default 50)

Maintenance

CommandDescriptionKey Options
uteke dreamFull maintenance pipeline: lint → backlinks → dedup → orphans → compact → verify (dry-run first by default)--phases, --skip, --dry-run, --quiet
uteke lifecycle <cycle|promote|status>Safe lifecycle: soft-deprecate aged memories, promote back, status--namespace
uteke consolidateMerge near-duplicate memories--threshold (default 0.90), --dry-run
uteke pruneRemove deprecated/expired memories--ttl (default 30), --dry-run
uteke timeline <ID>Show audit log events for a memory--limit (default 20)

Tags & Namespaces

CommandDescription
uteke tags listList all tags with counts (--by-count)
uteke tags rename <old> <new>Rename a tag across all memories
uteke tags delete <tag>Delete a tag from all memories (--confirm)
uteke namespace listList all namespaces with counts
uteke namespace stats <name>Stats for a specific namespace
uteke namespace switch <name>Set default namespace in config

Memory Aging

CommandDescriptionKey Options
uteke aging statusHot/warm/cold/never-accessed breakdown
uteke aging previewPreview stale memories--older-than-days (default 180), --max-access-count (default 1)
uteke aging cleanupDelete aged memories--older-than-days, --max-access-count, --yes

Health, Stats & Data

CommandDescription
uteke statsMemory store statistics + tier breakdown
uteke doctorFull health check: DB, index, embedding model, consistency
uteke verifyCompare DB count vs vector index count
uteke verify-checksumsVerify binary integrity against SHA256 checksums
uteke repairRebuild vector index from SQLite

Stale-index symptom (pitfall 0g): a memory is recallable via --strategy fts5 but missing under the default fusion/hybrid — that is a vector-index desync, not data loss. Run uteke verify, then uteke repair. On uteke-serve, use POST /verify / POST /repair (HTTP) or the uteke_verify / uteke_repair MCP tools — no restart needed. Run verify after every serve upgrade (#1245 class: CLI upgraded, serve left behind → index written by the old binary reads as mismatched).

Search strategy guide — filters, not silos:

  • namespace = agent/workspace identity — pass it explicitly on recall.
  • room = collaborative discussion context (uteke room recall).
  • tags (e.g. project:<repo>) = the primary project filter.
  • Strategies: fusion (default), hybrid (RRF vector+FTS5), fts5 (keyword — best for short 1–3 word queries and exact terms), vector (pure semantic), graph. Scores are rank-based (RRF), not cosine — don't threshold them like similarity; use recall --explain for the real vector similarity.
  • Prefer 2–3 core keywords: FTS5 AND-matches all tokens, long natural sentences can zero out the keyword arm.

Import / Export / Bench

CommandDescription
uteke export [FILE]Export to JSONL (no embeddings). Default: stdout
uteke import [FILE]Import from JSONL/Markdown/text. Default: stdin
uteke benchPerformance benchmarks--counts, --json

Setup & Upgrade

CommandDescription
uteke init --agent <TYPE>Initialize integration (pi/claude/cursor/opencode/hermes)
uteke hook install <SHELL>Install shell hook (bash/zsh/fish)
uteke completions <SHELL>Generate shell completions (bash/zsh/fish/powershell)
uteke upgradeCheck for updates and upgrade-y (skip confirmation)
uteke onboardInteractive setup wizard: detect install, pick agent, toggle features, write config--yes --agent <TYPE>

Architecture

  • Storage: SQLite (WAL mode) with namespace column + FTS5 virtual table
  • Vector index: usearch persistent HNSW (768d, cosine similarity)
  • Hybrid search: RRF (k=60) merges vector + FTS5 results; graph strategy adds graph-signal reranking
  • Fusion (default since 0.16.0): weighted RRF of the vector and hybrid rankings — LongMemEval 500Q R@5 0.946
  • Embedding: ONNX EmbeddingGemma Q4 (768d), auto-downloaded
  • Tiered memory: Hot (<7d, +0.1 boost), Warm (<30d), Cold (>30d)
  • Schema versioning: Integer counter, auto-migration on upgrade
  • Zero unsafe code (unsafe_code = "forbid")
  • Project-scoped stores: uteke --store .uteke remember "..."

Usage Patterns

Session lifecycle

uteke recall "project architecture decisions" --namespace pi-agent
uteke remember "Use WAL mode for concurrent reads" --tags architecture,db --entity db-layer
uteke recall "last session state" --namespace pi-agent

Metadata-enriched storage

uteke remember "Deploy staging to AWS us-east-1" \
  --tags deploy,aws --entity staging-server --category infrastructure \
  --source "meeting-notes.md" --source-type file

Time-travel queries

uteke recall "auth flow" --at 2026-06-01T12:00:00Z
uteke list --at 2026-06-01T12:00:00Z

Graph-enhanced recall

uteke recall "database design" --strategy graph --related --depth 2
uteke graph neighbors "auth-service" --depth 3
uteke graph path "api-gateway" "database"

Document wiki

uteke doc create architecture/overview --title "Architecture Overview" --file overview.md --parent docs
uteke doc search "authentication" --mode hybrid
uteke doc list --tree

Room collaboration

uteke remember "Decision: use PostgreSQL" --room design-review --author alice
uteke room recall design-review --query "database"
uteke room summary design-review

Programmatic (JSON)

uteke recall "auth flow" --json --limit 3
uteke stats --json
uteke list --tag architecture --json --limit 50

Maintenance pipeline

uteke dream                           # Full pipeline
uteke dream --phases lint,verify --dry-run  # Selective, safe
uteke importance                      # Recompute scores
uteke orphans --threshold 0.2         # Find disconnected

Project-Aware Memory (MANDATORY)

Always tag memories with project:<name> when working in a project. This prevents noise when recalling — you only see memories relevant to the current project.

How to detect the project name

  1. From workdir / cwd — extract the repo folder name:
    • /home/user/repos/bond/ → project:bond
    • /home/user/repos/uteke/ → project:uteke
    • /home/user/repos/my-saas-app/ → project:my-saas-app
  2. From file paths mentioned in the conversation
  3. From the project name the user mentions

Rules

RuleDetails
REMEMBERAlways include project:<name> in --tags when the memory is project-specific
RECALLAlways include --tags project:<name> to scope recall to the current project
NO PROJECTIf the conversation is not about any specific project (e.g., general chat), do NOT add a project: tag
TAG FORMATAlways lowercase: project:bond, project:uteke (not project:Bond)

Examples

# Working on the "bond" project
uteke recall "auth flow" --tags project:bond
uteke remember "JWT rotation implemented with refresh tokens" --tags project:bond,decision,auth
uteke remember "DB schema uses UUID v7 for primary keys" --tags project:bond,architecture,db

# Working on the "uteke" project
uteke recall "vector index corruption" --tags project:uteke
uteke remember "Fixed usearch rebuild race condition" --tags project:uteke,bugfix,index

# General conversation — no project tag
uteke remember "User prefers concise responses" --tags preference

# Cross-project recall (explicitly requested)
uteke recall "shared auth pattern" --tags project:bond,project:corin

Why this matters

Without project tags, memories from all projects mix together. When you recall "fix auth bug" while working on project Bond, you might get results from project Corin's auth system — causing confusion and wasted context. Project tags ensure recall is scoped and noise-free.

When to Use

TriggerAction
Before starting workuteke recall "<project context>" --tags project:<name>
After making decisionsuteke remember "<decision>" --tags project:<name>,<other tags>
Important documentsuteke doc create <slug> --file <path> --parent <slug>
Collaborative decisionsuteke remember "..." --room <room> --author <name>
Memory feels staleuteke dream or uteke importance
Index feels corruptuteke doctor → uteke repair

Hermes Auto-Recall Plugin

The uteke-memory plugin registers a pre_llm_call hook that automatically recalls relevant memories on every turn and injects them into the user message. No shell hook, no daemon required (subprocess transport). Supports HTTP transport to uteke-serve for container deployments.

# Generate and install the plugin
uteke init --agent hermes
# → writes to ~/.hermes/plugins/uteke-memory/

# Enable in config.yaml
# plugins:
#   enabled:
#     - uteke-memory

Config via ~/.hermes/uteke.json or env vars: UTEKE_BIN, UTEKE_NAMESPACE, UTEKE_SERVER_URL, UTEKE_TOKEN, UTEKE_RECALL_LIMIT (default 5), UTEKE_RECALL_MIN_SCORE (default 0.40).

Server Mode (uteke-serve)

HTTP daemon with REST API for all operations + monitoring/maintenance endpoints.

uteke-serve --port 8767
# CLI auto-routes to server when running: ~42ms recall vs ~3s cold start

Endpoints mirror CLI commands (e.g., POST /remember, POST /recall). Supports read-only API tokens for restricted access.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.