mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-26 20:44:00 +00:00
A broad documentation pass across the areas LanceDB Enterprise and Embedded diverge on most: **Data Curation** -- GPU Function execution, Slurm scheduling (and what Slurm is, for readers new to it), blob late materialization as its own page, joins, aggregation/profiling, sampling, near-duplicate detection, chunking, distributed shuffle, and IVF-partition clustering. **Feature Engineering** -- computed columns and materialized views, restructured to lead with the Function-based path and show the SQL form side by side with Python throughout; a single Auto Refresh page instead of duplicating scheduling details on every refresh page; adaptive execution; checkpointing; GPU and Slurm placement for refresh workers; a Training Cache page for the PyTorch data loader's automatic cache benefit. **Security & Governance** -- an Audit Log reference (schema, access, grants), Secrets promoted to an ordinary catalog object with their own SQL DDL and a vending/rotation guide, and privilege-table fixes verified against the authorization source. **Deployment & Maintenance** -- Horizontal Scaling and OpenTelemetry moved into a real Deployment area; Automated Cleanup folded into Intelligent Auto-Maintenance (every other maintenance decision already lived there); RTE Compaction and Advanced Conflict Resolution documented in depth. **Landing page** -- the Enterprise feature comparison table reorganized (several redundant or stale rows removed, several new areas added), and the "why Enterprise" bullets replaced with ones tied to a concrete page (Performance, Scale, Fault tolerance, Multicloud deployment, Simplify operations) instead of vague promises. Plus a full pass addressing lancedb-gatekeeper's review: a real test-safety bug (a quickstart test could silently overwrite and delete a deployment's own `frames` table), a fabricated SQL statement with no backing implementation, an actual dedup-guarantee bug in `take_row_ids`, and dozens of documentation-accuracy fixes verified against source rather than taken on faith -- each either fixed, or left with an explicit note on why it needs a feature or deployment owner's sign-off instead of being guessed at. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_018PXMCbRH6i5w47TsjeEUMT --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
147 lines
4.9 KiB
Plaintext
147 lines
4.9 KiB
Plaintext
---
|
|
title: "Agentic skills"
|
|
sidebarTitle: "Agentic Skills"
|
|
description: "Give a coding agent a current, maintained reference for the LanceDB APIs."
|
|
icon: robot
|
|
keywords: ["agents", "plugin", "claude code", "codex", "cursor", "copilot"]
|
|
---
|
|
|
|
A coding agent writing LanceDB code from memory writes whatever was in its
|
|
training data: often an older API, sometimes one that never existed. The
|
|
LanceDB agent plugin fixes that by supplying the current reference at the point
|
|
the agent needs it.
|
|
|
|
## The plugin {#plugin}
|
|
|
|
It ships as the `lancedb` plugin in
|
|
the [lancedb-agent-plugins](https://github.com/lancedb/lancedb-agent-plugins)
|
|
repository, which is also a plugin marketplace. Install it with your agent's
|
|
plugin manager:
|
|
|
|
<CodeGroup>
|
|
```text Claude Code
|
|
/plugin marketplace add lancedb/lancedb-agent-plugins
|
|
/plugin install lancedb@lancedb
|
|
```
|
|
|
|
```bash Codex icon="terminal"
|
|
codex plugin marketplace add lancedb/lancedb-agent-plugins
|
|
codex plugin add lancedb@lancedb
|
|
```
|
|
|
|
```bash Other agents icon="terminal"
|
|
npx plugins add lancedb/lancedb-agent-plugins
|
|
```
|
|
</CodeGroup>
|
|
|
|
The [`plugins`](https://www.npmjs.com/package/plugins) installer shown under
|
|
**Other agents** is a cross-tool option. It detects which agent CLIs are on your
|
|
`PATH` (Cursor, GitHub Copilot CLI, VS Code, Grok Build, and Kimi Code, as well
|
|
as Claude Code and Codex) and installs through each one's native plugin system.
|
|
|
|
The plugin supplements the agent's training data with current LanceDB
|
|
instructions. To pick up later revisions, refresh the marketplace:
|
|
|
|
<CodeGroup>
|
|
```text Claude Code
|
|
/plugin marketplace update lancedb
|
|
```
|
|
|
|
```bash Codex icon="terminal"
|
|
codex plugin marketplace upgrade
|
|
```
|
|
|
|
```bash Other agents icon="terminal"
|
|
npx plugins add lancedb/lancedb-agent-plugins
|
|
```
|
|
</CodeGroup>
|
|
|
|
<Accordion title="Where the plugin gets installed">
|
|
Each plugin manager clones the repository, reads its marketplace manifest to find
|
|
the `lancedb` plugin, and hands the plugin to the agent's own plugin store rather
|
|
than copying files into your project. Claude Code and Codex keep it under
|
|
`~/.claude/plugins` and `~/.codex/plugins` respectively, so the plugin is available
|
|
in every project on the machine.
|
|
|
|
The `npx plugins` installer defaults to the same user-wide scope. Pass
|
|
`--scope project` to record the plugin in the current repository instead, so that
|
|
everyone working in it gets the same plugin, or `-t <target>` to install for a
|
|
single agent rather than every one it detects:
|
|
|
|
<CodeGroup>
|
|
```bash Bash icon="terminal"
|
|
npx plugins add lancedb/lancedb-agent-plugins --scope project -t cursor
|
|
```
|
|
</CodeGroup>
|
|
|
|
Not every agent supports project scope; `npx plugins targets` lists what it
|
|
found and what each target supports.
|
|
</Accordion>
|
|
|
|
## Example prompts {#example-prompts}
|
|
|
|
These prompts show the kind of work the plugin helps an agent get right on
|
|
the first try. Adapt the dataset names, columns, and models to your own data.
|
|
|
|
### Ingest and search robotics data {#example-robotics}
|
|
|
|
<CodeGroup>
|
|
```text Prompt
|
|
Import the HuggingFace dataset `lance-format/koch_pick_place_5_lego-lance`
|
|
into LanceDB.
|
|
|
|
Create a Function `extract_frames(video, timestamp)` that extracts each frame
|
|
from the videos table and stores the output as JPEG in a Lance blob column.
|
|
Use `torchcodec` to decode frames on a GPU, and stream the video through the
|
|
blob input instead of loading it into memory. Install dependencies with pip,
|
|
not conda.
|
|
|
|
Create a table `koch_frames` from `extract_frames`, populated from the videos
|
|
and frames metadata in the existing tables.
|
|
|
|
Create a Function that uses a vision-language model to caption each frame,
|
|
and add its output as a column named `caption` on `koch_frames`. It needs a
|
|
GPU.
|
|
|
|
Create a full-text search index on `koch_frames.caption`.
|
|
```
|
|
</CodeGroup>
|
|
|
|
### Deduplicate near-identical images {#example-dedup}
|
|
|
|
<CodeGroup>
|
|
```text Prompt
|
|
Import the HuggingFace dataset `lance-format/BDD100K-enriched` into LanceDB.
|
|
|
|
Create a Function `phash(image)` that computes a perceptual hash with the
|
|
`ImageHash` package, and add it as a column named `phash`.
|
|
|
|
Build a vector index on `phash` using Hamming distance, and pick good index
|
|
parameters for this dataset size.
|
|
|
|
Create a materialized view that clusters images whose `phash` Hamming
|
|
distance is less than 1, using `duplicate_pairs`.
|
|
|
|
Summarize the result: cluster count, cluster size distribution, and the 10
|
|
largest clusters with sample image ids.
|
|
```
|
|
</CodeGroup>
|
|
|
|
### Ingest a large code dataset {#example-code}
|
|
|
|
<CodeGroup>
|
|
```text Prompt
|
|
Import the C, C++, and Python metadata from the HuggingFace dataset
|
|
`bigcode/the-stack-v2` into a single table `stack_v2_code`, with an extra
|
|
`language` column recording which of the three it is.
|
|
|
|
Add a `content` column and backfill it with each file's source, downloaded
|
|
from `s3://softwareheritage/content/{blob_id}` using the `blob_id` already in
|
|
the table. Compress `content` with the best codec LanceDB supports for code
|
|
text.
|
|
|
|
Use `bigcode/starcoder2-3b` to add a `perplexity_starcoder2` column, then
|
|
build an index on it.
|
|
```
|
|
</CodeGroup>
|