> For the complete documentation index, see [llms.txt](https://weavescope.gitbook.io/beam_weaver/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://weavescope.gitbook.io/beam_weaver/data-and-retrieval/adapters.md).

# Adapters

BeamWeaver keeps durable runtime dependencies explicit. Applications pass cache, checkpoint, memory, vectorstore, and record-manager adapters into graphs or agents; runtime code depends on behaviours, not Ecto modules.

Implemented local adapters include:

* `BeamWeaver.Checkpoint.ETS` and `BeamWeaver.Checkpoint.Ecto`
* `BeamWeaver.Cache.ETS` and `BeamWeaver.Cache.Ecto`
* `BeamWeaver.Memory.ETS` and `BeamWeaver.Memory.Ecto`
* `BeamWeaver.VectorStore.ETS` and `BeamWeaver.VectorStore.EctoPostgres`
* `BeamWeaver.Indexing.RecordManager.ETS`
* `BeamWeaver.Indexing.RecordManager.EctoPostgres`

Setup is explicit:

```elixir
defmodule MyApp.Repo.Migrations.AddBeamWeaverAdapters do
  use Ecto.Migration

  def up do
    BeamWeaver.Migrations.up(adapters: [:checkpoint, :memory, :cache])
  end

  def down do
    BeamWeaver.Migrations.down(adapters: [:cache, :memory, :checkpoint], version: 1)
  end
end
```

Normal runtime calls never create database tables automatically.

Durable adapters use `BeamWeaver.Serialization` by default. The default JSON codec is type-tagged and allowlisted; encrypted checkpoint/store payloads can opt in to `BeamWeaver.Serialization.Encrypted` with an explicit 32-byte AES-256-GCM key:

```elixir
serialization: [
  codec: BeamWeaver.Serialization.Encrypted,
  encryption_key: :crypto.strong_rand_bytes(32)
]
```

Live Postgres tests use `BEAM_WEAVER_POSTGRES_URL`; point it at a disposable BeamWeaver test database.

## Related Guides

* [Persistence](/beam_weaver/capabilities/persistence.md)
* [Memory](/beam_weaver/capabilities/memory.md)
* [Long-Term Memory](/beam_weaver/core-components/long_term_memory.md)
* [Retrieval](/beam_weaver/data-and-retrieval/retrieval.md)
* [Core](/beam_weaver/data-and-retrieval/core.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://weavescope.gitbook.io/beam_weaver/data-and-retrieval/adapters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
