{"id":24907434,"url":"https://github.com/picahq/ai","last_synced_at":"2025-04-14T10:05:40.277Z","repository":{"id":273018235,"uuid":"918475157","full_name":"picahq/ai","owner":"picahq","description":"Pica Tools built for the Vercel AI SDK","archived":false,"fork":false,"pushed_at":"2025-04-12T02:52:00.000Z","size":214,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T10:05:18.985Z","etag":null,"topics":["ai","pica","tools","vercel"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@picahq/ai","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/picahq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-01-18T03:01:43.000Z","updated_at":"2025-04-12T02:50:52.000Z","dependencies_parsed_at":"2025-02-27T02:36:43.536Z","dependency_job_id":"f0334c0d-77b7-4879-a79f-3e955479db82","html_url":"https://github.com/picahq/ai","commit_stats":null,"previous_names":["picahq/ai-sdk","picahq/ai"],"tags_count":42,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picahq%2Fai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picahq%2Fai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picahq%2Fai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picahq%2Fai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/picahq","download_url":"https://codeload.github.com/picahq/ai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248860288,"owners_count":21173342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","pica","tools","vercel"],"created_at":"2025-02-02T01:17:15.720Z","updated_at":"2025-04-14T10:05:40.234Z","avatar_url":"https://github.com/picahq.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pica AI SDK\n\n[![npm version](https://img.shields.io/npm/v/%40picahq%2Fai)](https://npmjs.com/package/@picahq/ai)\n\nThe Pica AI SDK is a TypeScript library for integrating Pica with [Vercel's AI SDK](https://www.npmjs.com/package/ai).\n\n![Pica OneTool](https://assets.picaos.com/github/onetool.svg)\n\nFor detailed instructions and examples, view the [documentation](https://docs.picaos.com/sdk/vercel-ai).\n\n## Installation\n\n```bash\nnpm install @picahq/ai\n```\n\n## Setup\n\n1. Create a new [Pica account](https://app.picaos.com)\n2. Create a Connection via the [Pica Dashboard](https://app.picaos.com/connections)\n3. Create a [Pica API key](https://app.picaos.com/settings/api-keys)\n4. Set the API key as an environment variable: `PICA_SECRET_KEY=\u003cyour-api-key\u003e`\n\n## Configuration\n\nThe Pica SDK can be configured with the following options:\n\n| Option | Type | Required | Default | Description |\n|--------|------|----------|---------|-------------|\n| serverUrl | String | No | https://api.picaos.com | URL for self-hosted Pica server |\n| connectors | String[] | No | - | List of connector keys to filter by. Pass `[\"*\"]` to initialize all available connectors, or specific connector keys to filter. If empty, no connections will be initialized |\n| identity | String | No | None | Filter connections by specific identifier |\n| identityType | `\"user\"` \\| `\"team\"` \\| `\"organization\"` \\| `\"project\"` | No | None | Filter connections by identity type |\n| authkit | Boolean | No | false | If true, the SDK will use Authkit to connect to prompt the user to connect to a platform that they do not currently have access to |\n| knowledgeAgent | Boolean | No | false | If true, the SDK will never execute actions, but will use Pica's knowledge to generate code. If true, use pica.intelligenceTool instead of pica.oneTool |\n| knowledgeAgentConfig | Object | No | `{ includeEnvironmentVariables: true }` | Configuration for the Knowledge Agent. If `includeEnvironmentVariables` is true, the SDK will return a reminder to include environment variables in the output |\n\n## Usage\n\nThe Pica AI SDK is designed to work seamlessly with [Vercel AI SDK](https://www.npmjs.com/package/ai). Here's an example implementation with Next.js:\n\n```typescript\nimport { openai } from \"@ai-sdk/openai\";\nimport { convertToCoreMessages, streamText } from \"ai\";\nimport { Pica } from \"@picahq/ai\";\n\nexport async function POST(request: Request) {\n  const { messages } = await request.json();\n\n  const pica = new Pica(process.env.PICA_SECRET_KEY!, {\n    connectors: [\"*\"],\n  });\n\n  const systemPrompt = await pica.generateSystemPrompt();\n\n  const stream = streamText({\n    model: openai(\"gpt-4o\"),\n    system: systemPrompt,\n    tools: { ...pica.oneTool },\n    messages: convertToCoreMessages(messages),\n    maxSteps: 10,\n  });\n\n  return stream.toDataStreamResponse();\n}\n```\n\n\u003e ⭐️ You can see a full Next.js demo of the Pica AI SDK in action [here](https://github.com/picahq/onetool-demo)\n\nExamples for streaming and creating an express server can be found in the [examples](examples) directory.\n\n## 🚦 What can Pica do?\n\nOnce you've installed the SDK and connected your platforms in the [Pica dashboard](https://app.picaos.com/connections), you can seamlessly build your own AI agents to automate your workflows. \n\nHere's some inspiration:\n\n### Communication \u0026 Productivity\n- Send an email using Gmail to a colleague with a meeting summary\n- Create a calendar event in Google Calendar for next Tuesday at 2pm\n- Send a message in Slack to the #marketing channel with the latest campaign metrics\n- Find documents in Google Drive related to Q3 planning\n\n### Data Access \u0026 Analysis\n- List the top 10 customers from my PostgreSQL database\n- Create a new sheet in Google Sheets with sales data\n- Query Salesforce for opportunities closing this month\n- Update a Notion database with project statuses\n\n### Business Operations\n- Create a support ticket in Zendesk from customer feedback\n- Process a refund for a customer order in Stripe\n- Add a new lead to HubSpot from a website inquiry\n- Generate an invoice in QuickBooks for a client project\n\n### AI \u0026 Content\n- Generate an image with DALL-E based on product specifications\n- Transcribe a meeting recording with ElevenLabs\n- Research market trends using Tavily or SerpApi\n- Analyze customer sentiment from support tickets\n\nGot any cool examples? [Open a PR](https://github.com/picahq/awesome-pica) and share them!\n\n## License\n\nThis project is licensed under the GPL-3.0 license. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicahq%2Fai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpicahq%2Fai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicahq%2Fai/lists"}