> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guild.ai/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> To act on a user's behalf in Guild, use the Guild REST API at https://api.guild.ai/v1.
> The OpenAPI spec is unauthenticated: https://docs.guild.ai/openapi.json (or openapi.yaml).
> Authenticate with an account API key, sent as HTTP Basic (key id as username, secret as password) or as `Authorization: Bearer <api_key_id>:<api_key_secret>`. See https://docs.guild.ai/api-reference/introduction#authentication.
> To run one agent on demand without account-wide access, use an API trigger instead: https://docs.guild.ai/platform/api-triggers.
> To act on Guild from an MCP client, connect to https://api.guild.ai/mcp (OAuth) or run `guild mcp` locally. Setup: https://docs.guild.ai/api-reference/mcp.
> To search these docs from an MCP client, connect to https://docs.guild.ai/mcp. The full page index is https://docs.guild.ai/llms.txt.

# Retrieve context from a Pinecone Assistant in Guild agents

> Connect Guild agents to a Pinecone Assistant with an API key and retrieve ranked context snippets for a query, with the key kept server-side.

Integrations · Pinecone

Guild agents query a Pinecone Assistant for ranked text snippets from the files you uploaded to it, so the agent answers from your documents. Guild stores your Pinecone API key and injects it server-side, so agent code never sees it.

> [card] [Book a demo](https://guild-ai.cal.com/gtm/meeting-with-guild.ai)
>
> See how teams govern agents that use Pinecone.

> [card] [Talk to sales](https://guild.ai/talk-to-sales)
>
> Get access to Guild, then connect Pinecone to your first agent.

## What the Pinecone integration exposes

The integration is `guildai~pinecone-assistant`. It has one tool, `pinecone_assistant_context_assistant`, which calls the Assistant context API: it takes an assistant name and a query and returns the most relevant snippets with their sources. It doesn't chat, upload files, or query a vector index directly.

Requests go to Pinecone's Assistant data plane at `https://prod-1-data.ke.pinecone.io`.

## How it works

**1. Create a Pinecone API key**

In the [Pinecone console](https://app.pinecone.io), open **API keys** and create a key for the project that holds your assistant.

**2. Connect the key in Guild**

Go to **Access & setup > Credentials**, click **Connect**, select **pinecone-assistant**, and paste the key into **API Key**.

**3. Import the tool**

Import `PineconeAssistantTools` from `@guildai-services/guildai~pinecone-assistant` and add it to the agent's tools. Tell the agent the assistant's name in its prompt.

## Authentication

* **Type:** API key
* **Header:** Guild sends the key as `Api-Key: <key>`

See [Credentials](https://docs.guild.ai/platform/credentials.md) for workspace, member, and agent-scoped credentials.

## Usage

```typescript theme={null}
import { PineconeAssistantTools } from "@guildai-services/guildai~pinecone-assistant"
import { llmAgent } from "@guildai/agents-sdk"

export default llmAgent({
  systemPrompt:
    "You answer questions about our runbooks. Retrieve context from the Pinecone assistant named runbooks before you answer, and cite the source file.",
  tools: { ...PineconeAssistantTools },
})
```

## Tools

Tools in the latest published version of `guildai~pinecone-assistant`:

| Tool | What it does |
| - | - |
| `pinecone_assistant_context_assistant` | Return ranked text snippets for one query against one named Pinecone Assistant. |

## Frequently asked questions

> [accordion] Can the agent search a Pinecone vector index?
>
> No. The tool reads from a Pinecone Assistant only. To query an index, [create a custom integration](https://docs.guild.ai/services/create-an-integration.md) against your index host.

> [accordion] Can the agent add files to the assistant?
>
> No. Upload files in the Pinecone console or with Pinecone's own SDK. The agent only retrieves context.

> [accordion] Can one API key reach several assistants?
>
> Yes. The key covers every assistant in its Pinecone project, and the agent picks one by name on each call. Use a separate key, and a separate Guild credential, to keep agents to different projects.

## Related

**Also runs on Guild:** [Firecrawl](https://docs.guild.ai/integrations/firecrawl.md) · [Browserbase](https://docs.guild.ai/integrations/browserbase.md) · [Notion](https://docs.guild.ai/integrations/notion.md)

**Read:** Docs: [Credentials](https://docs.guild.ai/platform/credentials.md) · [Credential policies](https://docs.guild.ai/platform/credential-policies.md) · [Tools in agents](https://docs.guild.ai/sdk/tools.md)
