Practical overview
When it fits
Use Needle when an application needs local inference for tool selection, schema-constrained extraction or embeddings and must fit a compact model into an edge deployment.
Who it is for
- Developers building offline or edge assistants
- Teams exposing device functions through structured tools
- Applications that need typed extraction from messy text
- Edge systems requiring local embeddings for search, matching or routing
Documented uses
- Select application-provided functions from natural-language requests
- Fill tool arguments from user input
- Extract typed fields according to a declared schema
- Create text embeddings locally
- Combine local speech transcription with downstream tool calls using the shared engine
Requirements & limits
The repository is public and specifies an Apache-2.0 license. The documented Python installation command is `pip install cactus-needle`.
- The model is compact: the repository describes an 8–29 MB binary using 2-bit representation.
- Tool responses are constrained to exposed functions; unsupported requests return an empty list rather than a guessed tool call.
- Structured extraction uses declared schemas and a byte-level grammar designed to keep output parseable.
- Needle supports mobile and self-hosted deployment targets.
- The Python example returns function calls, reasoning and a calibrated confidence score.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up Needle for a Python tool-calling workflow
Install the Python package, expose a typed application function and pass a user request to Needle.
Before you start
- Python environment
- The
cactus-needlepackage - A function with typed arguments and a descriptive docstring
Steps
Install the package with the command below.
pip install cactus-needleDecorate an application function with
needle.tool.Create
needle.Needlewith the tool in itstoolslist.Call
agent.run()with a natural-language request and read the returnedresults.
Expected outcome
The documented example returns a JSON-compatible result from the application function selected by Needle.
Guide limitations
- The example covers tool definition and invocation, but does not document a complete device integration.
- Needle returns an empty list when a request has no matching exposed tool.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 2 October 2026
- Original website title
- cactus-compute/needle · Official homepage title · retained in its source language

