Skip to content

picahq/toolkit

Repository files navigation

Pica ToolKit

npm version

Pica ToolKit Banner

Pica's ToolKit provides enterprise-grade integration capabilities for AI agents built with the Vercel AI SDK. Through Pica's integration layer, agents can seamlessly interact with third-party services and APIs while maintaining enterprise security, compliance, and reliability standards.

Prerequisites

Before installing ToolKit, you'll need:

  • Pica Account - Sign up for a free account here
  • Vercel AI SDK - Version 5.0.0 or higher
  • LLM Provider & API Key – You'll need an API key from your preferred LLM provider. Supported providers include: OpenAI, Anthropic, Google, xAI, Groq, Mistral, Cohere, and many more.

Installation

npm install @picahq/toolkit

Setup

  1. Create a new Pica account
  2. Create a Connection via the Pica Dashboard
  3. Create a Pica API key
  4. Set the API key as an environment variable: PICA_SECRET_KEY=<your-api-key>

Usage

The Pica ToolKit seamlessly integrates with Vercel AI SDK, enabling powerful AI capabilities in your applications. Below is a simple example of using Pica ToolKit in a Next.js (or similar Edge Function) API route handler, powering a chat UI with read-only permissions on a Gmail connection.

import { Pica } from '@picahq/toolkit';
import { openai } from '@ai-sdk/openai';
import {
  streamText,
  UIMessage,
  convertToModelMessages,
  stepCountIs
} from 'ai';

export async function POST(req: Request) {
  const { messages }: { messages: UIMessage[] } = await req.json();

  const pica = new Pica(process.env.PICA_SECRET_KEY!, {
    connectors: ["test::gmail::default::6faf1d3707f846ef89295c836df71c94"],
    actions: ["*"],
    permissions: "read"
  });

  const systemPrompt = pica.systemPrompt;

  const result = streamText({
    model: openai("gpt-5"),
    messages: convertToModelMessages(messages),
    tools: {
      ...pica.tools() // Load the Pica ToolKit
    },
    system: systemPrompt,
    stopWhen: stepCountIs(25)
  });

  return result.toUIMessageStreamResponse();
}

⭐️ Experience the Pica ToolKit's capabilities firsthand through our interactive chat playground directly in the Pica dashboard

What can Pica do?

After installing the SDK and integrating your platforms through the Pica dashboard, you can effortlessly create sophisticated AI agents to orchestrate and automate your business workflows.

ToolKit Diagram

Here are some powerful examples use cases:

Communication & Productivity

  • Compose and send Gmail emails containing meeting summaries to team members
  • Schedule Google Calendar events with specified date/time parameters
  • Post messages with campaign analytics to designated Slack channels
  • Search and retrieve Q3 planning materials from Google Drive

Data Access & Analysis

  • Execute PostgreSQL queries to identify top customer segments
  • Generate new Google Sheets workbooks populated with sales metrics
  • Retrieve closing opportunity data from Salesforce CRM
  • Maintain project tracking databases in Notion workspaces

Business Operations

  • Create customer support cases in Zendesk from feedback data
  • Process customer refund transactions via Stripe
  • Convert website inquiries into HubSpot lead entries
  • Generate client invoices through QuickBooks integration

AI & Content

  • Create DALL-E images matching product requirements
  • Convert meeting audio to text using ElevenLabs
  • Conduct market research via Tavily/SerpApi integrations
  • Perform sentiment analysis on support interactions

Documentation

For more detailed documentation, please visit our documentation site.

License

This project is licensed under the GPL-3.0 license. See the LICENSE file for details.