A safe, simple, extensible, and fast agent harness
README.md

Configuration #

Ein keeps client and server configuration separate. This lets a TUI connect to an eind on another machine without reading, reproducing, or receiving that server's credentials.

File Owner Contents
~/.ein/eind.json eind operator Provider profiles, literal secrets, model definitions, embedding, tool network policy
~/.ein/ein.json TUI user Reusable workspace roots

/config opens ein.json in $EDITOR. Edit eind.json on the server itself and restart eind after changing it. Server configuration is validated as a whole before the daemon begins serving.

Server configuration #

eind.json is versioned and must contain at least one profile and model:

{
  "version": 1,
  "default_profile": "personal-openrouter",
  "profiles": {
    "personal-openrouter": {
      "display_name": "Personal models",
      "plugin": "ein_openrouter",
      "params": {
        "base_url": "https://openrouter.ai/api/v1"
      },
      "secret_params": {
        "api_key": "sk-or-..."
      },
      "default_model": "sonnet",
      "models": {
        "sonnet": {
          "display_name": "Claude Sonnet",
          "model": "anthropic/claude-sonnet-4-6",
          "context_window": 200000,
          "params": {
            "max_tokens": 32000
          }
        }
      }
    }
  },
  "tool_policy": {
    "plugins": {
      "ein_webfetch": {
        "allowed_hosts": ["docs.rs", "raw.githubusercontent.com"]
      }
    }
  }
}

Profile params are non-secret connection settings and become part of a session's durable behavior. secret_params are read fresh when the server constructs a model client and are never returned to clients or copied into session records. A parameter name cannot occur in both maps, and a model's params cannot replace a profile-owned parameter.

Profile and model IDs are stable protocol identities. Display names can change without changing a session. New sessions may use the configured defaults; existing sessions retain the IDs and resolved non-secret settings they adopted. Use /profiles to make an explicit, durable model change.

tool_policy.allowed_hosts grants hosts to every tool plugin. tool_policy.plugins.<plugin>.allowed_hosts adds hosts only for that plugin. Clients cannot widen either list.

Client configuration #

ein.json is created automatically:

{
  "version": 1,
  "workspace_roots": [
    "/Users/you/projects"
  ]
}

These roots are offered on every connection. The directory approval prompt can add the current working directory for one connection without writing it to the file. Workspace paths are never persisted as part of session identity: a resumed session uses the roots and working directory supplied by the client that is connected now.

Embedding #

Embedding is one server-wide vector space, not a per-session model choice. Without an embedding field, memory search remains available by keyword.

For an in-process sentence-transformers model:

{
  "embedding": {
    "backend": "local",
    "model": "BAAI/bge-small-en-v1.5"
  }
}

model is a Hugging Face repository ID or an absolute model directory. Optional fields are revision and max_input_tokens.

To reuse a provider profile's plugin, endpoint, and current secrets while selecting a distinct embedding model:

{
  "embedding": {
    "backend": "profile",
    "profile": "personal-openrouter",
    "model": "openai/text-embedding-3-small",
    "dimensions": 1536,
    "max_input_tokens": 8192,
    "params": {}
  }
}

Embedding-owned parameters cannot collide with connection parameters from the profile. This prevents the embedding model or endpoint from silently replacing the chat connection's configuration.

The status bar shows [V] beside [M] once the server has accepted an embedder. Changing vector models invalidates existing vectors even when their width matches. For local models, eind reembed-memory --model <id> rebuilds them.

Legacy migration #

When the new files do not exist, eind and ein independently read the fields they own from ~/.ein/config.json. Each writes only its own replacement and leaves the legacy file untouched as migration input and backup.

Sections #