
gittech. site
for different kinds of informations and explorations.
Pica β Open-Source Rust SDK for Just-in-Time AI Tool Integration
The Complete Agentic Infrastructure
Website Β· Documentation Β· Community Hub Β· Changelog Β· X Β· LinkedIn
Effortlessly build, deploy, and scale AI agentsβPica provides everything you need to power autonomous AI workflows.
Why Pica?
Pica simplifies AI agent development with our four core products:
β
OneTool β A single SDK to connect AI agents to 100+ APIs and tools.
β
AuthKit β Secure authentication for seamless tool integration.
β
Agent (Coming Soon) β Build adaptive AI agents tailored to your needs.
β
AgentFlow (Coming Soon) β Enable agents to collaborate and automate workflows.
Pica also provides full logging and action traceability, giving developers complete visibility into their agents' decisions and activities.
Getting started
Install
npm install @picahq/ai
Setup
- Create a new Pica account
- Create a Connection via the Dashboard
- Create an API key
- Set the API key as an environment variable:
PICA_SECRET_KEY=<your-api-key>
Example Usage
Below is an example demonstrating how to integrate the Pica OneTool with the Vercel AI SDK for a GitHub use case:
import { openai } from "@ai-sdk/openai";
import { generateText } from "ai";
import { Pica } from "@picahq/ai";
import * as dotenv from "dotenv";
dotenv.config();
const pica = new Pica(process.env.PICA_SECRET_KEY!);
async function runAgentTask(message: string): Promise<string> {
const system = await pica.generateSystemPrompt();
const { text } = await generateText({
model: openai("gpt-4o"),
system,
prompt: message,
tools: { ...pica.oneTool },
maxSteps: 10,
});
return text;
}
runAgentTask("Star the repo picahq/pica with github")
.then((text) => {
console.log(text);
})
.catch(console.error);
For more use cases, visit our Use Cases Library or our Awesome Pica Repository.
Next.js Integration
βοΈ You can see a full Next.js demo here
For more examples and detailed documentation, check out our SDK documentation.
Running Pica locally
[!IMPORTANT] The Pica dashboard is going open source! Stay tuned for the big release π
Prerequisites
Step 1: Install the Pica CLI
npm install -g @picahq/cli
Step 2: Initialize the Pica CLI
To generate the configuration file, run:
pica init
Step 3: Start the Pica Server
pica start
All the inputs are required. Seeding is optional, but recommended when running the command for the first time.
Example
# To start the docker containers
pica start
Enter the IOS Crypto Secret (32 characters long): xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Do you want to seed? (Y/N) y
The Pica API will be available at http://localhost:3005
π
To stop the docker containers, simply run:
pica stop
License
Pica is released under the GPL-3.0 license.