Overview

Backend

Introduction

Layer Community Edition is the same standalone retrieval gateway included in Pro, ready to run on your laptop or in your pipeline.

It serves the Turbopuffer wire protocol against Postgres with pgvector and pg_search for a range of operations—see the store capability matrix for coverage.

You can also run it in front of Turbopuffer to add query routing and hybrid fusion, scans and facets, and federated queries.

╔════════════╗      ╔════════════╗          ╔═══ vector store ═══════════════════════╗
║ layer      ║░     ║ layer      ║░         ║                                        ║░
║ clients    ║◀────▶║ gateway    ║◀──API───▶║  ┏━━━━━━━━━━━━━┓  ┏━━━━━━━━━━━┓        ║░
║            ║░     ║            ║░         ║  ┃ turbopuffer ┃  ┃ pg_vector ┃        ║░
╚════════════╝░     ╚════════════╝░         ║  ┗━━━━━━━━━━━━━┛  ┗━━━━━━━━━━━┛        ║░
 ░░░░░░░░░░░░░░      ░░░░░░░░░░░░░░         ║                                        ║░
                                            ╚════════════════════════════════════════╝░
                                             ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
╔════════════════════════════════╗
║ layer clients                  ║░
╚═══════════════╤════════════════╝░
                │
                ▼
╔════════════════════════════════╗
║ layer gateway                  ║░
╚═══════════════╤════════════════╝░
                │ API
                ▼
╔═══ vector store ═══════════════╗
║                                ║░
║ ┏━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━┓  ║░
║ ┃ turbopuffer ┃ ┃ pg_vector ┃  ║░
║ ┗━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━┛  ║░
║                                ║░
╚════════════════════════════════╝░
 ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

Start locally

The quickstart runs the gateway with Docker Compose and returns your first search result. Started without a key, Compose supplies a local Postgres database and rows persist in its volume; started with a Turbopuffer key, data stays in Turbopuffer. Either way the gateway is the API entry point.

Connect and query

Use the Python, Go, or TypeScript clients, or curl. Write rows and vectors, query with vector or text ranking, scan matching rows, and federate across named namespaces.

Configuration describes standalone connections and authentication. The store matrix records each backend’s supported operations. CE can also front an existing Turbopuffer account.

Observe

Use health and metrics to check the gateway and failure modes to diagnose request errors.

esc