cactus
Sub-50mb agentic, voice and vision intelligence for consumer devices.
What is cactus?
Sub-50mb agentic, voice and vision intelligence for consumer devices.
Overview of cactus
What it is
Needle is an automation foundation model designed for small devices such as mobile phones, wearables, smart home devices, robots, cars, and microcontrollers. The entire model is a single 8–29 MB binary built on a Simple Attention Network. It trades general chat capacity to achieve higher performance on mobile tool calls and structured extraction compared to larger models.
Key features
- Tool calls: given the functions exposed by an app, Needle selects the correct ones and fills every argument from user input. Multiple requests result in multiple calls in order; unsupported requests return an empty list.
- Structured extraction: accepts a defined shape and messy text, and returns typed fields such as invoices, bookings, notifications, or forms. The decode grammar ensures parseable output, and extraction generalizes to classification.
- Text embedding: the same model returns a vector for a sentence, enabling local search, matching, and routing.
- Speech (Whistle): a speech-to-text model that shares Needle's container and engine. Audio input is processed directly, producing tool calls as output.
Use cases
Needle is intended for automation on resource-constrained devices where general-purpose chat models are too large. Example use cases include voice-controlled smart home devices, wearable assistants, robot control, automotive interfaces, and local data extraction from invoices or forms on mobile phones.
Getting started
shpip install cactus-needleAfter installation, import needle, decorate a function with @needle.tool, and create a Needle agent with a list of tools. Call run() with a user query to execute the function and return results. The response is a JSON object containing function_calls, reasoning, and a calibrated confidence score. Off-topic requests return an empty list of function calls.
License and pricing
Needle is licensed under Apache-2.0 and is open source. No pricing information is stated.
Based on the project's public README and repository metadata.