# `Nous.Memory.Scope`
[🔗](https://github.com/nyo16/nous/blob/v0.17.1/lib/nous/memory/scope.ex#L1)

Shared scope-building logic for memory operations.

Both `Nous.Plugins.Memory` and `Nous.Memory.Tools` need to resolve a scope
from config. This module extracts that common pattern.

# `build`

```elixir
@spec build(map()) :: :global | map()
```

Build a scope map from config based on the `:default_search_scope` setting.

Returns `:global` or a map of scoping fields extracted from `config`.

# `from_fields`

```elixir
@spec from_fields(map(), [atom()]) :: :global | map()
```

Build a scope map from specific fields in config.

Returns `:global` if no fields have values.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
