# `AshAuthzed.Adapters.Memory`
[🔗](https://github.com/boxxxie/ash_authzed/blob/v0.2.0/lib/ash_authzed/adapters/memory.ex#L1)

Caller-supervised in-memory Zanzibar / ReBAC adapter powered by `Licet`
and `Licet.Schema`.

Provides full `.zed` schema evaluation (`check`, `lookup_resources`, `write_tuples`)
entirely in memory without requiring a running Postgres database or external
SpiceDB daemon. Ideal for fast, isolated `async: true` unit and integration tests.

## Starting in a Supervision Tree or Test

    start_supervised!(
      {AshAuthzed.Adapters.Memory,
       name: MyTestAuthzed,
       schema: File.read!("priv/licet/schema.zed")}
    )

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `list_tuples`

```elixir
@spec list_tuples(atom()) :: [String.t()]
```

Returns all currently stored `%Licet.Relationship{}` tuples as strings.

# `start_link`

```elixir
@spec start_link(keyword()) :: Agent.on_start()
```

Starts an in-memory ReBAC store linked to the calling process.

## Options
* `:name` (`t:atom/0`) - Process registration name for this memory store instance. The default value is `AshAuthzed.Adapters.Memory`.

* `:schema` (`t:term/0`) - Required. A `.zed` schema string, `{:file, path}`, or compiled `%Licet.Schema{}`.

* `:relationships` (list of `t:String.t/0`) - Initial relationship tuple strings to seed on startup. The default value is `[]`.

---

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