Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

PyGEAI - SDK for GlobAI OS

PyGEAI is a Software Development Kit (SDK) for interacting with GlobAI OS. It comprises libraries, tools, code samples, and documentation to simplify your experience with the platform.

Terms and conditions

By using the Python SDK to interact with GlobAI OS, you agree with the following Terms and Conditions:

Terms and Conditions

Compatibility

This package is compatible with the GlobAI OS release from February 2026.

Configuration

The SDK supports two authentication methods: API Key authentication and OAuth 2.0 authentication.

API Key Authentication

Before using the SDK with API Key authentication, you need to define GEAI_API_KEY and GEAI_API_BASE_URL. You can achieve this in three ways:

  • Environment variables: Set GEAI_API_KEY and GEAI_API_BASE_URL as environment variables in your operating system.
  • Credentials file: Create a file named credentials in the .geai directory within your user home directory ($USER_HOME/.geai/credentials) and define GEAI_API_KEY and GEAI_API_BASE_URL within this file.
  • Client instantiation: Specify the api_key and base_url parameters directly when creating an instance of a client class.

OAuth 2.0 Authentication

For OAuth 2.0 authentication, you need to define:

  • GEAI_OAUTH_ACCESS_TOKEN - Your OAuth 2.0 access token (required)
  • GEAI_API_BASE_URL - Base URL for the API (required)
  • GEAI_PROJECT_ID - Your project ID (optional, required by Lab module endpoints)
  • GEAI_ORGANIZATION_ID - Your organization ID (optional, required by Analytics module endpoints)

These can be configured via environment variables, credentials file, or client instantiation.

Note: Not all endpoints require project_id or organization_id. Core and Admin module endpoints work with just the OAuth access token. Lab module endpoints require project_id. Analytics module endpoints require both project_id and organization_id.

Note: If you plan to use the Evaluation Module, you must also define GEAI_API_EVAL_URL

Credentials file

The credentials file is organized via profiles (aliases), so one can interact with different instances of GlobAI OS by just referencing which profile one wishes to use. This also applies to different levels of permissions.

The structure of the credentials file is as follows:

API Key Authentication:

[default]
geai_api_key = <API_TOKEN>
geai_api_base_url = <GEAI_BASE_URL>
geai_api_eval_url = <GEAI_EVALUATION_MODULE_URL>

[production]
geai_api_key = <API_TOKEN>
geai_api_base_url = <GEAI_BASE_URL>

OAuth 2.0 Authentication:

[oauth-profile]
geai_oauth_access_token = <OAUTH_ACCESS_TOKEN>
geai_project_id = <PROJECT_ID>
geai_api_base_url = <GEAI_BASE_URL>
geai_organization_id = <ORGANIZATION_ID>  # Optional

Advanced Configuration

Custom SSL Certificates (Advanced Users):

For enterprise environments with self-signed certificates or custom Certificate Authorities, you can configure a custom SSL certificate path per profile:

[corporate]
geai_api_key = <API_TOKEN>
geai_api_base_url = <GEAI_BASE_URL>
geai_ssl_cert_path = /etc/ssl/certs/company-ca.pem

You can also set this via the CLI:

globai configure --profile-alias corporate --ssl-cert-path /etc/ssl/certs/company-ca.pem

Or via environment variable for the default profile:

export GEAI_SSL_CERT_PATH=/etc/ssl/certs/company-ca.pem

Note: This setting provides a custom CA bundle for SSL verification. It does NOT disable SSL verification - it validates using your custom certificate instead of system defaults.

Using Profiles

After setting the profiles, one can use them with the --alias option, for example:

globai --alias test llm list-providers

Modules

The SDK consists of several modules, all accessible through a single package pygeai:

Usage

Install PyGEAI

Use pip to install the package from PyPI:

(venv) ~$ pip install pygeai

To install pre-release versions, you can run:

(venv) ~$ pip install --pre pygeai

Verify installation

To check the installed PyGEAI version, run:

(venv) ~$ globai v

View help

To access the general help menu:

(venv) ~$ globai h

To view help for a specific command:

(venv) ~$ globai <command> h

Getting Started with Templates

PyGEAI includes a powerful template system for generating production-ready AI projects. Generate complete applications with best practices built-in:

# List available templates
(venv) ~$ globai generate list

# Create a RAG assistant project
(venv) ~$ globai generate create --template rag-basic --name my_rag

# Create a Lab agent with tools
(venv) ~$ globai generate create --template lab-agent-tools --name my_agent

# Create a multi-agent system
(venv) ~$ globai generate create --template lab-multi-agent --name content_team

# Create a REST API server
(venv) ~$ globai generate create --template api-server --name my_api

# Create a Gradio web UI
(venv) ~$ globai generate create --template web-ui-gradio --name my_ui

Available Templates:

  • rag-basic - RAG assistant with document knowledge
  • chat-rag-streaming - Interactive streaming chat for RAG
  • lab-agent-basic - Basic AI Lab agent
  • lab-agent-tools - Lab agent with custom tools
  • chat-agent-streaming - Interactive agent chat
  • chat-flow-streaming - Interactive process/flow chat
  • lab-process-basic - Agentic workflow process
  • lab-multi-agent - Multi-agent orchestration system
  • api-server - FastAPI REST server
  • web-ui-gradio - Gradio web interface

Each generated project includes complete documentation, example code, and follow-up instructions. See the Templates Documentation for detailed usage guides.

Debugger

The pygeai-dbg package provides a command-line debugger (globai-dbg) for troubleshooting and inspecting the globai CLI. The legacy geai-dbg command remains available as a deprecated alias. It pauses execution at breakpoints, allowing you to inspect variables, execute Python code, and control program flow interactively.

To debug a globai command, replace globai with globai-dbg. For example:

(venv) ~$ globai-dbg ail lrs

This pauses at the main function in pygeai.cli.geai, displaying an interactive prompt (globai-dbg). You can then use commands like continue (resume), run (run without pauses), quit (exit), or help (list commands).

Man Pages Documentation

The package includes Unix manual pages (man pages) for detailed command-line documentation.

To install man pages locally:

globai-install-man

To install man pages system-wide:

sudo globai-install-man --system

To access the man pages:

man globai

geai-install-man and man geai remain available for compatibility.

Setting up Man Pages Access

If you're using a virtual environment, you'll need to configure your system to find the man pages. Add the following to your shell configuration file (.bashrc, .zshrc, etc.):

# For macOS
if [ -n "$VIRTUAL_ENV" ]; then
    export MANPATH="$VIRTUAL_ENV/share/man:$MANPATH"
fi

# For Linux
if [ -n "$VIRTUAL_ENV" ]; then
    export MANPATH="$VIRTUAL_ENV/man:$MANPATH"
fi

After adding this configuration:

  1. Reload your shell configuration: source ~/.bashrc or source ~/.zshrc
  2. The man pages will be available when your virtual environment is active

Bugs and suggestions

To report any bug, request features or make any suggestions, the following email is available:

geai-sdk@globant.com

Authors

Copyright 2025, Globant. All rights reserved

Metadata

Release files for pygeai 0.8.0b3

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

Source distribution (sdist)

Source distribution for pygeai 0.8.0b3
File Size Uploaded Provenance Actions
pygeai-0.8.0b3.tar.gz 843.4 kB Without provenance Details for pygeai-0.8.0b3.tar.gz

Built distribution (wheel)

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

Total release size: 1.9 MB

Release files / pygeai-0.8.0b3.tar.gz

Download URL pygeai-0.8.0b3.tar.gz
Size 843.4 kB
Tags Source
SHA-256 checksum
How to use checksums
eb38cb3f9be3dc5d7017c730a880b417aff522fd765d758196cb6154f9b65074
BLAKE2b-256 checksum
How to use checksums
926ea7b3c9a2778e36aeaea68acbbcfdeae9422bde013a4754c2ffea7afaf3a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / pygeai-0.8.0b3-py3-none-any.whl

Download URL pygeai-0.8.0b3-py3-none-any.whl
Size 1.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
9036524cd2fcb6f6377bcde2eef8d7ded9c993316c2b58710d2a83e4a6bf4104
BLAKE2b-256 checksum
How to use checksums
1bfc7f2c4851272e6648aa9681981dc115cdbeb89411efd3e2c1e4ba20735810
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Security for pygeai 0.8.0b3

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
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