# Models

LLM, Model Router, Classifier and Summarizer.

Source: https://glamorous-boar.cloudvent.net/nodes/models/

---

{/* Generated by scripts/agenticmind/generate-node-docs.mjs from the AgenticMind node registry. Do not edit by hand. */}

Model nodes call a chat model through one of 15 providers (OpenRouter by default, `google/gemini-3.8-flash`). The API key is always a secret reference such as `{"$secret": "OPENROUTER_API_KEY"}`. LLM and Agent nodes stream tokens when someone is listening.

| Node | Category | Summary |
|---|---|---|
| [Classifier](#classifier) | Models | Labels text with one (or several) of your labels, with a confidence; each label is a branch. |
| [LLM](#llm) | Models | Sends a prompt (and optionally images, for vision models) to a chat model: OpenRouter, Hugging Face, Ollama or any OpenAI-compatible server. Returns its reply. |
| [Model Router](#model-router) | Models | Picks the best model for each request (by keywords, a small classifier model, or both) and answers with it: e.g. code to a coding model, maths to a reasoning model, quick tasks to a cheap one. |
| [Summarizer](#summarizer) | Models | Summarises long text or documents with stuff, map-reduce or refine. |
## Classifier

`agenticmind.core.classifier` · version 1.0.0

Labels text with one (or several) of your labels, with a confidence; each label is a branch.

**Typical use.** Labels text with your labels (each with a description and optional few-shot examples). Every label is a control branch, so classification doubles as routing. Turn on `multi_label` to run every matching branch, and use `min_confidence` to send uncertain input to `default`.

| Input | Type | Required | Description |
|---|---|---|---|
| `text` | Any | yes | Text, Document or JSON to classify |

| Output | Type | Description |
|---|---|---|
| `label` | String | Best label, or 'default' |
| `labels` | JSON | All chosen labels (multi-label) |
| `confidence` | Number |  |
| `reason` | String |  |

- **Control branches:** `default` plus one per configured item in `labels`
- **Permissions:** `network`, `credentials`
- **Execution policy:** timeout 60s, max attempts 2, idempotent

| Setting | Type | Default | Description |
|---|---|---|---|
| `provider` | `openrouter` · `openai` · `anthropic` · `gemini` · `azure_openai` · `bedrock` · `mistral` · `groq` · `deepseek` · `together` · `xai` · `huggingface` · `ollama` · `openai_compatible` · `mock` | `openrouter` | Provider |
| `model` | string | `google/gemini-3.8-flash` | Model |
| `api_key` | secret ref |  | API key, e.g. OPENROUTER_API_KEY |
| `base_url` | string |  | Base Url |
| `max_tokens` | integer | `2000` | Output token cap per call; reasoning models spend part of it thinking. |
| `labels` | array | see below | Each label is also an output branch. Unmatched or low-confidence input goes to 'default'. |
| `multi_label` | boolean | `false` | Allow several labels (all matching branches run). |
| `min_confidence` | number | `0` | Below this confidence the input goes to 'default'. |
| `instructions` | string |  | Extra guidance for the classifier. |

<CodeBlock language="json" filename="Default labels">

```
[
  {
    "name": "positive",
    "description": "Happy, satisfied, praising",
    "examples": []
  },
  {
    "name": "negative",
    "description": "Unhappy, complaining, angry",
    "examples": []
  },
  {
    "name": "neutral",
    "description": "Factual or mixed, no clear feeling",
    "examples": []
  }
]
```

</CodeBlock>

## LLM

`agenticmind.models.llm` · version 1.2.0 · older versions kept: 1.0.0, 1.1.0

Sends a prompt (and optionally images, for vision models) to a chat model: OpenRouter, Hugging Face, Ollama or any OpenAI-compatible server. Returns its reply.

**Typical use.** Sends a prompt, an optional system message and optional images to a chat model and returns the reply. Works with every provider. Raise `max_tokens` for reasoning models, which spend part of the budget thinking, and set `reasoning_effort` to trade speed for depth.

| Input | Type | Required | Description |
|---|---|---|---|
| `prompt` | String | yes |  |
| `system` | String | no | Overrides the system prompt |
| `image` | Image | no | An image for a vision model |
| `images` | JSON | no | Several images (Image Loader 'images') |

| Output | Type | Description |
|---|---|---|
| `text` | String |  |

- **Control branches:** `done`
- **Permissions:** `network`, `credentials`, `artifacts`
- **Execution policy:** timeout 240s, max attempts 3, idempotent

| Setting | Type | Default | Description |
|---|---|---|---|
| `provider` | `openrouter` · `openai` · `anthropic` · `gemini` · `azure_openai` · `bedrock` · `mistral` · `groq` · `deepseek` · `together` · `xai` · `huggingface` · `ollama` · `openai_compatible` · `mock` | `openrouter` | openrouter: one key for Gemini, Claude, GPT and many more. openai / anthropic / gemini / mistral / groq / deepseek / together / xai: the provider's own API with its own key. azure_openai: your Azure resource (base_url = resource endpoint, model = deployment). bedrock: Amazon Bedrock (base_url = region, Bedrock API key). huggingface: open models via Hugging Face (HF_TOKEN). ollama: models on your own machine. openai_compatible: any OpenAI-style API (needs base_url). mock: offline test responses. |
| `model` | string | `google/gemini-3.8-flash` | Model ID, e.g. google/gemini-3.8-flash (see openrouter.ai/models). |
| `api_key` | secret ref |  | API key secret, e.g. OPENROUTER_API_KEY |
| `system_prompt` | string |  | System Prompt |
| `temperature` | number | `0.2` | Temperature |
| `max_tokens` | integer | `1024` | Max Tokens |
| `reasoning_effort` | `default` · `none` · `minimal` · `low` · `medium` · `high` · `xhigh` · `max` | `default` | Thinking effort for reasoning models: default keeps the model's own setting; none/minimal/low answer fastest. Applied on OpenRouter, OpenAI, Azure OpenAI, Anthropic and Gemini 3+. |
| `base_url` | string |  | API base URL (openai_compatible; default for openrouter is https://openrouter.ai/api/v1). |

## Model Router

`agenticmind.models.model_router` · version 1.0.0

Picks the best model for each request (by keywords, a small classifier model, or both) and answers with it: e.g. code to a coding model, maths to a reasoning model, quick tasks to a cheap one.

**Typical use.** Sends each request to the most suitable model. Routes have a name, description, keywords and model; the `hybrid` strategy tries keywords first and asks a small classifier model only when none match. The answering route and model are outputs and a `model_route` trace event.

| Input | Type | Required | Description |
|---|---|---|---|
| `prompt` | String | yes |  |
| `system` | String | no | Overrides the system prompt |
| `route` | String | no | Force a route by name (skips routing) |

| Output | Type | Description |
|---|---|---|
| `text` | String | The chosen model's reply |
| `route` | String | Name of the route that was used |
| `model` | String | Model id that answered |

- **Control branches:** `done`
- **Permissions:** `network`, `credentials`
- **Execution policy:** timeout 240s, max attempts 3, idempotent

| Setting | Type | Default | Description |
|---|---|---|---|
| `provider` | `openrouter` · `openai` · `anthropic` · `gemini` · `azure_openai` · `bedrock` · `mistral` · `groq` · `deepseek` · `together` · `xai` · `huggingface` · `ollama` · `openai_compatible` · `mock` | `openrouter` | Used for every route and the classifier. OpenRouter reaches most models with one key. |
| `api_key` | secret ref |  | API key secret, e.g. OPENROUTER_API_KEY |
| `strategy` | `hybrid` · `classifier` · `keywords` | `hybrid` | keywords: first route (top to bottom) whose keyword appears; free and predictable. classifier: a small model reads the request and the route descriptions and picks one. hybrid: keywords first, the classifier only when no keyword matches. |
| `routes` | array | see below | Routes |
| `default_route` | string | `general` | Used when nothing matches or the classifier gives no valid answer. |
| `classifier_model` | string | `google/gemini-3.1-flash-lite` | Classifier Model |
| `system_prompt` | string |  | Default system prompt (a route's own prompt replaces it). |
| `temperature` | number | `0.2` | Temperature |
| `max_tokens` | integer | `2048` | Max Tokens |
| `base_url` | string |  | Base Url |

<CodeBlock language="json" filename="Default routes">

```
[
  {
    "name": "general",
    "description": "Everyday questions, explanations and writing that need no special skill.",
    "keywords": [],
    "model": "google/gemini-3.8-flash",
    "system_prompt": ""
  },
  {
    "name": "quick",
    "description": "Very short tasks: greetings, one-line facts, yes/no answers, classification, rewording.",
    "keywords": [
      "translate",
      "rephrase",
      "summarize in one sentence",
      "yes or no"
    ],
    "model": "google/gemini-3.1-flash-lite",
    "system_prompt": ""
  },
  {
    "name": "reasoning",
    "description": "Maths, logic puzzles, multi-step analysis, planning and careful comparisons.",
    "keywords": [
      "prove",
      "calculate",
      "step by step",
      "analyze",
      "analyse",
      "compare",
      "plan"
    ],
    "model": "anthropic/claude-sonnet-5.5",
    "system_prompt": ""
  },
  {
    "name": "code",
    "description": "Writing, explaining, reviewing or debugging code, SQL, regexes and shell commands.",
    "keywords": [
      "code",
      "function",
      "bug",
      "python",
      "javascript",
      "typescript",
      "sql",
      "regex",
      "stack trace"
    ],
    "model": "qwen/qwen3-coder",
    "system_prompt": ""
  }
]
```

</CodeBlock>

## Summarizer

`agenticmind.core.summarizer` · version 1.0.0

Summarises long text or documents with stuff, map-reduce or refine.

**Typical use.** Summarises text or documents. `stuff` sends everything in one call; `map_reduce` summarises chunks and combines them; `refine` updates a running summary chunk by chunk; `auto` picks stuff or map-reduce by size. `max_chunks` refuses oversized inputs instead of paying for them.

| Input | Type | Required | Description |
|---|---|---|---|
| `text` | Any | yes | Text, Document or DocumentSet |

| Output | Type | Description |
|---|---|---|
| `summary` | String |  |
| `result` | JSON | Strategy, chunk count, partial summaries |

- **Control branches:** `done`
- **Permissions:** `network`, `credentials`
- **Execution policy:** timeout 600s, max attempts 2, idempotent

| Setting | Type | Default | Description |
|---|---|---|---|
| `provider` | `openrouter` · `openai` · `anthropic` · `gemini` · `azure_openai` · `bedrock` · `mistral` · `groq` · `deepseek` · `together` · `xai` · `huggingface` · `ollama` · `openai_compatible` · `mock` | `openrouter` | Provider |
| `model` | string | `google/gemini-3.8-flash` | Model |
| `api_key` | secret ref |  | API key, e.g. OPENROUTER_API_KEY |
| `base_url` | string |  | Base Url |
| `max_tokens` | integer | `2000` | Output token cap per call; reasoning models spend part of it thinking. |
| `strategy` | `auto` · `stuff` · `map_reduce` · `refine` | `auto` | stuff: one call. map_reduce: summarise chunks, then combine. refine: update a running summary chunk by chunk. auto: stuff when it fits in one chunk, else map_reduce. |
| `style` | `paragraph` · `bullets` · `tldr` · `detailed` | `paragraph` | Style |
| `max_words` | integer | `200` | Target length of the final summary. |
| `focus` | string |  | Optional focus, e.g. 'risks and deadlines'. |
| `chunk_chars` | integer | `12000` | Chunk Chars |
| `max_chunks` | integer | `50` | Refuse longer inputs instead of paying for them. |
| `temperature` | number | `0.2` | Temperature |
