Skip to content

Commit f00813a

Browse files
authored
refactor: repository structure (#339)
1 parent 98bf20d commit f00813a

File tree

388 files changed

+2303
-125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

388 files changed

+2303
-125
lines changed

.github/workflows/CI-API.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ on:
66
- "[0-9]+.[0-9]+.[0-9]+"
77
paths:
88
- .github/workflows/CI-API.yaml
9-
- "api/**"
10-
- "cache/**"
11-
- "entities/**"
12-
- "unified/**"
13-
- Cargo.lock
14-
- Dockerfile.common
15-
- api/Dockerfile
9+
- "core/api/**"
10+
- "core/cache/**"
11+
- "core/osentities/**"
12+
- "core/unified/**"
13+
- core/Cargo.lock
14+
- core/Dockerfile.common
15+
- core/api/Dockerfile
1616

1717
env:
1818
docker_image_tag: ${{ github.ref == 'refs/heads/main' && github.sha || github.ref_name }}
@@ -32,7 +32,7 @@ jobs:
3232
image: "us-docker.pkg.dev/integrationos/docker-oss/api:${{ env.docker_image_tag }}"
3333
service_account: github-actions@integrationos.iam.gserviceaccount.com
3434
workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions
35-
file: api/Dockerfile
35+
file: core/api/Dockerfile
3636
context: .
3737
build-args: |
3838
"EXECUTABLE=api"

.github/workflows/CI-ARCHIVER.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ on:
66
- "[0-9]+.[0-9]+.[0-9]+"
77
paths:
88
- .github/workflows/CI-ARCHIVER.yaml
9-
- "domain/**"
10-
- "archiver/**"
11-
- Cargo.lock
12-
- Dockerfile.common
13-
- archiver/Dockerfile
9+
- "core/osentities/domain/**"
10+
- "core/archiver/**"
11+
- core/Cargo.lock
12+
- core/Dockerfile.common
13+
- core/archiver/Dockerfile
1414

1515
env:
1616
docker_image_tag: ${{ github.ref == 'refs/heads/main' && github.sha || github.ref_name }}
@@ -31,7 +31,7 @@ jobs:
3131
image: "us-docker.pkg.dev/integrationos/docker-oss/archiver:${{ env.docker_image_tag }}"
3232
service_account: github-actions@integrationos.iam.gserviceaccount.com
3333
workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions
34-
file: archiver/Dockerfile
34+
file: core/archiver/Dockerfile
3535
context: .
3636
build-args: |
3737
"EXECUTABLE=archiver"

.github/workflows/CI-DATABASE.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ on:
66
- "[0-9]+.[0-9]+.[0-9]+"
77
paths:
88
- .github/workflows/CI-DATABASE.yaml
9-
- "domain/**"
10-
- "database/**"
11-
- Cargo.lock
12-
- Dockerfile.common
13-
- database/Dockerfile
9+
- "core/osentities/domain/**"
10+
- "core/database/**"
11+
- core/Cargo.lock
12+
- core/Dockerfile.common
13+
- core/database/Dockerfile
1414

1515
env:
1616
docker_image_tag: ${{ github.ref == 'refs/heads/main' && github.sha || github.ref_name }}
@@ -30,7 +30,7 @@ jobs:
3030
image: "us-docker.pkg.dev/integrationos/docker-oss/database:${{ env.docker_image_tag }}"
3131
service_account: github-actions@integrationos.iam.gserviceaccount.com
3232
workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions
33-
file: database/Dockerfile
33+
file: core/database/Dockerfile
3434
context: .
3535
build-args: |
3636
"EXECUTABLE=database"

.github/workflows/CI-OAUTH.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- "[0-9]+.[0-9]+.[0-9]+"
77
paths:
88
- .github/workflows/CI-OAUTH.yaml
9-
- "oauth/**"
9+
- "core/oauth/**"
1010

1111
env:
1212
docker_image_tag: ${{ github.ref == 'refs/heads/main' && github.sha || github.ref_name }}
@@ -23,8 +23,8 @@ jobs:
2323
- uses: actions/checkout@v3
2424
- uses: integration-os/google-artifact-registry-action@v2
2525
with:
26-
context: oauth
27-
file: oauth/Dockerfile
26+
context: core/oauth
27+
file: core/oauth/Dockerfile
2828
image: "us-docker.pkg.dev/integrationos/docker-oss/platform-oauth:${{ env.docker_image_tag }}"
2929
service_account: github-actions@integrationos.iam.gserviceaccount.com
3030
workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions

.github/workflows/CI-SEED.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ on:
66
- "[0-9]+.[0-9]+.[0-9]+"
77
paths:
88
- .github/workflows/CI-SEED.yaml
9-
- "resources/Dockerfile"
10-
- "resources/seed/**"
9+
- "core/resources/Dockerfile"
10+
- "core/resources/seed/**"
1111

1212
env:
1313
docker_image_tag: ${{ github.ref == 'refs/heads/main' && github.sha || github.ref_name }}
@@ -27,5 +27,5 @@ jobs:
2727
image: "us-docker.pkg.dev/integrationos/docker-oss/seed-data:${{ env.docker_image_tag }}"
2828
service_account: github-actions@integrationos.iam.gserviceaccount.com
2929
workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions
30-
context: resources
31-
file: resources/Dockerfile
30+
context: core/resources
31+
file: core/resources/Dockerfile

.github/workflows/CI-WATCHDOG.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ on:
66
- "[0-9]+.[0-9]+.[0-9]+"
77
paths:
88
- .github/workflows/CI-WATCHDOG.yaml
9-
- "cache/**"
10-
- "domain/**"
11-
- "watchdog/**"
12-
- Cargo.lock
13-
- Dockerfile.common
14-
- watchdog/Dockerfile
9+
- "core/cache/**"
10+
- "core/osentities/domain/**"
11+
- "core/watchdog/**"
12+
- core/Cargo.lock
13+
- core/Dockerfile.common
14+
- core/watchdog/Dockerfile
1515

1616
env:
1717
docker_image_tag: ${{ github.ref == 'refs/heads/main' && github.sha || github.ref_name }}
@@ -31,7 +31,7 @@ jobs:
3131
image: "us-docker.pkg.dev/integrationos/docker-oss/watchdog:${{ env.docker_image_tag }}"
3232
service_account: github-actions@integrationos.iam.gserviceaccount.com
3333
workload_identity_provider: projects/356173785332/locations/global/workloadIdentityPools/github-actions/providers/github-actions
34-
file: watchdog/Dockerfile
34+
file: core/watchdog/Dockerfile
3535
context: .
3636
build-args: |
3737
"EXECUTABLE=watchdog"

README.md

Lines changed: 72 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<p align="center">
22
<a href="https://picaos.com">
3-
<img alt="Pica Logo" src="./resources/images/banner.svg" style="border-radius: 10px;">
3+
<img alt="Pica Logo" src="https://assets.picaos.com/github/header.svg" style="border-radius: 10px;">
44
</a>
55
</p>
66

7-
<p align="center"><b>Pica, The AI Integrations Solution</b></p>
7+
<p align="center"><b>Pica</b> - <i>Ensuring outcomes for the AI-first world</i></p>
88

99
<p align="center">
1010
<b>
11-
<a href="https://www.picaos.com/">Website</a>
11+
<a href="https://www.picaos.com">Website</a>
1212
·
1313
<a href="https://docs.picaos.com">Documentation</a>
1414
·
@@ -24,133 +24,114 @@
2424

2525
---
2626

27-
Pica gives every builder instant, reliable access to the tools they need—no keys, no configs, no headaches.
27+
Connect LLMs to 25,000+ actions with Pica-verified knowledge and developer-friendly SDKs. No keys, no configs, no headaches.
2828

29-
## Why Pica?
29+
Pica makes it simple to build and manage AI agents with 3 key products:
30+
1. **OneTool**: Connect agents to over [150+ integrations](https://picaos.com/integrations) with a single SDK. Zero-shot execution that gets smarter with every use.
31+
2. **AuthKit**: Streamline authentication for multi-tenant applications with secure, end-to-end OAuth flows and automated token management. Handles the complexity of authentication so you don't have to.
32+
3. **BuildKit**: Create AI tools for integrations or empower vibe coding with integrations that work zero-shot.
3033

31-
Pica simplifies AI agent development with our four core products:
34+
Built in Rust for blazing speed and ultra-low latency execution. Full logging and action traceability gives developers complete visibility into their agents' decisions and activities. Our tools simplify building and running AI agents so developers can focus on results.
3235

33-
✅ OneTool – Connect agents to [100+ APIs and tools](https://app.picaos.com/tools) with a single SDK. <br/>
34-
✅ AuthKit – Secure authentication for seamless tool integration. <br/>
35-
✅ BuildKit - Empower vibe coding with integrations that work zero-shot.
36+
# Getting started 👋
3637

37-
Pica also provides full logging and action traceability, giving developers complete visibility into their agents’ decisions and activities. Our tools simplify building and running AI agents so developers can focus on results.
38+
Follow this tutorial to build a tool to fetch your Gmail emails in under 5 minutes.
3839

39-
## Getting started
40+
> 📖 **Full Demo**: For a comprehensive walkthrough with all IDE and framework options, visit [buildkit.picaos.com](https://buildkit.picaos.com)
4041
41-
### Install
42+
> 🎥 **Demo Video**: Watch the [4-minute tutorial](https://youtu.be/EnbRfu-BsJE)
4243
43-
```bash
44-
npm install @picahq/ai
45-
```
46-
47-
### Setup
44+
## What we'll do:
4845

49-
1. Create a new [Pica account](https://app.picaos.com)
50-
2. Create a Connection via the [Dashboard](https://app.picaos.com/connections)
51-
3. Create an [API key](https://app.picaos.com/settings/api-keys)
52-
4. Set the API key as an environment variable: `PICA_SECRET_KEY=<your-api-key>`
46+
1. Install the Pica MCP Server
47+
2. Connect your Gmail account
48+
3. Set up a starter project with Vercel AI SDK
49+
4. Add some rules for the LLMs to understand BuildKit
50+
5. Prompt the LLM to build your tool
5351

54-
### Example Usage
52+
## Step 1: Install the Pica MCP Server
5553

56-
Below is an example demonstrating how to integrate the [Pica OneTool](https://www.npmjs.com/package/@picahq/ai) with the [Vercel AI SDK](https://www.npmjs.com/package/ai) for a GitHub use case:
54+
In the Cursor menu, select "MCP Settings" and update the MCP JSON file to include the following:
5755

58-
```typescript
59-
import { openai } from "@ai-sdk/openai";
60-
import { generateText } from "ai";
61-
import { Pica } from "@picahq/ai";
62-
import * as dotenv from "dotenv";
63-
dotenv.config();
64-
65-
const pica = new Pica(process.env.PICA_SECRET_KEY!, {
66-
connectors: ["*"]
67-
});
68-
69-
async function runAgentTask(message: string): Promise<string> {
70-
const system = await pica.generateSystemPrompt();
56+
```json
57+
{
58+
"mcpServers": {
59+
"pica": {
60+
"command": "npx",
61+
"args": ["@picahq/mcp"],
62+
"env": {
63+
"PICA_SECRET": "your-pica-secret-key"
64+
}
65+
}
66+
}
67+
}
68+
```
7169

72-
const { text } = await generateText({
73-
model: openai("gpt-4.1"),
74-
system,
75-
prompt: message,
76-
tools: { ...pica.oneTool },
77-
maxSteps: 10,
78-
});
70+
**Note:** Replace `your-pica-secret-key` with your actual Pica secret key from the dashboard: [Get API Key](https://app.picaos.com/settings/api-keys)
7971

80-
return text;
81-
}
72+
## Step 2: Connect your Gmail account
8273

83-
runAgentTask("Star the repo picahq/pica with github")
84-
.then((text) => {
85-
console.log(text);
86-
})
87-
.catch(console.error);
88-
```
74+
Now we need to connect your Gmail account so we can test our tool after we build it.
8975

90-
[![Try with Replit Badge](https://replit.com/badge?caption=Try%20with%20Replit)](https://replit.com/@picahq/Pica-or-GitHub-Star-Demo)
76+
[**Add Gmail Connection →**](https://app.picaos.com/connections)
9177

78+
## Step 3: Set up a starter project
9279

93-
For more use cases, visit our [Use Cases Library](https://www.picaos.com/community/use-cases) or our [Awesome Pica Repository](https://github.com/picahq/awesome-pica).
80+
#### 1. Clone and install dependencies
9481

95-
### Next.js Integration
82+
```bash
83+
git clone https://github.com/picahq/buildkit-vercel-ai-starter.git && cd buildkit-vercel-ai-starter
84+
```
9685

97-
⭐️ You can see a full Next.js demo [here](https://github.com/picahq/onetool-demo)
86+
```bash
87+
npm install
88+
```
9889

90+
#### 2. Set up environment variables
9991

100-
> For more examples and detailed documentation, check out our [SDK documentation](https://docs.picaos.com/sdk/vercel-ai).
92+
Create a `.env.local` file in the root directory:
10193

102-
---
94+
```env
95+
OPENAI_API_KEY=your_openai_api_key_here
96+
```
10397

104-
## Running Pica locally
98+
#### 3. Run the development server
10599

106-
> [!IMPORTANT]
107-
> The Pica dashboard is going open source! Stay tuned for the big release 🚀
100+
```bash
101+
npm run dev
102+
```
108103

109-
### Prerequisites
104+
#### 4. Open your browser
110105

111-
* [Docker](https://docs.docker.com/engine/)
112-
* [Docker Compose](https://docs.docker.com/compose/)
106+
Navigate to `http://localhost:3000` to see the chat interface.
113107

114-
### Step 1: Install the Pica CLI
108+
## Step 4: Add some rules for the LLMs to understand BuildKit
115109

116-
```sh
117-
npm install -g @picahq/cli
118-
```
110+
### BuildKit Rules for Cursor
119111

120-
### Step 2: Initialize the Pica CLI
112+
Create a `.cursor/rules/buildkit.mdc` file in the root of your project and copy the rules from our local file:
121113

122-
To generate the configuration file, run:
114+
📋 **Copy the rules**: [buildkit/rules/cursor/buildkit.mdc](buildkit/rules/cursor/buildkit.mdc)
123115

124-
```shell
125-
pica init
126-
```
116+
### ✅ Verify Setup
127117

128-
### Step 3: Start the Pica Server
118+
You can verify setup by asking "What connections do I have in Pica?" - it should show your Gmail connection.
129119

130-
```sh
131-
pica start
132-
```
120+
## Step 5: Prompt the LLM to build your tool
133121

134-
> All the inputs are required. Seeding is optional, but recommended when running the command for the first time.
122+
Now you can ask Cursor to build a Gmail tool for you! Copy this prompt:
135123

136-
##### Example
124+
> Create me a tool called fetchGmailEmails in my Vercel AI SDK agent for fetching my Gmail unread emails and returning the content using BuildKit
137125
138-
```Shell
139-
# To start the docker containers
140-
pica start
141-
Enter the IOS Crypto Secret (32 characters long): xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
142-
Do you want to seed? (Y/N) y
143-
```
126+
🎉 **You now have a working AI tool to fetch your Gmail unread emails in under 5 minutes!**
144127

145-
**The Pica API will be available at `http://localhost:3005` 🚀**
128+
---
146129

147-
To stop the docker containers, simply run:
130+
## 🚀 What's Next?
148131

149-
```Shell
150-
pica stop
151-
```
132+
Ready to build more AI tools? Pica connects to 150+ platforms with zero-shot execution.
152133

134+
**🔗 [Explore All Integrations](https://buildkit.picaos.com/integrations)** - Discover integrations for HubSpot, Salesforce, Slack, GitHub, and more
153135

154-
## License
136+
**[Launch Pica Dashboard](https://app.picaos.com)** - Manage connections, support multi-tenant authentication, monitor usage, and scale your AI agents
155137

156-
Pica is released under the [**GPL-3.0 license**](LICENSE).

buildkit/rules/claude/CLAUDE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Pica BuildKit – LLM Rules
2+
3+
**Role**
4+
You are an expert integration developer working with **Pica MCP**. You can:
5+
- Build tools for **Vercel AI SDK** and **LangChain**
6+
- Scaffold and implement **full MCP servers** (model context protocol)
7+
- Use the **Pica MCP** utilities to discover actions, fetch schemas/knowledge, and execute API calls.
8+
9+
Before you write ANY code you read ALL of buildkit-rules.md to understand how to use BuildKit in your code.

0 commit comments

Comments
 (0)