v1.1.0 release - Contributors, Sponsors and Enquiries are most welcome 😌

Embeddings & RAG

Pluggable embedders and vector stores, a retrieval tool, and a Broadway ingestion pipeline.

agentsea_embeddings pairs an Embedder with a VectorStore behind one handle. Both are behaviours, so adapters swap freely. API on HexDocs.

Embedders

  • AgentSea.Embedder.Hashing — dependency-free, deterministic; great for tests/dev.
  • AgentSea.Embedder.OpenAI / AgentSea.Embedder.Cohere — remote, over Req.
  • AgentSea.Embedder.Bumblebee — in-process Hugging Face models via Bumblebee + Nx (ships in agentsea_bumblebee), no embedding API needed.

Vector stores

The same handle works over any of four stores:

elixir
# In-memory (default; dev/tests)
{:ok, store} = AgentSea.VectorStore.Memory.start_link()

# pgvector (Postgres + the vector extension)
{:ok, conn} = Postgrex.start_link(database: "agentsea", hostname: "localhost")
store = AgentSea.VectorStore.Postgres.store(conn, table: "embeddings", dimensions: 1536)
:ok = AgentSea.VectorStore.Postgres.ensure_table(store)

# Qdrant
store = AgentSea.VectorStore.Qdrant.store(url: "http://localhost:6333", collection: "docs")

# Pinecone
store = AgentSea.VectorStore.Pinecone.store(host: "https://my-index-xxxx.svc.pinecone.io")

Give an agent retrieval

AgentSea.Embeddings.RetrievalTool is a ready-made search_knowledge tool. Add it to an agent and pass the embeddings handle in the run context — the agent retrieves on demand:

elixir
config = %AgentSea.Agent.Config{
  name: :support,
  model: "claude-opus-4-8",
  provider: {AgentSea.Providers.Anthropic, []},
  tools: [AgentSea.Embeddings.RetrievalTool]
}

{:ok, agent} = AgentSea.Agent.start_link(config)
{:ok, answer} = AgentSea.Agent.run(agent, "What's the refund policy?", %{embeddings: handle})

Bulk ingestion

For documents at scale, agentsea_ingest provides a Broadway pipeline — chunk → embed → store — with batching and backpressure, writing into any of the stores above. Pair it with structured extraction and agentsea_evaluate to measure retrieval quality.

Next

Route generation across providers with the gateway, or revisit tools and memory on the Agents page.