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

# mellea.stdlib.components.intrinsic.intrinsic

> `Intrinsic` component for invoking fine-tuned adapter capabilities.

export const SidebarFix = () => <script dangerouslySetInnerHTML={{
  __html: `
        (function () {
          const INTERVAL_MS = 500;

          const upgradeSidebar = () => {
            const links = document.querySelectorAll('a[href^="#"]');

            links.forEach((link) => {
              if (link.dataset.badged === "true") return;

              const rawText = (link.textContent || "").trim();

              // ========== FUNC ==========
              if (rawText.startsWith("FUNC ")) {
                const label = rawText.replace(/^FUNC\\s+/, "").trim();

                while (link.firstChild) link.removeChild(link.firstChild);

                // 👉 Make the whole link a single flex row & prevent wrapping
                link.style.display = "flex";
                link.style.alignItems = "center";
                link.style.whiteSpace = "nowrap";
                link.style.columnGap = "0.5rem";

                const badge = document.createElement("span");
                badge.style.marginRight = "0.5rem";
                badge.style.display = "inline-flex";
                badge.style.alignItems = "center";
                badge.style.borderRadius = "9999px";
                badge.style.padding = "0rem 0.6rem";
                badge.style.fontSize = "0.5rem";
                badge.style.fontWeight = "700";
                badge.style.letterSpacing = "0.05em";
                badge.style.backgroundColor = "rgba(48, 100, 227, 0.20)";
                badge.style.color = "#1D4ED8";

                badge.textContent = "FUNC";

                link.appendChild(badge);
                link.appendChild(document.createTextNode(label));
                link.dataset.badged = "true";
                return;
              }

              // ========== CLASS ==========
              if (rawText.startsWith("CLASS ")) {
                const label = rawText.replace(/^CLASS\\s+/, "").trim();

                while (link.firstChild) link.removeChild(link.firstChild);

                // 👉 Same flex / nowrap treatment for class links
                link.style.display = "flex";
                link.style.alignItems = "center";
                link.style.whiteSpace = "nowrap";
                link.style.columnGap = "0.5rem";

                const badge = document.createElement("span");
                badge.style.marginRight = "0.5rem";
                badge.style.display = "inline-flex";
                badge.style.alignItems = "center";
                badge.style.borderRadius = "9999px";
                badge.style.padding = "0rem 0.6rem";
                badge.style.fontSize = "0.5rem";
                badge.style.fontWeight = "700";
                badge.style.letterSpacing = "0.05em";
                badge.style.backgroundColor = "rgba(74, 222, 128, 0.20)";
                badge.style.color = "#15803D";

                badge.textContent = "CLASS";

                link.appendChild(badge);
                link.appendChild(document.createTextNode(label));
                link.dataset.badged = "true";
                return;
              }
            });
          };

          upgradeSidebar();
          setInterval(upgradeSidebar, INTERVAL_MS);
        })();
      `
}} />;

<SidebarFix />

`Intrinsic` component for invoking fine-tuned adapter capabilities.

An `Intrinsic` component references a named adapter from Mellea's intrinsic catalog
and transforms a chat completion request — typically by injecting new messages,
modifying model parameters, or applying structured output constraints. It must be
paired with a backend that supports adapter loading (e.g. `LocalHFBackend` with an
attached `IntrinsicAdapter`).

## Classes

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />

### <span className="ml-2 inline-flex items-center rounded-full px-2 py-1 text-[0.7rem] font-bold tracking-wide bg-[#4ADE8033]/20 text-[#15803D]">CLASS</span> `Intrinsic` <sup><a href="https://github.com/generative-computing/mellea/blob/v0.6.0/mellea/stdlib/components/intrinsic/intrinsic.py#L14" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

A component representing an intrinsic fine-tuned adapter capability.

Intrinsics transform a chat completion request by injecting messages,
modifying model parameters, or applying structured output constraints.
Must be paired with a backend that supports adapter loading.

**Args:**

* `intrinsic_name`: The user-visible name of the intrinsic; must match
  a known name in Mellea's intrinsics catalog.
* `intrinsic_kwargs`: Optional keyword arguments required by
  the intrinsic at invocation time.

**Attributes:**

* `metadata`: The intrinsic metadata fetched from the catalog.
* `intrinsic_kwargs`: Keyword arguments passed to the intrinsic.
* `intrinsic_name`: User-visible name of this intrinsic (property).
* `adapter_types`: Available adapter types that
  implement this intrinsic (property). Defaults to values in self.metadata.

<div className="h-8" />

**Methods:**

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />

#### <span className="ml-2 inline-flex items-center rounded-full px-2 py-1 text-[0.7rem] font-bold tracking-wide bg-[#3064E3]/20 text-[#1D4ED8]">FUNC</span> `intrinsic_name` <sup><a href="https://github.com/generative-computing/mellea/blob/v0.6.0/mellea/stdlib/components/intrinsic/intrinsic.py#L49" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
intrinsic_name(self)
```

User-visible name of this intrinsic.

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />

#### <span className="ml-2 inline-flex items-center rounded-full px-2 py-1 text-[0.7rem] font-bold tracking-wide bg-[#3064E3]/20 text-[#1D4ED8]">FUNC</span> `adapter_types` <sup><a href="https://github.com/generative-computing/mellea/blob/v0.6.0/mellea/stdlib/components/intrinsic/intrinsic.py#L54" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
adapter_types(self) -> tuple[AdapterType, ...]
```

Tuple of available adapter types that implement this intrinsic.

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />

#### <span className="ml-2 inline-flex items-center rounded-full px-2 py-1 text-[0.7rem] font-bold tracking-wide bg-[#3064E3]/20 text-[#1D4ED8]">FUNC</span> `parts` <sup><a href="https://github.com/generative-computing/mellea/blob/v0.6.0/mellea/stdlib/components/intrinsic/intrinsic.py#L62" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
parts(self) -> list[Component | CBlock]
```

Return the constituent parts of this intrinsic component.

Will need to be implemented by subclasses since not all intrinsics
produce text or message output.

**Returns:**

* list\[Component | CBlock]: Always an empty list for the base class.

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />

#### <span className="ml-2 inline-flex items-center rounded-full px-2 py-1 text-[0.7rem] font-bold tracking-wide bg-[#3064E3]/20 text-[#1D4ED8]">FUNC</span> `format_for_llm` <sup><a href="https://github.com/generative-computing/mellea/blob/v0.6.0/mellea/stdlib/components/intrinsic/intrinsic.py#L73" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>

```python theme={null}
format_for_llm(self) -> TemplateRepresentation | str
```

Not implemented for the base `Intrinsic` class.

`Intrinsic` components are intended to be used as the *action* passed
directly to the backend, not as a part of the context rendered by the
formatter.

**Returns:**

* TemplateRepresentation | str: Never returns; always raises.

**Raises:**

* `NotImplementedError`: Always, because `Intrinsic` does not
  implement `format_for_llm` by default.

<div className="w-full h-px bg-gray-200 dark:bg-gray-700 my-4" />
