For complete configuration options (connectors, actions, permissions, identity scoping), see the Vercel AI SDK integration documentation. This page focuses on Mastra-specific usage patterns.
Prerequisites
- Pica Account - Free account for managing integrations
- Pica API Key - API key from your Pica dashboard
- Mastra - Already installed and configured in your project
- LLM Provider - API key from your chosen provider
Installation
Quick Start
Create a Mastra agent with Pica tools:Usage Patterns
Basic Agent with Tools
The simplest setup - an agent with full access to integrations:Example
Agent with Memory and Tools
Combine Pica tools with Mastra’s memory capabilities:Example
Read-Only Agent
Restrict the agent to read-only operations:Example
Multi-Tenant Agent
Scope integrations to specific users:Example
Agent in a Workflow
Use Pica-powered agents within Mastra workflows:Example
Custom System Prompt
Combine your agent’s personality with Pica’s integration instructions:Streaming Responses
Mastra supports streaming - use it with Pica tools for real-time responses:Configuration Reference
All ToolKit configuration options are available:View all configuration options
See the complete configuration reference in the Vercel AI SDK documentation
Best Practices
Combine with Mastra workflows
Combine with Mastra workflows
Use Pica-powered agents within Mastra workflows for deterministic multi-step processes. This gives you the flexibility of agentic tool calling combined with the reliability of workflow orchestration.
Use memory for context
Use memory for context
Enable Mastra’s memory features alongside Pica tools so your agent can reference previous conversations when executing integration actions.
Scope agents per user
Scope agents per user
In multi-tenant applications, create separate agent instances with user-specific identity scoping:
Set appropriate permissions
Set appropriate permissions
Match permission levels to your use case:
- Customer-facing agents:
"read"
or"write"
- Internal automation:
"admin"
- Data retrieval:
"read"