# The AI

Part of the [Ownbox SDK reference](https://www.ownbox.io/sdk/reference.md).

## m.think

```python
m.think(task, prompt, *, system=None, max_tokens=1024)
```

Ask the Ownbox's AI.

On the Ownbox's own account, within the machine's monthly allowance. Past it the call is refused `over_budget`, so catch it where a page must still answer.

**Needs in machine.yaml:** `think: {calls_per_month: N}`

**Returns:** The answer, as text.

Example (inside a job):

```python
try:
    line = m.think("follow_up_line", "Write one friendly line asking if the quote still works.")
except sdk.BoxRefused as e:
    line = "Is the quote still a good fit?"
```

