> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ngram.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Run on your own machine

> Keep the Entity runtime local, with either Ollama or a hosted model.

Local deployment describes where the Entity runs. It can use a local Ollama model or call a hosted provider from the same computer.

## Configure the runtime

From an application source checkout:

```bash theme={null}
uv sync --extra dev
uv run ngram setup --profile local
```

The local profile configures Ollama and model IDs. For a hosted model on the same machine, choose `--profile hosted` instead. See [hosted inference](/deployment/hosted-inference-testing).

The checked-in Ollama defaults are:

```yaml theme={null}
ollama:
  base_url: "http://localhost:11434"
  timeout: 120
  retry_attempts: 3
models:
  reflex: "gemma4:26b"
  deliberate: "gemma4:26b"
  embedding: "nomic-embed-text"
```

These are defaults, not minimum hardware requirements. Choose a model and context budget your machine can sustain; see [hardware](/reference/hardware).

## Choose the process you need

| Command                         | Behavior                                               |
| ------------------------------- | ------------------------------------------------------ |
| `uv run ngram ask rook "Hello"` | One prompt and reply, without the daemon               |
| `uv run ngram talk rook`        | Foreground terminal conversation, without the daemon   |
| `uv run ngram run rook`         | Entity, configured surfaces, and background scheduling |
| `uv run ngram worker rook`      | Headless surfaces and background scheduling            |

For `ask`, `talk`, and `run`, `--ollama` starts the local Ollama service when needed. Add `--pull-models` only when you want to download configured models:

```bash theme={null}
uv run ngram talk rook --ollama --pull-models
```

Once models are available, omit `--pull-models` for routine starts.

## Keep state and execution explicit

Local state usually lives under `~/.ngram/entities/<Entity name>/`. Use `uv run ngram status rook` to inspect the configured paths.

Tools execute through their configured backend. Local inference does not automatically grant shell access, and a hosted model does not relocate tools to the provider. Review [tool access](/guides/tools) before enabling execution on your workstation.

## Stop cleanly

Use **Ctrl+C** to stop a foreground runtime. Use the shared [inference pause](/guides/usage-and-controls) when you want the surfaces to remain connected without model use.

If you need to clean up other local ngram processes, inspect `uv run ngram stop --dry-run` before running it. Its scope can include the gateway and Ollama unless you pass the preservation flags described in [usage and controls](/guides/usage-and-controls).
