# Register members and check discovery

Source: https://usecns.dev/thalamus-topic-register-members-and-check-discovery/

[Start here](https://usecns.dev/manual-thalamus/)
[CLI commands](https://usecns.dev/commands-thalamus/)
[Configuration & integration](https://usecns.dev/thalamus-topics/)

Use runtime registration to add or replace a member without restarting the router. POST `/admin/v1/members` registers/upserts a logical member and immediately probes it. JSON fields: required `endpoint` and `plane`; optional `name`, `fallback_endpoint`, `models` (array), `capabilities` (array), `aliases` (array), `ttl_secs`, `persistent` (default false). Use canonical plane strings in JSON. Omitted/blank names derive from endpoint host and port. A missing plane or missing knowledge capabilities is rejected. Cross-plane model/alias conflicts are rejected; `/health` also exposes discovered `name_conflicts`.

Registration success means accepted, not healthy: inspect the returned `member.healthy`. An omitted lease lasts until removal/restart; `ttl_secs` sets expiration and is independent of pin TTL. Only persistent self-registered members are saved to `--state-file`; configured members still come from the config. Persistence errors are not turned into failed registration responses, so verify the filesystem and restart behavior separately. The CLI cannot express knowledge capabilities or fallback endpoints; use config or HTTP.

On restart, config members win name collisions with saved registrations. Saved members without a declared plane or with cross-plane name conflicts are refused and logged. An unreadable/malformed registration state file is logged and skipped, unlike a bad config file which prevents startup. Lease expiration still applies to persisted members; persistence is not lease renewal.

For example, register a knowledge member over HTTP (the CLI cannot supply its capability):

```
curl --fail-with-body http://127.0.0.1:18000/admin/v1/members \
  -H 'content-type: application/json' \
  -d '{"name":"retriever","endpoint":"https://retrieval.example","plane":"knowledge","models":["embedding-model"],"capabilities":["embeddings"]}'
```

Replace the endpoint/model with your own. This call probes the endpoint; it does not load a model or run inference. The registration body has nine fields in total; unknown fields are not rejected as config-file typos are. Use HTTP(S) endpoints even though runtime registration only rejects a blank endpoint, not every malformed URL.

At startup, members are probed before accepting traffic; the reconciler then repeats (default 1000 ms, minimum 100 ms). Probes obtain `/v1/models`, fall back to `/health` when needed, and collect `/metrics`. Any successful `/v1/models` HTTP status establishes reachability even if its body contains no usable IDs; otherwise a successful health check suffices. Empty discovery retains declared/previous model IDs. Probes carry no configured upstream authorization; inference headers are not used for discovery. Members without Prometheus metrics can still serve requests.

Healthy members are probed at their current `active_endpoint` first. For a member with a fallback, the primary gets a short TCP reachability check (3 ms); otherwise discovery tries the fallback. Once healthy on the fallback, the active-endpoint fast path may keep using it. Do not assume every cycle prefers the primary again.