🌲 Pinecone
Pinecone vector database — manage indexes, upsert vectors, query similarity search, manage namespaces, and track collections via the Pinecone API.
Features
- - Index management — create, configure, delete indexes
- Vector upsert — insert and update vectors with metadata
- Similarity search — query nearest neighbors
- Namespace management — organize vectors by namespace
- Metadata filtering — filter queries by metadata fields
- Collection management — create snapshots of indexes
- Batch operations — bulk upsert and delete
- Index stats — vector counts, dimensions, usage
- Sparse-dense — hybrid search with sparse vectors
- Serverless — auto-scaling serverless indexes
Requirements
| Variable | Required | Description |
|---|
| INLINECODE0 | ✅ | API key/token for Pinecone |
Quick Start
CODEBLOCK0
CODEBLOCK1
CODEBLOCK2
CODEBLOCK3
Commands
indexes
List indexes.
CODEBLOCK4
index-get
Get index details.
CODEBLOCK5
index-create
Create an index.
CODEBLOCK6
index-delete
Delete an index.
CODEBLOCK7
upsert
Upsert vectors.
CODEBLOCK8
query
Query similar vectors.
CODEBLOCK9
fetch
Fetch vectors by ID.
CODEBLOCK10
delete
Delete vectors.
CODEBLOCK11
delete-namespace
Delete all vectors in namespace.
CODEBLOCK12
stats
Get index statistics.
CODEBLOCK13
collections
List collections.
CODEBLOCK14
collection-create
Create collection from index.
CODEBLOCK15
namespaces
List namespaces in index.
CODEBLOCK16
Output Format
All commands output JSON by default. Add --human for readable formatted output.
CODEBLOCK17
Script Reference
| Script | Description |
|---|
| INLINECODE15 | Main CLI — all Pinecone operations |
Data Policy
This skill never stores data locally. All requests go directly to the Pinecone API and results are returned to stdout. Your data stays on Pinecone servers.
Credits
Built by
M. Abidi |
agxntsix.ai
YouTube |
GitHub
Part of the
AgxntSix Skill Suite for OpenClaw agents.
📅 Need help setting up OpenClaw for your business? Book a free consultation
🌲 Pinecone
Pinecone 向量数据库 — 通过 Pinecone API 管理索引、上传向量、执行相似性搜索查询、管理命名空间以及跟踪集合。
功能特性
- - 索引管理 — 创建、配置、删除索引
- 向量上传 — 插入和更新带元数据的向量
- 相似性搜索 — 查询最近邻
- 命名空间管理 — 按命名空间组织向量
- 元数据过滤 — 按元数据字段过滤查询
- 集合管理 — 创建索引快照
- 批量操作 — 批量上传和删除
- 索引统计 — 向量数量、维度、使用情况
- 稀疏-密集 — 使用稀疏向量进行混合搜索
- 无服务器 — 自动扩展的无服务器索引
环境要求
| 变量 | 必需 | 描述 |
|---|
| PINECONEAPIKEY | ✅ | Pinecone 的 API 密钥/令牌 |
快速开始
bash
列出索引
python3 {baseDir}/scripts/pinecone.py indexes
bash
获取索引详情
python3 {baseDir}/scripts/pinecone.py index-get my-index
bash
创建索引
python3 {baseDir}/scripts/pinecone.py index-create {name:my-index,dimension:1536,metric:cosine,spec:{serverless:{cloud:aws,region:us-east-1}}}
bash
删除索引
python3 {baseDir}/scripts/pinecone.py index-delete my-index
命令
indexes
列出索引。
bash
python3 {baseDir}/scripts/pinecone.py indexes
index-get
获取索引详情。
bash
python3 {baseDir}/scripts/pinecone.py index-get my-index
index-create
创建索引。
bash
python3 {baseDir}/scripts/pinecone.py index-create {name:my-index,dimension:1536,metric:cosine,spec:{serverless:{cloud:aws,region:us-east-1}}}
index-delete
删除索引。
bash
python3 {baseDir}/scripts/pinecone.py index-delete my-index
upsert
上传向量。
bash
python3 {baseDir}/scripts/pinecone.py upsert --index my-index {vectors:[{id:vec1,values:[0.1,0.2,...],metadata:{text:hello}}]}
query
查询相似向量。
bash
python3 {baseDir}/scripts/pinecone.py query --index my-index {vector:[0.1,0.2,...],topK:10,includeMetadata:true}
fetch
按 ID 获取向量。
bash
python3 {baseDir}/scripts/pinecone.py fetch --index my-index --ids vec1,vec2,vec3
delete
删除向量。
bash
python3 {baseDir}/scripts/pinecone.py delete --index my-index --ids vec1,vec2
delete-namespace
删除命名空间中的所有向量。
bash
python3 {baseDir}/scripts/pinecone.py delete-namespace --index my-index --namespace docs
stats
获取索引统计信息。
bash
python3 {baseDir}/scripts/pinecone.py stats --index my-index
collections
列出集合。
bash
python3 {baseDir}/scripts/pinecone.py collections
collection-create
从索引创建集合。
bash
python3 {baseDir}/scripts/pinecone.py collection-create {name:backup,source:my-index}
namespaces
列出索引中的命名空间。
bash
python3 {baseDir}/scripts/pinecone.py namespaces --index my-index
输出格式
所有命令默认输出 JSON 格式。添加 --human 参数可获得可读的格式化输出。
bash
JSON(默认,用于程序化使用)
python3 {baseDir}/scripts/pinecone.py indexes --limit 5
人类可读格式
python3 {baseDir}/scripts/pinecone.py indexes --limit 5 --human
脚本参考
| 脚本 | 描述 |
|---|
| {baseDir}/scripts/pinecone.py | 主 CLI — 所有 Pinecone 操作 |
数据策略
此技能从不本地存储数据。所有请求直接发送到 Pinecone API,结果返回至标准输出。您的数据保留在 Pinecone 服务器上。
致谢
由
M. Abidi 构建 |
agxntsix.ai
YouTube |
GitHub
属于 OpenClaw 代理的
AgxntSix 技能套件 的一部分。
📅 需要为您的业务设置 OpenClaw 的帮助? 预约免费咨询