Personal AI, On Personal Devices
Python
[skill]
name = "search-and-index"
description = "Search for documents matching a query and index them into memory for future retrieval"
version = "0.1.0"
author = "openjarvis"
[[skill.steps]]
tool_name = "shell_exec"
arguments_template = '{"command": "find {directory} -type f \\( -name \"*.txt\" -o -name \"*.md\" -o -name \"*.pdf\" \\) | head -50"}'
output_key = "found_files"
[[skill.steps]]
tool_name = "think"
arguments_template = '{"thought": "Filter the found files to those likely relevant to the query: {query}. Files: {found_files}"}'
output_key = "relevant_files"
[[skill.steps]]
tool_name = "memory_index"
arguments_template = '{"path": "{directory}"}'
output_key = "index_result"
[[skill.steps]]
tool_name = "memory_search"
arguments_template = '{"query": "{query}"}'
output_key = "search_results"