LangChain
Connect your LangChain applications with Pica to supercharge your AI workflows and unlock powerful automation capabilities.
pica-langchain
Install the Python SDK to unlock powerful tools for LangChain
Installation
Install the Pica LangChain SDK:
Configuration
The PicaClientOptions
class allows you to configure the Pica client with the following options:
Option | Type | Required | Default | Description |
---|---|---|---|---|
server_url | str | No | https://api.picaos.com | URL for self-hosted Pica server. |
connectors | List[str] | No | All available connectors | 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. |
identity | str | No | None | Filter connections by specific identifier. |
identity_type | "user", "team", "project", "organization" | No | None | Filter connections by identity type. |
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 |
The create_pica_agent
function allows customizing the following parameters:
Option | Type | Required | Default | Description |
---|---|---|---|---|
verbose | bool | No | False | Whether to print verbose logs. |
system_prompt | str | No | None | A custom system prompt to append to the default system prompt. |
agent_type | AgentType | No | OPENAI_FUNCTIONS | The type of agent to create. |
tools | List[BaseTool] | No | None | A list of tools to use in the agent. |
return_intermediate_steps | bool | No | False | Whether to return the intermediate steps of the agent. |
Usage
This is a getting started example using Pica with LangChain and OpenAI.
Ensure you have the following environment variables set:
Logging
The Pica LangChain SDK uses the logging
module to log messages. The log level can be set using the PICA_LOG_LEVEL
environment variable.
The following log levels are available:
debug
info
warning
error
critical
Examples
Code Solutions
Workflows
GitHub
@picahq/pica-langchain
Check out our GitHub repository to explore the code, contribute, or raise issues.