OpenParable
Skip to content
← Back to skills

Moss Search

Research
moss-search

Moss Search is an Agent Skill for research published in the usemoss/moss repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Sub-10ms semantic search for Zo via Moss. Create indexes, add documents, and query them with semantic and keyword search. Use when users want to search through documents, knowledge bases, or any text content.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/usemoss/moss/blob/HEAD/packages/zo-computer/zo-skill/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/moss-search, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Moss Search

Sub-10ms semantic search. Run from anywhere:

bash /home/workspace/Skills/moss-search/scripts/moss.sh load-index support-docs
bash /home/workspace/Skills/moss-search/scripts/moss.sh search support-docs "how long do refunds take?"
bash /home/workspace/Skills/moss-search/scripts/moss.sh create-index my-docs '[{"id":"1","text":"Refunds take 3-5 days."}]'

Commands

load-index

Download an index into memory for sub-10ms local queries. Always call this before searching an index for the first time.

bash /home/workspace/Skills/moss-search/scripts/moss.sh load-index <index-name>

Examples:

bash /home/workspace/Skills/moss-search/scripts/moss.sh load-index support-docs
bash /home/workspace/Skills/moss-search/scripts/moss.sh load-index code-docs

search

Search a loaded index. Sub-10ms after load-index.

bash /home/workspace/Skills/moss-search/scripts/moss.sh search <index-name> "<query>" [top_k]

Examples:

bash /home/workspace/Skills/moss-search/scripts/moss.sh search support-docs "how do I get a refund"
bash /home/workspace/Skills/moss-search/scripts/moss.sh search code-docs "authentication middleware" 10

create-index

Create a new index with initial documents.

bash /home/workspace/Skills/moss-search/scripts/moss.sh create-index <index-name> '<json-docs-array>'

Example:

bash /home/workspace/Skills/moss-search/scripts/moss.sh create-index faq '[{"id":"1","text":"Refunds take 3-5 business days."},{"id":"2","text":"Contact [email protected] for help."}]'

list-indexes

List all available indexes.

bash /home/workspace/Skills/moss-search/scripts/moss.sh list-indexes

add-docs

Add documents to an existing index.

bash /home/workspace/Skills/moss-search/scripts/moss.sh add-docs <index-name> '<json-docs-array>'

Example:

bash /home/workspace/Skills/moss-search/scripts/moss.sh add-docs faq '[{"id":"3","text":"Free shipping on orders over $50."}]'

delete-docs

Delete documents by ID.

bash /home/workspace/Skills/moss-search/scripts/moss.sh delete-docs <index-name> '["id1","id2"]'

get-docs

Retrieve documents from an index.

bash /home/workspace/Skills/moss-search/scripts/moss.sh get-docs <index-name>
bash /home/workspace/Skills/moss-search/scripts/moss.sh get-docs <index-name> '["id1","id2"]'

delete-index

Delete an entire index.

bash /home/workspace/Skills/moss-search/scripts/moss.sh delete-index <index-name>

For Zo

On every new conversation

  1. Run moss.sh list-indexes to see what indexes are available.
  2. Run moss.sh load-index <index> for each index the user is likely to need.
  3. Run moss.sh search <index> "<keywords>" to surface relevant context from the user's first message.
  4. Weave relevant results into your response naturally.

Skip the startup load for vague openers like "hey" or "what's up".

When to search

  • User asks about information that might be in an indexed collection
  • User references prior documents, notes, or knowledge base content
  • You are about to give advice and relevant indexed context may exist
  • Earlier search results were weak — try 2-3 alternate keyword queries

When to create/update indexes

  • User explicitly asks: "index this", "add this to search", "create an index"
  • User provides documents, notes, or data they want searchable
  • User wants to build a knowledge base or FAQ

Using search results

  • Use relevant results naturally — cite them inline
  • If a result conflicts with what the user says, mention it: "The indexed docs say X — has that changed?"
  • If no relevant results are found, proceed normally

Behavior summary

User signalAction
New conversation startsmoss.sh list-indexes then moss.sh load-index + moss.sh search relevant indexes
"Search for..." / "Find..." / "Look up..."moss.sh search <index> "<query>" (load-index first if not loaded)
"Index this" / "Add to search"moss.sh add-docs <index> '<docs>'
"Create an index" / "New collection"moss.sh create-index <name> '<docs>'
"Delete this document"moss.sh delete-docs <index> '["id"]'
"Remove this index"moss.sh delete-index <index>
"What indexes do I have?"moss.sh list-indexes
"Show me the documents in..."moss.sh get-docs <index>