Metadata-Version: 2.4
Name: decido-ai
Version: 1.3.2
Summary: Ask questions about a document and get a probability for every answer. Open Decido models that run on your laptop; also browser-agent models.
Author: The Decido Authors
License: Apache-2.0
Project-URL: Homepage, https://getdecido.ai
Project-URL: Models, https://huggingface.co/decido-ai
Project-URL: Playground, https://getdecido.ai/playground
Project-URL: API docs, https://getdecido.ai/api
Keywords: decision,classification,calibration,llm,gguf,llama.cpp,cpu,huggingface,jev,nli,routing,triage
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Text Processing :: Linguistic
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.24
Requires-Dist: tokenizers>=0.20
Requires-Dist: huggingface_hub>=0.25
Requires-Dist: certifi
Requires-Dist: cmake>=3.18; (platform_system == "Darwin" and platform_machine != "arm64") or (platform_system == "Linux" and platform_machine != "x86_64" and platform_machine != "aarch64")
Provides-Extra: gpu
Requires-Dist: torch>=2.4; extra == "gpu"
Requires-Dist: transformers>=5.17; extra == "gpu"
Requires-Dist: accelerate; extra == "gpu"
Provides-Extra: vllm
Requires-Dist: vllm==0.31.0; extra == "vllm"
Requires-Dist: transformers>=5.17; extra == "vllm"
Provides-Extra: xl
Requires-Dist: torch>=2.6; extra == "xl"
Requires-Dist: transformers>=5.22; extra == "xl"
Requires-Dist: accelerate; extra == "xl"
Requires-Dist: peft>=0.21; extra == "xl"
Requires-Dist: triton>=3.2; extra == "xl"
Requires-Dist: safetensors; extra == "xl"
Provides-Extra: pro
Requires-Dist: vllm==0.31.0; extra == "pro"
Requires-Dist: transformers>=5.17; extra == "pro"
Provides-Extra: mcp
Requires-Dist: mcp<3,>=2.3; python_version >= "3.10" and extra == "mcp"
Provides-Extra: server
Requires-Dist: zstandard>=0.22; extra == "server"
Provides-Extra: agent
Requires-Dist: anthropic>=2.12; extra == "agent"
Requires-Dist: httpx[http2]<1,>=0.28; extra == "agent"
Requires-Dist: browser-harness==0.1.13; python_version >= "3.11" and extra == "agent"

# decido

**Ask questions about a document and get a probability for every answer.** Runs on your laptop.

Give Decido some text (a support ticket, an email, a web page, a JSON record) and a few questions. It answers each one with
probabilities, for example *refund: yes 0.99 / no 0.01*. It runs the open
[Decido models](https://huggingface.co/decido-ai) locally, so your data stays on your machine and you need no API key.

## Install
```bash
pip install decido-ai
```
Works on Mac (Apple Silicon), Linux and Windows with Python 3.9 or newer. Nothing to compile.

## Quick start
```python
from decido import Decido

m = Decido("decido-ai/decido-1-fast-1.7b")      # downloads the model once (about 2 GB)

print(m.decide(
    "Customer: I was charged twice for order 4821. Please refund one of the charges today.",
    {
        "refund":  "Is the customer asking for a refund?",
        "team":    {"q": "Which team should handle this?", "options": ["billing", "shipping", "tech"]},
        "urgency": {"q": "How urgent is it?", "scale": ["low", "normal", "urgent"]},
    },
))
# {'refund': {'yes': 0.99, 'no': 0.01},
#  'team': {'billing': 0.94, 'shipping': 0.03, 'tech': 0.03},
#  'urgency': {'low': 0.24, 'normal': 0.44, 'urgent': 0.32}}
```

There are three kinds of question:

| you write | you get |
|---|---|
| `"Is it a refund request?"` | yes / no |
| `{"q": "Which team?", "options": ["billing", "shipping"]}` | one of the options |
| `{"q": "How urgent?", "scale": ["low", "normal", "urgent"]}` | a point on an ordered scale |

Options can have descriptions: `"options": {"billing": "charges and refunds", "shipping": "delivery"}`.
Text inside the document is treated as data. Decido does not follow instructions written in it.

## Pick a model

| model | best for | needs |
|---|---|---|
| [decido-1-fast-1.7b](https://huggingface.co/decido-ai/decido-1-fast-1.7b) | **start here**: fast and good | any laptop (8 GB RAM) |
| [decido-1-ultra-0.6b](https://huggingface.co/decido-ai/decido-1-ultra-0.6b) | fastest, simple questions | any laptop (4 GB RAM) |
| [decido-1-26b-a4b](https://huggingface.co/decido-ai/decido-1-26b-a4b) | high accuracy | laptop with 32 GB+ RAM, or a GPU |
| [decido-1-max-26b-a4b](https://huggingface.co/decido-ai/decido-1-max-26b-a4b) | highest accuracy (thinks first, slow) | laptop with 32 GB+ RAM |
| [decido-1-think-26b-a4b](https://huggingface.co/decido-ai/decido-1-think-26b-a4b) | hard questions (thinks first, slow) | GPU, or laptop with 32 GB+ RAM |
| [decido-1-xl](https://huggingface.co/decido-ai/decido-1-xl) | research | 4× A100 80 GB |

Speed on a MacBook (M4 Pro, 1-page document, 5 questions): Ultra 0.13 s, Fast 0.3 s, Decido-1 1.1 s.
Accuracy, calibration and test details are on each model card. Run `decido models` to see the list in your terminal.

## Command line
```bash
decido run decido-ai/decido-1-fast-1.7b "Customer: charged twice, refund please" \
    -q refund="Is this a refund request?" -q team="Which team?|billing,shipping,tech"

decido pull decido-ai/decido-1-fast-1.7b      # download now, then it works offline
decido doctor                                 # check that this machine is set up
```

## Run it as a server
```bash
decido serve decido-ai/decido-1-fast-1.7b --port 8080
```
This gives you an HTTP API at `http://127.0.0.1:8080/v1/systemone` in the same format as TypeSafe's Jev API, so Jev clients
work unchanged (in Python, `m.predict(request)` takes the same request format). It only listens on your own machine. To open it to others, set `DECIDO_SERVER_KEY` and send
`Authorization: Bearer <key>`.

## Hosted API (try without downloading)
```py
from decido import Decido

m = Decido("hosted:decido-1-fast")      # get a free key at https://getdecido.ai/playground, then: export DECIDO_API_KEY=dk_...
print(m.decide("Customer: I was charged twice for order 4821. Please refund one of the charges today.",
               {"refund": "Is the customer asking for a refund?"}))
```
The free key is for trying Decido out: it has a small daily limit and short documents only. For real use, run the model
yourself.

## Use it from Claude Desktop or Cursor (MCP)
```bash
pip install "decido-ai[mcp]"
decido pull decido-ai/decido-1-fast-1.7b
which decido                                  # copy this path into the config below
```
Add this to Claude Desktop (Settings → Developer → Edit Config) or Cursor (`~/.cursor/mcp.json`):
```json
{"mcpServers": {"decido": {"command": "/path/to/decido", "args": ["mcp", "--model", "decido-ai/decido-1-fast-1.7b"]}}}
```
The assistant gets one tool, `decide(document, questions)`.

## Browser agents
Decido also has models that drive a web browser: at each step they choose what to click or type.
They need an NVIDIA GPU.

| model | real websites (tasks done) | Mind2Web (steps right) | time per step |
|---|---:|---:|---:|
| [decido-web-v2](https://huggingface.co/decido-ai/decido-web-v2) | **81%** | **78%** | 0.5 s |
| [decido-web-v2-fast](https://huggingface.co/decido-ai/decido-web-v2-fast) | 68% | 75% | 0.2 s |
| decido-web-v2 + Claude (`decido agent`) | **89%** | | |

For comparison, Jev 1.14 scores 70% and 60% on the same tests, and Claude Opus 5.5 alone finishes 89% of the real-website
tasks.

**Run the full browser agent** (decido-web-v2, with Claude stepping in on hard steps):
```bash
# On a machine with an NVIDIA GPU (about 80 GB of GPU memory)
pip install "decido-ai[agent,vllm]"
export ANTHROPIC_API_KEY=sk-ant-...
decido agent serve

# On any machine with Chrome (Python 3.11+); it can be the same machine
pip install "decido-ai[agent]"
decido agent run "Find the cheapest 1 m USB-C cable and open its page" --start https://www.example-shop.com \
    --endpoint http://<gpu-machine>:8090
```
Chrome opens and the agent does the task. Add `--headless` to hide the window. Claude handles most steps in this setup, so
expect Claude costs similar to using Claude alone. The benefit is more tasks finished (61% vs 37% for Claude alone on our
hardest test).

**Without Claude:** start the server with `decido agent serve --no-claude`. The agent then needs a small text model to write
what it types: add `--text-url` (any OpenAI-compatible server, e.g. Qwen3-4B-Instruct-2507 on vLLM) to `decido agent run`.
Details on the [decido-web-v2 model card](https://huggingface.co/decido-ai/decido-web-v2).

## GPU and other platforms
- **Mac (Apple Silicon):** uses the Mac GPU automatically.
- **NVIDIA GPU:** `pip install "decido-ai[gpu]"`, then `Decido(model, device="cuda")`.
- **Intel Mac and less common Linux CPUs:** the first run compiles the runtime once (a few minutes; needs a C++ compiler).
- **Windows on ARM:** use WSL2.

## Settings
| environment variable | what it does |
|---|---|
| `HF_HOME` | where models are downloaded |
| `DECIDO_THREADS` | number of CPU threads |
| `DECIDO_SERVER_KEY` | key required by `decido serve` and `decido agent serve` |
| `DECIDO_API_KEY` | your key for the hosted API |
| `ANTHROPIC_API_KEY` | Claude key for `decido agent serve` (or `ANTHROPIC_VERTEX_PROJECT_ID` for Claude on Vertex AI) |

## License
Apache-2.0. Includes llama.cpp (MIT) and an agent loop based on Browser Use's jev-ultrafast (MIT). Each model's license is on
its model card.
