# ol.llx.ai.registry

_platforms: clj, cljs_

## immutable-registry

### clj

_platforms: clj_

```clojure
(immutable-registry)
(immutable-registry registry-map)
```

Creates an immutable registry map.

With no argument it creates an empty normalized registry.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L5-L12)

### cljs

_platforms: cljs_

```clojure
(immutable-registry)
(immutable-registry registry-map)
```

Creates an immutable registry map.

With no argument it creates an empty normalized registry.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L5-L12)

---

## mutable-registry

### clj

_platforms: clj_

```clojure
(mutable-registry registry*)
```

Wraps an atom-backed registry for mutable use cases.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L14-L17)

### cljs

_platforms: cljs_

```clojure
(mutable-registry registry*)
```

Wraps an atom-backed registry for mutable use cases.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L14-L17)

---

## dynamic-registry

### clj

_platforms: clj_

```clojure
(dynamic-registry)
```

Creates a dynamic registry wrapper that resolves from thread-local bindings.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L19-L22)

### cljs

_platforms: cljs_

```clojure
(dynamic-registry)
```

Creates a dynamic registry wrapper that resolves from thread-local bindings.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L19-L22)

---

## default-registry

### clj

_platforms: clj_

```clojure
(default-registry)
```

Returns the process default registry.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L24-L27)

### cljs

_platforms: cljs_

```clojure
(default-registry)
```

Returns the process default registry.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L24-L27)

---

## set-default-registry!

### clj

_platforms: clj_

```clojure
(set-default-registry! registry-value)
```

Sets the process default registry after resolving wrapper implementations.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L29-L32)

### cljs

_platforms: cljs_

```clojure
(set-default-registry! registry-value)
```

Sets the process default registry after resolving wrapper implementations.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L29-L32)

---

## resolve-registry

### clj

_platforms: clj_

```clojure
(resolve-registry)
(resolve-registry registry-value)
```

Resolves supported registry wrapper implementations to a registry map.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L34-L39)

### cljs

_platforms: cljs_

```clojure
(resolve-registry)
(resolve-registry registry-value)
```

Resolves supported registry wrapper implementations to a registry map.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L34-L39)

---

## register-adapter

### clj

_platforms: clj_

```clojure
(register-adapter registry-value adapter)
(register-adapter registry-value adapter source-id)
```

Registers `adapter` in `registry-value`, with optional `source-id` metadata.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L41-L46)

### cljs

_platforms: cljs_

```clojure
(register-adapter registry-value adapter)
(register-adapter registry-value adapter source-id)
```

Registers `adapter` in `registry-value`, with optional `source-id` metadata.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L41-L46)

---

## unregister-adapters-by-source

### clj

_platforms: clj_

```clojure
(unregister-adapters-by-source registry-value source-id)
```

Removes adapters from `registry-value` whose registration `source-id` matches.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L48-L51)

### cljs

_platforms: cljs_

```clojure
(unregister-adapters-by-source registry-value source-id)
```

Removes adapters from `registry-value` whose registration `source-id` matches.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L48-L51)

---

## clear-adapters

### clj

_platforms: clj_

```clojure
(clear-adapters registry-value)
```

Removes all adapters from `registry-value`.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L53-L56)

### cljs

_platforms: cljs_

```clojure
(clear-adapters registry-value)
```

Removes all adapters from `registry-value`.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L53-L56)

---

## get-adapter

### clj

_platforms: clj_

```clojure
(get-adapter api)
(get-adapter registry-value api)
```

Returns the adapter for an API key.

With one argument, uses the default registry.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L58-L65)

### cljs

_platforms: cljs_

```clojure
(get-adapter api)
(get-adapter registry-value api)
```

Returns the adapter for an API key.

With one argument, uses the default registry.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L58-L65)

---

## get-adapters

### clj

_platforms: clj_

```clojure
(get-adapters)
(get-adapters registry-value)
```

Returns all adapters in the registry.

With no argument, uses the default registry.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L67-L74)

### cljs

_platforms: cljs_

```clojure
(get-adapters)
(get-adapters registry-value)
```

Returns all adapters in the registry.

With no argument, uses the default registry.

[source,window=_blank](https://github.com/outskirtslabs/llx/blob/main/src/ol/llx/ai/registry.cljc#L67-L74)
