basalt

AI & MLPartnerGA

LangChain, reading live tables.

Install langchain-basalt to get a retriever and a SQL tool. Agents and chains read current rows from Basalt with no ETL step.

Setup
2 min
Delivery
Read-only
Throughput
2k queries/s
Since
v2.0
Overview

How it works.

BasaltRetriever runs vector search on a view's embedding column and returns Documents with row metadata. BasaltQueryTool lets an agent run read-only SQL against allowed views. Both use the Python SDK under the hood.

KAFKA TOPICSBASALTVIEWSSERVEpayments.v3orders.v1refunds.v2ORDERED LOGpayments_liverevenue_by_minAPI3.1 MS
Setup

Set it up in three steps.

01

Connect the tool

pip install langchain-basalt and create a scoped token. Pass the token and view names when you build the retriever or the tool.

terminal
# create a scoped token for a LangChain app
basalt connect langchain --views docs_chunks,orders_live --role readonly
✓ token lc-app created · 2 views granted
✓ langchain-basalt 0.3.2 · retriever and tool ready
02

Shape it with a view

Write plain SQL over the source. Basalt keeps the view current with every record and tracks lineage back to the topic, partition and offset.

views/revenue_by_min.sql
CREATE MATERIALIZED VIEW revenue_by_min AS
SELECT date_trunc('minute', ts) AS minute,
       currency,
       sum(amount) AS revenue,
       count(*)    AS payments
FROM payments
WHERE status = 'captured'
GROUP BY 1, 2;
03

Read it from anywhere

Every view is an endpoint the moment it exists. Call it over REST, connect with any Postgres client, or use the SDK from your app.

terminal
curl https://api.basalt.dev/v1/views/revenue_by_min?limit=5 \
  -H "Authorization: Bearer $BASALT_TOKEN"
✓ 200 OK · 5 rows · served from eu-north-1 in 3.1 ms
Included

What you get.

01

Vector retriever

Vector search with column filters, returned as LangChain Documents.

02

Query tool

Agents run read-only SQL on allowed views, with row limits enforced.

03

Live results

Retrieval reads current rows, so answers reflect data from seconds ago.

04

LangGraph ready

Use both as nodes or tools in LangGraph agents without wrappers.

Related

Other ways to stream in.

All integrations →
Beta

Anthropic

AI & ML

Give Claude live, row-level context through a typed tool.

Beta

OpenAI

AI & ML

Embed events as they land and store vectors beside the rows.

Partner

Hex

BI & notebooks

Query views from SQL cells and keep notebooks current.

Get started

Set your data in stone.

Free up to 10M events a month. No card, no sales call. Your first pipeline is live in about four minutes.

2,400+ teams in production

SOC 2 Type II

38 regions

Get started

Set your data in stone.

Free up to 10M events a month. No card, no sales call. Your first pipeline is live in about four minutes.

2,400+ teams in production

SOC 2 Type II

38 regions

Get started

Set your data in stone.

Free up to 10M events a month. No card, no sales call. Your first pipeline is live in about four minutes.

2,400+ teams in production

SOC 2 Type II

38 regions

© 2026 Basalt Labs

All systems normal

Back to top ↑

404

© 2026 Basalt Labs

All systems normal

Back to top ↑

404

© 2026 Basalt Labs

All systems normal

Back to top ↑

404

Create a free website with Framer, the website builder loved by startups, designers and agencies.