# I. Bind — Settings & Connections

The Bind rite is the front door. Until you've bound at least one Hermes Agent, the rest of MIRARI is dormant.

## What lives on this page

* **Connection list** — every agent you've bound, with status dots (☉ online, ◌ offline, ✕ error).
* **Provider presets** — one-click templates for the common cases.
* **Manual form** — name, provider, base URL, model, API key.
* **Test button** — fires a one-token request to verify reachability and update `status`.

## Provider presets

```ts
const PRESETS = [
  { id: "hermes-local",  glyph: "☿", label: "Hermes · Local",
    values: { provider: "hermes",     base_url: "http://localhost:11434/v1",
              model: "hermes3" } },
  { id: "hermes-cloud",  glyph: "☿", label: "Hermes · Cloud",
    values: { provider: "hermes",     base_url: "https://api.hermes.ai/v1",
              model: "hermes-3-llama-3.1-70b" } },
  { id: "openrouter",    glyph: "◈", label: "OpenRouter",
    values: { provider: "openrouter", base_url: "https://openrouter.ai/api/v1",
              model: "nousresearch/hermes-3-llama-3.1-70b" } },
  { id: "nous",          glyph: "✶", label: "Nous",
    values: { provider: "nous",       base_url: "https://inference-api.nousresearch.com/v1",
              model: "Hermes-3-Llama-3.1-70B" } },
];
```

## The bind flow

1. Pick a preset (or **Custom**).
2. Override the model id if you want — `hermes-4`, `claude-3.5-sonnet`, anything your endpoint serves.
3. Paste your API key. It is written **only** to the browser key vault.
4. Click **Bind**. A row is inserted into `agent_connections`.
5. Click **Test**. MIRARI calls `testConnection(connectionId)` which sends a minimal chat request and updates `status`.

## What the server stores

Only the **non-secret** metadata:

```ts
type AgentConnection = {
  id: string;
  user_id: string;        // RLS: only the owner can read this row
  name: string;
  provider: "hermes" | "openrouter" | "nous" | "custom";
  base_url: string;
  model: string;
  status: "online" | "offline" | "error";
  created_at: string;
  updated_at: string;
};
```

The API key is **never** part of this row. See [Local Key Vault](/entermirari-docs/architecture/key-vault.md) for how it's handled.

## Editing & removing

* **Rename** is in-place; the server updates `updated_at`.
* **Delete** cascades: removing a connection nukes its conversations and messages (but not memory nodes — those are agent-agnostic).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://entermirari.gitbook.io/entermirari-docs/the-six-rites/bind-connections.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
