Skip to main content

PinionAI Python Library

This is the official Python client library for the PinionAI platform. It provides a convenient, asynchronous way to interact with PinionAI agents, manage sessions, and use its various features including AI interactions and gRPC messaging. AI Agent authoring is performed in PinionAI Studio.

Website and Documentation

PinionAI website

PinionAI documentation

Github PinionAI Agent Example - reflex/fastapi

Github PinionAI Agent Examples - streamlit, cli, slack, teams

Installation

From PyPI

This package is available on PyPI and can be installed with pip or uv. We recommend uv for its speed.

With uv

If you don't have uv, you can install it from astral.sh.

# On macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
#OR
brew install uv
# On Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Once uv is installed, you can install the pinionai package from PyPI:

uv pip install pinionai

With pip

If you prefer to use pip, you can still install the package with:

pip install pinionai

From GitHub

To install the latest development version directly from the GitHub repository:

pip install git+https://github.com/pinionai/pinionai-package.git

Optional Features

The base install covers the common client and session workflow. Optional integrations are grouped into extras so you can keep the install lean and only pull in the packages you need.

  • gcp: Google Cloud Storage support (google-cloud-storage)
  • aws: AWS S3 support (boto3)
  • google: Google Gemini / Vertex AI support (google-genai)
  • openai: Support for OpenAI models (openai)
  • anthropic: Support for Anthropic models (anthropic)
  • mistral: Support for Mistral models (mistral)
  • javascript: Support for running JavaScript snippets (mini-racer)
  • sendgrid: Support for running SendGrid delivery
  • twilio: Support for SMS delivery
  • telnyx: Support for Voice Controller and SMS delivery
  • data: Tabular and CSV helpers (pandas)
  • telemetry: Telemetry support

To install one or more optional features, specify them in brackets. For example, to get support for GCP, AWS, and Google AI:

pip install "pinionai[gcp,aws,google]"

To install all optional features at once, use the all extra:

pip install "pinionai[all]"

Options include:

dev = [ "build", "twine", "ruff", "grpcio-tools", ] gcp = ["google-cloud-storage>=3.0.0", "google-cloud-speech"] aws = ["boto3"] openai = ["openai"] anthropic = ["anthropic"] mistral = ["mistralai"] google = ["google-genai"] javascript = ["mini-racer"] sftp = ["paramiko"] sendgrid = ["sendgrid"] twilio = ["twilio"] data = ["pandas"] telemetry = [ "opentelemetry-api>=1.45,<2", "opentelemetry-sdk>=1.45,<2", "opentelemetry-exporter-otlp>=1.45,<2", ] all = [ "pinionai[gcp,aws,sftp,openai,anthropic,mistral,javascript,twilio,sendgrid,data,google,telemetry]", ]

Adding to Requirements

To add this library to your project's requirements file, you can use the following formats.

For requirements.txt or requirements.in:

# For a specific version from PyPI
pinionai==0.5.4

# With optional features
pinionai[gcp,openai]==0.5.4

# From the main branch on GitHub
git+https://github.com/pinionai/pinionai-package.git@main

Usage

Here's a Github link to a complete, fully functional example of how to use the AsyncPinionAIClient. In the link to our examples, you can run a Streamlit, CLI chat, Slack or Teams. Note: you can run a targeted agent or deploy to accept AIA files to run various agents.

PinionAI Agent on Github

Configuration For Developers

Setting up the environment

To set up a development environment, first create and activate a virtual environment using uv:

# Create a virtual environment named .venv +uv venv
# Activate the virtual environment
# On macOS and Linux
source .venv/bin/activate
# On Windows
.venv\Scripts\activate

Then, install the package in editable mode with its development dependencies:

uv pip install -e .[dev]

Metadata

Release files for pinionai 0.5.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pinionai 0.5.6
File Size Uploaded Provenance Actions
pinionai-0.5.6.tar.gz 121.5 kB Without provenance Details for pinionai-0.5.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pinionai 0.5.6
File Interpreter ABI Platform Actions
pinionai-0.5.6-py3-none-any.whl Python 3 none any Details for pinionai-0.5.6-py3-none-any.whl

Total release size: 243.4 kB

Release files / pinionai-0.5.6.tar.gz

Download URL pinionai-0.5.6.tar.gz
Size 121.5 kB
Tags Source
SHA-256 checksum
How to use checksums
09bfb00d5198421d31dc1dd38d2bf706c558a792a495e148129b6cbeeb30eb3e
BLAKE2b-256 checksum
How to use checksums
d4b55af63df6bd390cce20e7de7138bdf2cc62609287203938a4f9377220f0d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Release files / pinionai-0.5.6-py3-none-any.whl

Download URL pinionai-0.5.6-py3-none-any.whl
Size 121.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e98685f1b06a0b85213cf40d5cd1ce40f0dbaf79e0cdac8fb0265e765d3f906e
BLAKE2b-256 checksum
How to use checksums
a81c2b800e64939f1eec81bf778885e949154ff2c5fc05500be7a9acddfdbd4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.0

Security for pinionai 0.5.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.6 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page