Who it is forA user with a long contact list who remembers the role of a person but not their name.
The problemKeyword lookup in a contact book fails when you only remember what someone does, such as a doctor or an emergency contact.
The outcomeA list of contacts that match the meaning of your query, produced by the on-device Needle 3 model.
What you need first
- An Android phone with Termux and the Termux:API app installed
- Python and git available in Termux, with the Ubuntu PRoot environment set up as the README describes
- A Telegram bot token if you want remote control
Steps
- Complete the Termux and Ubuntu setup in the README, then run
git clone https://github.com/AbuZar-Ansarii/Needle.git,cd Needle, andpip3 install -r requirements.txtinside an activated virtual environment. - Start the assistant with
python termux_needle.py --model 3. - At the prompt, type "semantically search contacts for doctor or emergency".
- Read the returned contacts and confirm that the matches fit the role you asked for.
- To use the vector search directly, open app.py and check how the /api/embed endpoint expects its input before calling it. (inferred, check the README)
Prompt for your agent
In the Needle repo, start python termux_needle.py --model 3 and send the prompt "semantically search contacts for doctor or emergency". Return the matched contacts as a list. Verify that each result actually matches the requested role before reporting it.
Caveat. The README lists semantic contact search as a Needle 3 feature, but it does not say how contact data is loaded, so you may need to check the code to confirm results.
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page