Skip to main content
Use Infino as the retrieval layer for an agent built with the Vercel AI SDK. Embed with the AI SDK (embed / embedMany), index into Infino, and expose retrieval as a tool the model calls, so the agent grounds its answers in your data.
pnpm i ai zod @ai-sdk/openai @infino-ai/infino
The pattern:
  1. Index. embedMany your chunks, then append them to an Infino table with an FTS + vector index.
  2. Retrieve. Define a tool whose execute embeds the query and runs Infino’s hybrid (BM25 + vector) search, returning the top passages.
  3. Generate. Pass the tool to generateText with stopWhen: stepCountIs(...); the model calls it to ground its answer.
See the @infino-ai/infino package and the Quickstart for the Node API used inside the tool.

See also

Last modified on June 29, 2026