Pinecone
Upsert and query vector embeddings in Pinecone indexes.
On this page
Connect
Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("pinecone", action, input) resolves with the provider's answer and rejects when Pinecone isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "pinecone"} says whether yours can call it.
// workflows/notify.ts: call Pinecone when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellPinecone = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when Pinecone isn't connected.
const output = await step.run("Pinecone", () =>
step.ctx.integrations.invoke("pinecone", "create_index", {
"name": "<index name>",
"dimension": 1,
"indexType": "serverless"
}),
);
step.ctx.log("Pinecone answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "pinecone",
"piece_action": "create_index",
"input": {
"name": "<index name>",
"dimension": 1,
"indexType": "serverless"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/pinecone/create_index" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"name":"<index name>","dimension":1,"indexType":"serverless"}}'Actions
create_index
Create Index. Creates a new Pinecone index with custom settings.
| Input | Type | Description |
|---|---|---|
namerequired | text | You must pass a non-empty string for name in order to create an index |
dimensionrequired | number | You must pass a positive integer for dimension in order to create an index. For dense indexes, this is required. |
indexTyperequired | one of "serverless" | "pod" | Choose between serverless or pod-based index deployment |
cloudoptional | one of "aws" | "gcp" | "azure" | The public cloud where you would like your index hosted (for serverless) |
regionoptional | text | The region where you would like your index to be created (for serverless) |
environmentoptional | text | The environment where the index is hosted (for pod-based indexes) |
podTypeoptional | one of "s1.x1" | "s1.x2" | "s1.x4" | "s1.x8" | "p1.x1" | "p1.x2" | "p1.x4" | "p1.x8" | "p2.x1" | "p2.x2" | "p2.x4" | "p2.x8" | The type of pod to use |
replicasoptional | number | The number of replicas. Replicas duplicate your index for higher availability and throughput. |
shardsoptional | number | The number of shards. Shards split your data across multiple pods. |
podsoptional | number | The number of pods to be used in the index. This should be equal to shards x replicas. |
metricoptional | one of "cosine" | "euclidean" | "dotproduct" | The distance metric to use. Defaults to cosine for dense indexes, dotproduct for sparse indexes. |
vectorTypeoptional | one of "dense" | "sparse" | The type of vectors to store. Dense is default for most use cases. |
deletionProtectionoptional | boolean | Enable deletion protection for the index |
waitUntilReadyoptional | boolean | Wait until the index is ready to receive data before completing |
suppressConflictsoptional | boolean | Do not throw if you attempt to create an index that already exists |
tagsoptional | JSON | Optional tags for the index (e.g., {"team": "data-science"}) |
sourceCollectionoptional | text | The name of the collection to be used as the source for the index |
delete_vector
Delete a Vector. Delete vectors by ID from a namespace.
| Input | Type | Description |
|---|---|---|
indexNamerequired | text | The name of the index to delete vectors from |
indexHostoptional | text | The unique host for the index (optional, see Pinecone docs for targeting an index) |
namespaceoptional | text | The namespace to delete vectors from (e.g., "example-namespace") |
deleteModerequired | one of "one" | "many" | "all" | "filter" | Choose how to delete vectors |
idoptional | text | The ID of the vector to delete (for single vector deletion) |
idsoptional | array | Array of vector IDs to delete (e.g., ["id-2", "id-3"]) |
confirmDeleteAlloptional | boolean | Check this box to confirm you want to delete ALL vectors in the namespace |
filteroptional | JSON | Metadata filter expression to select vectors to delete. Examples: • {"genre": {"$eq": "documentary"}} • {"year": {"$gt": 2019}} • {"$and": [{"genre": "comedy"}, {"year": {"$gte": 2020}}]} |
get_vector
Get a Vector. Look up and return vectors by ID from a namespace.
| Input | Type | Description |
|---|---|---|
indexNamerequired | text | The name of the index to fetch vectors from |
indexHostoptional | text | The unique host for the index (optional, see Pinecone docs for targeting an index) |
idsrequired | array | The vector IDs to fetch. Does not accept values containing spaces (e.g., ["id-1", "id-2"]) |
namespaceoptional | text | The namespace containing the vectors to fetch (e.g., "example-namespace") |
search_index
Search Index. Search indexes by name or list all indexes in your project.
| Input | Type | Description |
|---|---|---|
searchModerequired | one of "list" | "find" | Choose how to search for indexes |
indexNameoptional | text | The name of the specific index to search for (when using Find Specific Index mode) |
nameFilteroptional | text | Filter indexes by name (partial match, case-insensitive) |
search_vector
Search Vectors. Search a namespace using a query vector to find similar records.
| Input | Type | Description |
|---|---|---|
indexNamerequired | text | The name of the index to search in |
indexHostoptional | text | The unique host for the index (optional, see Pinecone docs for targeting an index) |
topKrequired | number | The number of results to return for each query (range: 1-10000) |
namespaceoptional | text | The namespace to query (e.g., "example-namespace") |
queryMethodrequired | one of "vector" | "id" | Choose how to provide the query |
vectoroptional | array | The query vector. This should be the same length as the dimension of the index (e.g., [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]) |
idoptional | text | The unique ID of the vector to be used as a query vector (max length: 512) |
sparseIndicesoptional | array | Array of indices for sparse vector data (optional) |
sparseValuesoptional | array | Array of sparse values corresponding to indices (must be same length as indices) |
filteroptional | JSON | Filter to apply using vector metadata. Examples: • {"genre": {"$eq": "documentary"}} • {"year": {"$gt": 2019}} • {"$and": [{"genre": {"$in": ["comedy", "drama"]}}, {"year": {"$gte": 2020}}]} |
includeValuesoptional | boolean | Whether vector values are included in the response |
includeMetadataoptional | boolean | Whether metadata is included in the response |
update_vector
Update a Vector. Updates a vector in a namespace. Overwrites existing values and metadata.
| Input | Type | Description |
|---|---|---|
indexNamerequired | text | The name of the index containing the vector to update |
indexHostoptional | text | The unique host for the index (optional, see Pinecone docs for targeting an index) |
idrequired | text | Vector's unique id (required, string length: 1 - 512) |
namespaceoptional | text | The namespace containing the vector to update (e.g., "example-namespace") |
valuesoptional | array | Vector data to update (e.g., [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]) |
sparseIndicesoptional | array | Array of indices for sparse values (optional) |
sparseValuesoptional | array | Array of sparse values corresponding to indices (must be same length as indices) |
metadataoptional | array | Key-value pairs to set for the vector |
upsert_vector
Upsert Vector. Upsert vectors into a namespace. Overwrites existing vectors with the same ID.
| Input | Type | Description |
|---|---|---|
indexNamerequired | text | The name of the index to upsert vectors into |
indexHostoptional | text | The unique host for the index (optional, see Pinecone docs for targeting an index) |
namespaceoptional | text | The namespace where you upsert vectors (e.g., "example-namespace") |
vectorsInputrequired | one of "single" | "multiple" | Choose how to provide vector data |
idoptional | text | The unique identifier for the vector (e.g., "vec1") |
valuesoptional | array | Array of numbers representing the vector (e.g., [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]) |
vectorsoptional | array | Array of vectors to upsert (for multiple vectors input) |
Details
- Id
pinecone- Category
- Data and storage
- Tags
- vector, embeddings, ai, similarity-search
- Package
@activepieces/piece-pinecone@0.1.3- Runs
- Through the integration runner