anymo Docs
Core concepts

Query Fabric

Query Fabric is Anymo's local retrieval layer: one index over your files, code, docs, memory, skills, tools, artifacts, and events. It is deterministic, lexical, and entirely on your machine; no embeddings, no cloud.

What gets indexed

The engine indexes redaction-safe documents from eight source scopes:

ScopeSourceNotes
filesWorkspace text filesWalked recursively with excludes
codeSource filesDetected by path; same walk, higher precision scope
docsFiles under docs/Treated as documentation
memoryMemory itemsApproved items count as verified claims
skillsSaved skillsName, description, tools, and step text; tested skills count as verified
toolsTool specsDescription, permissions, risk, and schema; boosted authority
artifactsRun artifactsName, redacted path, MIME type
eventsRun eventsPayload JSON with run id and sequence

Indexing is defensive by default:

  • Files over 512 KB are skipped, binary content is skipped, and secret-looking text is skipped entirely.
  • Default excludes cover .git, .env, target, node_modules, browser credential stores, and Anymo's own internal directories; your .gitignore patterns and anymo.project.toml excludes are honored on top.
  • Every title, body, and path is redacted before it is stored, so the index never holds home paths or secret values.

The index lives in workspace-local SQLite and is incremental: kernel hooks re-index a file when it changes, an event when it is appended, and an artifact when it is written. anymo index rebuilds it from scratch at any time, so the index is a disposable cache, never a source of truth.

How search works

  1. Plan

    The planner expands your query into subqueries. fast mode searches the raw query only; balanced adds a synonym-expanded variant; deep mode (or a high reasoning level) also splits multi-part questions into separate subqueries.

  2. Find candidates

    When SQLite's FTS5 extension is available, candidates come from a full-text match. When it is not, the engine falls back to token and substring scoring over recent documents, so retrieval never depends on optional SQLite features, embeddings, or the network.

  3. Score

    Each candidate's score is a transparent sum:

    scoring
    score = lexical match
          + recency boost
          + source authority      (tool specs rank higher by default)
          + 0.35 if verified      (approved memory, tested skills)
          + project relevance
  4. Merge, dedupe, explain

    Results from all subqueries merge, keeping each document's best score. Duplicate content is removed by content hash. Every result carries a why_matched explanation and evidence anchors (a quote, the path or URL, and the content hash), so an agent can cite exactly what it found.

Identical inputs produce identical rankings. That determinism is deliberate: agents can re-run a query during replay or resume and reason about the same results.

Using it

Agents use Query Fabric implicitly when they search their workspace and memory. You can also drive it directly:

sh
anymo index --workspace anymo-demo                      # build or rebuild the index
anymo query "provider failover" --workspace anymo-demo  # search it
anymo query "auth flow" --source code --mode deep       # scope and mode
anymo tool-search "read a file"                         # rank tool specs for a task
anymo context-pack "summarize the demo"                 # budgeted context packets

Flags: --source SCOPE restricts scopes, --mode fast|balanced|deep picks the planning depth, --max-results N caps output, --json emits machine-readable results.

tool-search answers "which tool should handle this?" It indexes the registry's tool specs (descriptions, permissions, risk levels, input schemas) in memory and returns the top three to five matches, with a pure lexical fallback if the engine cannot be built. This is how large tool registries stay usable: an agent retrieves the relevant specs instead of reading all of them.

Context packs

context-pack turns search results into bounded context packets for a run: each packet carries the snippet, why it matched, its source, and provenance, and packets are added in rank order until the token budget (4,096 by default) is spent. The same builder powers swarm handoffs and compaction resume, with a priority order that keeps pending approvals, constraints, and failures ahead of generic summaries.

Access from other agents

Any MCP-capable agent can mount Anymo's brain and search it: anymo mcp-serve exposes anymo.query and anymo.context_pack read-only, with the same redaction guarantees. See Runtime Bridge.

What about semantic search?

Deferred, by decision. The engine already defines seams for an embedding provider, a vector store, and a reranker, and scores semantic matches additively when they exist, but no embedding backend ships in the beta. Lexical-first keeps retrieval local, deterministic, and dependency-free; embeddings can be added later without changing how results are consumed.

Anymo ยท Apache-2.0 GitHub